Last change
on this file since 502 was
502,
checked in by dubos, 8 years ago
|
configs/testing : towards first working version
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[501] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | export ROOT=$PWD |
---|
| 4 | |
---|
| 5 | full_defined="FALSE" |
---|
| 6 | arch_defined="FALSE" |
---|
| 7 | job=1 |
---|
| 8 | |
---|
| 9 | CPP_KEY="CPP_NONE" |
---|
| 10 | ICOSA_LIB="" |
---|
| 11 | |
---|
| 12 | while (($# > 0)) |
---|
| 13 | do |
---|
| 14 | case $1 in |
---|
| 15 | "-h") cat <<EOF |
---|
| 16 | Usage : |
---|
| 17 | setup [options] -arch nom_arch |
---|
| 18 | [-h] : help |
---|
| 19 | -arch nom_arch : nom de l\'architecture cible |
---|
| 20 | EOF |
---|
| 21 | exit;; |
---|
| 22 | |
---|
| 23 | "-arch") |
---|
| 24 | arch=$2 ; arch_defined="TRUE"; shift ; shift ;; |
---|
| 25 | "-job") |
---|
| 26 | job=$2 ; shift ; shift;; |
---|
| 27 | "-full") |
---|
| 28 | full_defined="TRUE" ; shift ;; |
---|
| 29 | *) |
---|
| 30 | echo "Unknown argument : $*" |
---|
| 31 | echo "Try $0 -h" |
---|
| 32 | exit 1 |
---|
| 33 | esac |
---|
| 34 | done |
---|
| 35 | |
---|
| 36 | if [[ "$arch_defined" == "TRUE" ]] |
---|
| 37 | then |
---|
| 38 | cat <<EOF >current_args |
---|
| 39 | ROOT="$ROOT" |
---|
| 40 | arch="$arch" |
---|
| 41 | job="$job" |
---|
| 42 | EOF |
---|
| 43 | |
---|
| 44 | echo "Setup saved in file current_args :" |
---|
| 45 | cat current_args |
---|
| 46 | # create separate build dirs sharing the same src/ and tools/ subdirs to save disk and time |
---|
| 47 | BUILD=$ROOT/DYNAMICO_serial |
---|
[502] | 48 | echo "Creating build directory $BUILD" |
---|
| 49 | rm -rf $BUILD |
---|
| 50 | mkdir -p $BUILD |
---|
| 51 | cd $ROOT/DYNAMICO |
---|
| 52 | for NAME in arch build compile make_icosa src bld.cfg clean doc tools ; do |
---|
| 53 | ln -s $ROOT/DYNAMICO/$NAME $BUILD/ |
---|
| 54 | done |
---|
[501] | 55 | for NAME in mpi mpi_omp ; do |
---|
[502] | 56 | echo "Creating build directory $ROOT/DYNAMICO_$NAME" |
---|
| 57 | rm -rf $ROOT/DYNAMICO_$NAME |
---|
[501] | 58 | cp -pr $BUILD $ROOT/DYNAMICO_$NAME |
---|
| 59 | done |
---|
| 60 | |
---|
| 61 | echo "You may now run ./build.sh" |
---|
| 62 | else |
---|
| 63 | echo "Please define a target architecture" |
---|
| 64 | exit 1 |
---|
| 65 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.