source: XMLIO_V2/dev/common/tools/xiosInstall @ 223

Last change on this file since 223 was 223, checked in by hozdoba, 13 years ago

Préparation nouvelle arborescence

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2
3install_dir=$PWD
4
5# Traitement de la ligne de commande
6while (($# > 0))
7   do
8      case $1 in
9         "-h")
10            # A modifier
11            exit;;
12
13         "--prod")  compil_mode="prod"  ; shift ;;
14         "--dev")   compil_mode="dev"   ; shift ;;
15         "--debug") compil_mode="debug" ; shift ;;
16         "--arch")  arch=$2     ; shift ; shift ;;
17         "--doc")   doc="true"          ; shift ;;
18         *)         code="$1"           ; shift ;;
19      esac
20   done
21
22# Vérification de la présence d'un identifiant d'architecture.
23
24if [[ !(-z $arch) ]]
25   then
26      rm -f  $install_dir/arch.path
27      rm -f  $install_dir/arch.fcm
28      ln -s  $install_dir/arch/arch-${arch}.path $install_dir/arch.path
29      ln -s  $install_dir/arch/arch-${arch}.fcm  $install_dir/arch.fcm
30      source $install_dir/arch.path
31   else
32      echo "Veuillez definir une architecture cible !"
33      exit 1
34fi
35
36# Vérification de la présence d'un mode de compilation.
37
38if [[ "$compil_mode" == "prod" ]]
39   then
40      COMPIL_CFLAGS="%PROD_CFLAGS"
41      COMPIL_FFLAGS="%PROD_FFLAGS"
42elif [[ "$compil_mode" == "dev" ]]
43   then
44      COMPIL_CFLAGS="%DEV_CFLAGS"
45      COMPIL_FFLAGS="%DEV_FFLAGS"
46elif [[ "$compil_mode" == "debug" ]]
47   then
48      COMPIL_CFLAGS="%DEBUG_CFLAGS"
49      COMPIL_FFLAGS="%DEBUG_FFLAGS"
50else
51   echo "Veuillez definir un mode de compilation [debug|dev|prod] !"
52fi
53
54echo "=> Activation du mode "$compil_mode" pour la distribution sous l'architecture \""$arch"\" !"
55
56# Décompression des bibliothÚques externes.
57cd $install_dir/extern
58echo -e "- Décompression des bibliothÚques externes ..."
59tar -xzvf boost.tar.gz    >/dev/null
60tar -xzvf rapidxml.tar.gz >/dev/null
61cd $install_dir
62
63# Décompression des outils de compilation.
64cd $install_dir/tools
65echo -e "- Décompression des outils de compilation ..."
66tar -xzvf FCM.tar.gz    >/dev/null
67cd $install_dir
68
69
Note: See TracBrowser for help on using the repository browser.