1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
| #!/bin/ksh
############################################################################
# Shell script used to launch all makefile related to executable or library
############################################################################
function InsUtilGetRep
{
InsUtilProc=$1
InsUtilWhere=`pwd`
InsUtilChemin=`dirname ${InsUtilProc}`
InsUtilNomProc=`basename ${InsUtilProc}`
# le script que l'on lance est un lien
if [ -L ${InsUtilProc} ]
then
cd ${InsUtilChemin}
InsUtilBase=`pwd`
cd ${InsUtilWhere}
# on construit le nom de la proc en recuperant le nom du lien
InsUtilProcBis=`\ls -l ${InsUtilChemin}/${InsUtilNomProc} | awk '{print $11}'`
InsUtilCheminBis=`dirname ${InsUtilProcBis}`
# on cherche maintenant a savoir si le nom du repertoire est relatif
# ou bien absolu : on recherche le / de debut de chemin absolu
InsUtilPremierCar=`echo ${InsUtilCheminBis} | cut -c 1`
if [ "${InsUtilPremierCar}" = "/" ]
then
InsUtilChemin=${InsUtilCheminBis}
else
InsUtilChemin="${InsUtilBase}/${InsUtilCheminBis}"
fi
fi
# si le repertoire est lui meme un lien ou un chemin relatif
cd ${InsUtilChemin}
InsUtilChemin=`pwd`
cd ${InsUtilWhere}
# nom du repertoireexport REP_PRD=`InsUtilGetRep $0`
gen_rep="$REP_PRD/gen"
InsUtilRepIni=`dirname ${InsUtilChemin}`
echo ${InsUtilRepIni}
}
# Get gen directory
export REP_PRD=`InsUtilGetRep $0`
gen_rep="$REP_PRD/gen"
# Set COMMON_PRD variable
if [ ! -d $REP_PRD/../../COMMUNS/trunk/ ]
then
# We are in tag version
# Need to search all available version
# get version number
existing_version=`ls $REP_PRD/../../../COMMUNS/tags/`
if [ `ls $REP_PRD/../../../COMMUNS/tags | wc -l` -eq 1 ]
then
# Only one version is present so we take it
export COMMON_PRD="$REP_PRD/../../../COMMUNS/tags/$existing_version/"
else
# several version exist, we to ask user for the correct version
echo "!!!!!!! Warning, several version of Common product exist, Please choose the correct version : " $existing_version
read version
while [ ! -d $REP_PRD/../../../COMMUNS/tags/$version ]
do
echo "!!!!!!! Warning, several version of Common product exist, Please choose the correct version : "$existing_version
read version
done
export COMMON_PRD=`readlink -f $REP_PRD/../../../COMMUNS/tags/$version/`
fi
else
# We are in trunk version
export COMMON_PRD=`readlink -f $REP_PRD/../../COMMUNS/trunk/`
fi
echo "!!!!!!!!!!!!!!!Warning COMMON_PRD set to $COMMON_PRD!!!!!!!!!!!!!!!!!!!"
# Set REP_COTS variable
if [ ! -d $REP_PRD/../../COTS/ ]
then
# We are in tag version
export REP_COTS=`readlink -f $REP_PRD/../../../COTS/`
else
# We are in trunk version
export REP_COTS=`readlink -f $REP_PRD/../../COTS/`
fi
OLD_PWD=$PWD
# Calling Parex initializing script (setting env. variables)
init_parex_rep="$REP_PRD/pkg/scripts"
# go to directory
cd $init_parex_rep
# calling init_parex
source $init_parex_rep"/init_parex.ksh"
#this does not work :
#./init_parex.ksh
# ##########################################################
# Then go to generation repository
cd $gen_rep
# And compile IHM
make clean -f Makefile_IHM
make -f Makefile_IHM |
Partager