3 # check if $1 is a directory
4 if [ ${BE_QUIET} -lt 1 ] ; then
5 echo -e "-> check arguments\n"
9 echo -e "Error : directory $1 does not exist!\n"
12 CPP_ROOT_DIR=${1%%/} # remove trailing slash if present
17 if [ ${BE_QUIET} -lt 2 ] ; then
18 echo " C++ Component directory : ${CPP_ROOT_DIR}"
21 # look for include file $2 - check number of files found and extension
22 nb=`find ${CPP_ROOT_DIR} -name $2 | wc -l` # number of files found, should be equal to 1
26 echo -e "\n Error:\n Include file $2 not found in $1 directory!\n"
30 echo -e "\n Error:\n More than one file named $2 was found in $1!\n Include file should be unique!"
32 elif [ $extension != "hxx" -a $extension != "hh" -a $extension != "h" ]
34 echo -e "\n Error:\n Extension=$extension\n Include file $2 should have extension .hxx .hh or .h !\n"
37 hxx_file=`find ${CPP_ROOT_DIR} -name $2` # name of c++ header we will parse to generate salome module
39 if [ ${BE_QUIET} -lt 2 ] ; then
40 echo " C++ Component header : ${hxx_file}"
42 hxx_dir=`dirname ${hxx_file}`
45 nb=`find ${CPP_ROOT_DIR} -name $3 | wc -l` # number of files found, should be equal to 1
48 echo -e "\n Error:\n Library file $3 not found in $1 directory!\n"
52 echo -e "\n Error:\n More than one file named $3 was found in $1!\n Library file should be unique!"
55 so_file=`find ${CPP_ROOT_DIR} -name $3` # absolute path of library containing c++ module
56 if [ ${BE_QUIET} -lt 2 ] ; then
57 echo " C++ Component library : ${so_file}"
59 lib_dir=`dirname ${so_file}`
60 lib_file=${3%.so} # name without .so
61 lib_file=${lib_file#lib} # name of library without lib and .so (needed by makefile)
63 # installation directory
68 salomeComponentRoot=${4%%/} # remove trailing slash
70 cd $salomeComponentRoot
71 salomeComponentRoot=`pwd`
73 if [ ${BE_QUIET} -lt 2 ] ; then
74 echo " Salome Component directory : ${salomeComponentRoot}"
78 validate_generation_choices()
84 if [ x${arr[$iCORBA]} == "xyes" ]
86 if [ "x${KERNEL_ROOT_DIR}" == "x" ]
90 if [ ! -f ${KERNEL_ROOT_DIR}/idl/salome/SALOME_Component.idl ]