mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-19 04:22:36 +01:00
Update scripts for irpf90 and ezfio
This commit is contained in:
parent
bab7aac3a8
commit
9fd9159f04
1
Makefile
1
Makefile
@ -32,6 +32,7 @@ bin/irpf90:
|
|||||||
(echo Unable to download IRPF90 : $(WWW_SERVER)/$(IRPF90_TGZ) ; exit 1)
|
(echo Unable to download IRPF90 : $(WWW_SERVER)/$(IRPF90_TGZ) ; exit 1)
|
||||||
tar -zxf $(IRPF90_TGZ) && rm $(IRPF90_TGZ)
|
tar -zxf $(IRPF90_TGZ) && rm $(IRPF90_TGZ)
|
||||||
$(MAKE) -C irpf90 | tee install_irpf90.log
|
$(MAKE) -C irpf90 | tee install_irpf90.log
|
||||||
|
rm -rf -- $$PWD/bin/irpf90 $$PWD/bin/irpman
|
||||||
ln -s $$PWD/irpf90/bin/irpf90 $$PWD/bin/irpf90
|
ln -s $$PWD/irpf90/bin/irpf90 $$PWD/bin/irpf90
|
||||||
ln -s $$PWD/irpf90/bin/irpman $$PWD/bin/irpman
|
ln -s $$PWD/irpf90/bin/irpman $$PWD/bin/irpman
|
||||||
|
|
||||||
|
26
scripts/upgrade_ezfio.sh
Executable file
26
scripts/upgrade_ezfio.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Upgrades the EZFIO library from the web.
|
||||||
|
# Tue Nov 4 00:53:13 CET 2014
|
||||||
|
|
||||||
|
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||||
|
then
|
||||||
|
print "The QPACKAGE_ROOT environment variable is not set."
|
||||||
|
print "Please reload the quantum_package.rc file."
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd -- ${QPACKAGE_ROOT}
|
||||||
|
mv -- ${QPACKAGE_ROOT}/EZFIO ${QPACKAGE_ROOT}/EZFIO.old
|
||||||
|
|
||||||
|
make EZFIO
|
||||||
|
|
||||||
|
if [[ $? -eq 0 ]]
|
||||||
|
then
|
||||||
|
rm -rf -- ${QPACKAGE_ROOT}/EZFIO.old
|
||||||
|
echo "Successfully updated EZFIO"
|
||||||
|
else
|
||||||
|
rm -rf -- ${QPACKAGE_ROOT}/EZFIO
|
||||||
|
mv -- ${QPACKAGE_ROOT}/EZFIO.old ${QPACKAGE_ROOT}/EZFIO
|
||||||
|
echo "Failed to update EZFIO"
|
||||||
|
fi
|
||||||
|
|
25
scripts/upgrade_irpf90.sh
Executable file
25
scripts/upgrade_irpf90.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Upgrades IRPF90 from the web.
|
||||||
|
# Tue Nov 4 00:53:13 CET 2014
|
||||||
|
|
||||||
|
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||||
|
then
|
||||||
|
print "The QPACKAGE_ROOT environment variable is not set."
|
||||||
|
print "Please reload the quantum_package.rc file."
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd -- ${QPACKAGE_ROOT}
|
||||||
|
mv -- ${QPACKAGE_ROOT}/irpf90 ${QPACKAGE_ROOT}/irpf90.old
|
||||||
|
|
||||||
|
make irpf90
|
||||||
|
|
||||||
|
if [[ $? -eq 0 ]]
|
||||||
|
then
|
||||||
|
rm -rf -- ${QPACKAGE_ROOT}/irpf90.old
|
||||||
|
echo "Successfully updated IRPF90"
|
||||||
|
else
|
||||||
|
rm -rf -- ${QPACKAGE_ROOT}/irpf90
|
||||||
|
mv -- ${QPACKAGE_ROOT}/irpf90.old ${QPACKAGE_ROOT}/irpf90
|
||||||
|
echo "Failed to update IRPF90"
|
||||||
|
fi
|
@ -1,3 +1,9 @@
|
|||||||
|
# Required EZFIO version
|
||||||
|
EZFIO_VERSION=1.1
|
||||||
|
|
||||||
|
# Required IRPF90 version
|
||||||
|
IRPF90_VERSION=1.4
|
||||||
|
|
||||||
# Check if QPACKAGE_ROOT is defined
|
# Check if QPACKAGE_ROOT is defined
|
||||||
|
|
||||||
ifndef QPACKAGE_ROOT
|
ifndef QPACKAGE_ROOT
|
||||||
@ -28,10 +34,12 @@ include $(QPACKAGE_ROOT)/src/Makefile.config
|
|||||||
|
|
||||||
# Check the version of IRPF90
|
# Check the version of IRPF90
|
||||||
|
|
||||||
IRP_VERSION_OK=$(shell $(IRPF90) -v | python -c "import sys ; print float(sys.stdin.readline().rsplit('.',1)[0]) >= 1.3")
|
IRP_VERSION_OK=$(shell $(IRPF90) -v | python -c "import sys ; print float(sys.stdin.readline().rsplit('.',1)[0]) >= $(IRPF90_VERSION)")
|
||||||
ifeq ($(IRP_VERSION_OK),False)
|
ifeq ($(IRP_VERSION_OK),False)
|
||||||
$(info -------------------- Error --------------------)
|
$(info -------------------- Error --------------------)
|
||||||
$(info IRPF90 version >= 1.3 is required)
|
$(info IRPF90 version >= $(IRPF90_VERSION) is required)
|
||||||
|
$(info To upgrade IRPF90, run : )
|
||||||
|
$(info $(QPACKAGE_ROOT)/scripts/upgrade_irpf90.sh )
|
||||||
$(info -----------------------------------------------)
|
$(info -----------------------------------------------)
|
||||||
$(error )
|
$(error )
|
||||||
endif
|
endif
|
||||||
@ -85,12 +93,26 @@ $(info -----------------------------------------------)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Define the Makefile common variables and rules
|
# Define the Makefile common variables
|
||||||
|
|
||||||
EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO
|
EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO
|
||||||
EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a
|
EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a
|
||||||
INCLUDE_DIRS=$(NEEDED_MODULES) include
|
INCLUDE_DIRS=$(NEEDED_MODULES) include
|
||||||
|
|
||||||
|
# Check EZFIO version
|
||||||
|
|
||||||
|
EZFIO_VERSION_OK=$(shell cat $(EZFIO_DIR)/version | cut -d '=' -f 2 | python -c "import sys ; print float(sys.stdin.readline().rsplit('.',1)[0]) >= $(EZFIO_VERSION)")
|
||||||
|
ifeq ($(EZFIO_VERSION_OK),False)
|
||||||
|
$(info -------------------- Error --------------------)
|
||||||
|
$(info EZFIO version >= $(EZFIO_VERSION) is required )
|
||||||
|
$(info To upgrade EZFIO, run : )
|
||||||
|
$(info $(QPACKAGE_ROOT)/scripts/upgrade_ezfio.sh )
|
||||||
|
$(info -----------------------------------------------)
|
||||||
|
$(error )
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Define the EZFIO rules
|
||||||
|
|
||||||
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config)
|
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config)
|
||||||
@echo Building EZFIO library
|
@echo Building EZFIO library
|
||||||
@cp $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config) $(EZFIO_DIR)/config
|
@cp $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config) $(EZFIO_DIR)/config
|
||||||
|
Loading…
Reference in New Issue
Block a user