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