source: TOOLS/MOSAIX/make_mosaix @ 5925

Last change on this file since 5925 was 5925, checked in by snguyen, 3 years ago

Ajout du notebook de génération du fichier coordonnées masks bounds en python

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/bin/bash
2# --
3## SVN information
4#  $Author:  $
5#  $Date:  $
6#  $Revision:  $
7#  $Id:  $
8#  $HeadURL: $
9#
10
11# Default values for command line parameters
12install_dir=${PWD}
13xios_dir="$(realpath ../XIOS)"
14compil_full=false
15           
16# Traitement de la ligne de commande
17while ((${#} > 0)) ; do
18    case ${1} in
19        "-h"|"--help"|"-help")
20            echo "make_mosaix - installs MOSAIX on your architecture"
21            echo "make_xios [options]"
22            echo "options :"
23            echo "       [--xios path] : path to XIOS. Default is ${xios_dir}"
24            echo "       [--full]      : to generate dependencies and recompile from scratch"
25            echo "Example : ./make_mosaix --xios ../XIOS"
26            exit
27            ;;
28        "--xios")  xios_dir=$(realpath ${2})   ; xios_path_defined="TRUE"; shift ; shift ;;
29        "--full")  compil_full="true"  ; shift ;;
30    esac
31done
32
33
34# Definition of the root directory of the build
35install_dir=${PWD}
36
37rm -f ${PWD}/bld_dir.cfg
38
39echo "inc        ${install_dir}/arch.fcm"   >> ${PWD}/bld_dir.cfg
40echo "inc        ${install_dir}/config.fcm" >> ${PWD}/bld_dir.cfg
41echo "dir::root  ${install_dir}"            >> ${PWD}/bld_dir.cfg
42
43# Use the arch files used to compile XIOS
44ln -fs ${xios_dir}/arch.debug.fcm   arch.fcm
45ln -fs ${xios_dir}/arch.env   .
46ln -fs ${xios_dir}/arch.path  .
47
48rm -f .void_file
49echo > .void_file
50rm -rf .void_dir
51mkdir .void_dir
52
53
54XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR $BLITZ_INCDIR"
55XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR $BLITZ_INCDIR"
56XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB"
57
58# Use config.fcm from XIOS
59rm -f ${install_dir}/config.fcm
60
61echo "%XIOS_DIR      ${xios_dir} "    > ${install_dir}/config.fcm
62cat ${xios_dir}/config.fcm >> ${install_dir}/config.fcm
63
64make_dir=${PWD}
65
66export PATH=${xios_dir}/tools/FCM/bin:${PATH}
67
68source ${install_dir}/arch.env
69source ${install_dir}/arch.path
70
71if [[ "${compil_full}" == "true" ]]
72then
73    fcm build --clean --ignore-lock
74    fcm build -f --ignore-lock
75else
76    fcm build --ignore-lock
77fi
78
79build_exit_status=${?}
80
81if [[ ${build_exit_status} == 0 ]]
82then
83    set nothing
84fi
85
86echo PATH : ${PATH}
87echo fcm : $(which fcm)
88
89exit ${build_exit_status}
90
91
92
Note: See TracBrowser for help on using the repository browser.