From 42dde7facaed68ca4b0373743b6ab44b175201b9 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Thu, 4 Jun 2015 11:10:32 +0200 Subject: [PATCH] Be agile, remove not usefull script --- scripts/compilation/create_ninja_build.py | 13 ++-- scripts/module/check_module.sh | 36 ---------- scripts/module/check_src.sh | 83 ----------------------- scripts/module/create_Makefile.sh | 28 -------- scripts/module/create_Makefile_depend.sh | 46 ------------- scripts/module/create_rst_templates.sh | 43 ------------ 6 files changed, 8 insertions(+), 241 deletions(-) delete mode 100755 scripts/module/check_module.sh delete mode 100755 scripts/module/check_src.sh delete mode 100755 scripts/module/create_Makefile.sh delete mode 100755 scripts/module/create_Makefile_depend.sh delete mode 100755 scripts/module/create_rst_templates.sh diff --git a/scripts/compilation/create_ninja_build.py b/scripts/compilation/create_ninja_build.py index 5c8b10e7..f77f36f6 100755 --- a/scripts/compilation/create_ninja_build.py +++ b/scripts/compilation/create_ninja_build.py @@ -665,6 +665,14 @@ if __name__ == "__main__": elif arguments["--development"]: l_module_to_irp = d_binaries_development.keys() + l_all_module = d_genealogy_path.keys() + + for module in l_all_module: + # ~#~#~#~#~#~#~#~ # + # d o t _ t r e e # + # ~#~#~#~#~#~#~#~ # + l_string += ninja_dot_tree_build(module) + for module_to_compile in l_module_to_irp: # ~#~#~#~#~#~#~#~ # @@ -681,11 +689,6 @@ if __name__ == "__main__": l_string += ninja_irpf90_make_build(module_to_compile, l_children, d_irp) - # ~#~#~#~#~#~#~#~ # - # d o t _ t r e e # - # ~#~#~#~#~#~#~#~ # - l_string += ninja_dot_tree_build(module_to_compile) - # ~#~#~#~#~#~#~ # # b i n a r y # # ~#~#~#~#~#~#~ # diff --git a/scripts/module/check_module.sh b/scripts/module/check_module.sh deleted file mode 100755 index bdc063a5..00000000 --- a/scripts/module/check_module.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# -# Checks to run in every Module directory before building - -if [[ -z ${QPACKAGE_ROOT} ]] -then - print "The QPACKAGE_ROOT environment variable is not set." - print "Please reload the quantum_package.rc file." - exit -1 -fi -source ${QPACKAGE_ROOT}/scripts/qp_include.sh - -check_current_dir_is_module - -# Check if README.rst exists -if [[ ! -f README.rst ]] -then - ${QPACKAGE_ROOT}/scripts/module/create_rst_templates.sh - error " -README.rst was not present, so I created a -default one for you. -You should document it before you compile, as -well as the ASSUMPTIONS.rst file. -" -else - info "README.rst is present" -fi - - -# Check if ASSUMPTIONS.rst exists -if [[ ! -f ASSUMPTIONS.rst ]] -then - error "This is a Bug. At that point, the ASSUMPTIONS.rst) file should exist." -else - info "ASSUMPTIONS.rst is present." -fi \ No newline at end of file diff --git a/scripts/module/check_src.sh b/scripts/module/check_src.sh deleted file mode 100755 index 869172a2..00000000 --- a/scripts/module/check_src.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# Makes several checks before compiling. -# Wed Mar 25 21:22:18 CET 2015 - -# Required EZFIO version -EZFIO_REQUIRED_VERSION=1.1 - -# Required IRPF90 version -IRPF90_REQUIRED_VERSION=1.5 - -if [[ -z ${QPACKAGE_ROOT} ]] -then - print "The QPACKAGE_ROOT environment variable is not set." - print "Please reload the quantum_package.rc file." - exit -1 -fi -source ${QPACKAGE_ROOT}/scripts/qp_include.sh - -check_current_dir_is_src - -IRPF90="${QPACKAGE_ROOT}/bin/irpf90 ${IRPF90_FLAGS}" - - -# Check if the user's config exists -if [[ ! -f ${QPACKAGE_ROOT}/src/Makefile.config ]] -then - error " -Makefile.config is not present. -You can create Makefile.config -by modifying Makefile.config.example -" -else - info "Makefile.config is present" -fi - - -IRPF90_VERSION=$( ${IRPF90} -v ) -python << EOF -import sys -irp_version = float("${IRPF90_VERSION}".rsplit('.',1)[0]) -irp_required_version = float($IRPF90_REQUIRED_VERSION) -if irp_version < irp_required_version: - sys.exit(-1) -EOF - -if [[ $? -ne 0 ]] -then - error " -Current IRPF90 version : -\$ ${IRPF90} -v -${IRPF90_VERSION}. - -IRPF90 version >= ${IRPF90_REQUIRED_VERSION} is required. -To upgrade IRPF90, run : - ${QPACKAGE_ROOT}/scripts/upgrade/upgrade_irpf90.sh -" -else - info "irpf90 version is OK" -fi - - -# Check EZFIO version -EZFIO_VERSION=$(cat ${QPACKAGE_ROOT}/EZFIO/version | cut -d '=' -f 2) -python << EOF -import sys -ezfio_version = float("${EZFIO_VERSION}".rsplit('.',1)[0]) -ezfio_required_version = float($EZFIO_REQUIRED_VERSION) -if ezfio_version < ezfio_required_version: - sys.exit(-1) -EOF - -if [[ $? -ne 0 ]] -then - error " -Current EZFIO version : ${EZFIO_VERSION} -EZFIO version >= ${EZFIO_REQUIRED_VERSION} is required. -To upgrade EZFIO, run : - ${QPACKAGE_ROOT}/scripts/upgrade/upgrade_ezfio.sh -" -else - info "EZFIO version is OK" -fi - diff --git a/scripts/module/create_Makefile.sh b/scripts/module/create_Makefile.sh deleted file mode 100755 index e04b99fc..00000000 --- a/scripts/module/create_Makefile.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# usage: -# create_Makefile.sh MOs AOs Electrons -# Creates the Makefile. This command is supposed to be run in a -# module directory. -# Thu Apr 3 01:44:41 CEST 2014 - -if [[ -z ${QPACKAGE_ROOT} ]] -then - print "The QPACKAGE_ROOT environment variable is not set." - print "Please reload the quantum_package.rc file." - exit -1 -fi -source ${QPACKAGE_ROOT}/scripts/qp_include.sh - -check_current_dir_is_module - -cat << EOF > Makefile -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include \$(QPACKAGE_ROOT)/src/Makefile.common -EOF - - diff --git a/scripts/module/create_Makefile_depend.sh b/scripts/module/create_Makefile_depend.sh deleted file mode 100755 index 2485bb97..00000000 --- a/scripts/module/create_Makefile_depend.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This script is automatically invoked by Makefiles and should not be invoked -# by users. -# Creates the Makefile.depend file. This file contains all the external source -# files included by including other modules. -# Thu Apr 3 01:44:09 CEST 2014 - -if [[ -z ${QPACKAGE_ROOT} ]] -then - print "The QPACKAGE_ROOT environment variable is not set." - print "Please reload the quantum_package.rc file." - exit -1 -fi -source ${QPACKAGE_ROOT}/scripts/qp_include.sh - -check_current_dir_is_module - -SRC="" -OBJ="" -DEPS="$NEEDED_MODULES" - -for M in ${DEPS} -do - # X is the list of external source files - X=$(grep '^SRC=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2) - for f in ${X} - do - SRC+=" ${M}/${f}" - done - X=$(grep '^OBJ=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2) - for f in ${X} - do - OBJ+=" IRPF90_temp/${M}/${f/IRPF90_temp//}" - done -done - -# Create the Makefile.depend -cat << EOF > Makefile.depend -# This file was created by the $0 script. Do not modify it by hand. - -SRC+=${SRC} -OBJ+=${OBJ} -EOF - - diff --git a/scripts/module/create_rst_templates.sh b/scripts/module/create_rst_templates.sh deleted file mode 100755 index 4d85b827..00000000 --- a/scripts/module/create_rst_templates.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# -# Creates the rst files when creating a new module. -# Thu Apr 3 11:54:16 CEST 2014 - -if [[ -z ${QPACKAGE_ROOT} ]] -then - print "The QPACKAGE_ROOT environment variable is not set." - print "Please reload the quantum_package.rc file." - exit -1 -fi -source ${QPACKAGE_ROOT}/scripts/qp_include.sh - -check_current_dir_is_module -MODULE=$(basename $PWD) - - -README="True" -if [[ -f README.rst ]] -then - asksure "Overwrite existing README.rst file?" || README="False" -fi - -UNDERLINE="=======" -declare -i i=0 -while [[ i -lt ${#MODULE} ]] -do - UNDERLINE+="=" - i+=1 -done - -if [[ ${README} == "True" ]] -then -cat << EOF > ./README.rst -$UNDERLINE -$MODULE Module -$UNDERLINE - -EOF -fi - -touch ./ASSUMPTIONS.rst -