Last change
on this file since 596 was
556,
checked in by dubos, 7 years ago
|
testing/setup.sh : fix path
|
-
Property svn:executable set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | export ROOT=$PWD |
---|
4 | CMD_LINE="$0 $*" |
---|
5 | |
---|
6 | full_defined="FALSE" |
---|
7 | arch_defined="FALSE" |
---|
8 | job=1 |
---|
9 | |
---|
10 | CPP_KEY="CPP_NONE" |
---|
11 | ICOSA_LIB="" |
---|
12 | |
---|
13 | while (($# > 0)) ; do |
---|
14 | case $1 in |
---|
15 | "-h") cat <<EOF |
---|
16 | Usage : |
---|
17 | setup [options] |
---|
18 | [-h] : help |
---|
19 | -arch nom_arch : nom de l\'architecture cible |
---|
20 | -job N : parallel compilation |
---|
21 | -full : full compilation |
---|
22 | extra options will be passed to make_icosa |
---|
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 | *) |
---|
32 | echo "Unknown options < $* > will be passed to make_icosa" |
---|
33 | other="$*" |
---|
34 | break |
---|
35 | esac |
---|
36 | done |
---|
37 | |
---|
38 | if [[ "$arch_defined" == "TRUE" ]] |
---|
39 | then |
---|
40 | cat <<EOF >current_args |
---|
41 | # This file was generated by running : |
---|
42 | # $CMD_LINE |
---|
43 | ROOT="$ROOT" |
---|
44 | arch="$arch" |
---|
45 | job="$job" |
---|
46 | other="$other" |
---|
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 |
---|
52 | BUILD=$ROOT/build_serial |
---|
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 |
---|
60 | for NAME in mpi mpi_omp ; do |
---|
61 | echo "Creating build directory $ROOT/build_$NAME" |
---|
62 | rm -rf $ROOT/build_$NAME |
---|
63 | cp -pr $BUILD $ROOT/build_$NAME |
---|
64 | done |
---|
65 | |
---|
66 | echo "You may now run bash/build.sh" |
---|
67 | else |
---|
68 | echo "Please define a target architecture" |
---|
69 | exit 1 |
---|
70 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.