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