source: configs/testing/setup.sh @ 570

Last change on this file since 570 was 556, checked in by dubos, 7 years ago

testing/setup.sh : fix path

  • Property svn:executable set to *
File size: 1.6 KB
RevLine 
[501]1#!/bin/bash
2
3export ROOT=$PWD
[503]4CMD_LINE="$0 $*"
[501]5
6full_defined="FALSE"
7arch_defined="FALSE"
8job=1
9
10CPP_KEY="CPP_NONE"
11ICOSA_LIB=""
12
[547]13while (($# > 0)) ; do
[501]14  case $1 in
15      "-h") cat <<EOF
16Usage :
[547]17setup [options]
[501]18[-h]                       : help
19 -arch nom_arch            : nom de l\'architecture cible
[547]20 -job N                    : parallel compilation
21 -full                     : full compilation
22extra options will be passed to make_icosa
[501]23EOF
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
36done
37
38if [[ "$arch_defined" == "TRUE" ]]
39then
40  cat <<EOF >current_args
[503]41# This file was generated by running :
42# $CMD_LINE
[501]43ROOT="$ROOT"
44arch="$arch"
45job="$job"
[547]46other="$other"
[501]47EOF
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]67else
68  echo "Please define a target architecture"
69  exit 1
70fi
Note: See TracBrowser for help on using the repository browser.