#!/bin/bash export ROOT=$PWD CMD_LINE="$0 $*" full_defined="FALSE" arch_defined="FALSE" proj_defined="FALSE" job=1 CPP_KEY="CPP_NONE" ICOSA_LIB="" while (($# > 0)) ; do case $1 in "-h") cat < will be passed to make_icosa" other="$*" break esac done if [[ "$arch_defined" == "TRUE" ]] then cat <current_args # This file was generated by running : # $CMD_LINE ROOT="$ROOT" arch="$arch" job="$job" project="$project" other_XIOS="$pther_XIOS" other="$other" EOF echo "Setup saved in file current_args :" cat current_args # create separate build dirs sharing the same src/ and tools/ subdirs to save disk and time BUILD=$ROOT/build_serial echo "Creating build directory $BUILD" rm -rf $BUILD mkdir -p $BUILD cd $ROOT/DYNAMICO for NAME in arch build compile make_icosa src bld.cfg clean doc tools ; do ln -s $ROOT/DYNAMICO/$NAME $BUILD/ done for NAME in mpi mpi_omp ; do echo "Creating build directory $ROOT/build_$NAME" rm -rf $ROOT/build_$NAME cp -pr $BUILD $ROOT/build_$NAME done echo "You may now run bash/build.sh" else echo "Please define a target architecture with -arch XXX" exit 1 fi