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