Salome HOME
- display error message
[tools/hxx2salome.git] / scripts / hxx2salome
1 #!/bin/bash
2 #
3 #
4 # salome2 environment file (.bash or .sh) - can also be specified with -e option
5 ENVIRON_FILE=
6 # if present, hxx2salome will try to compile new module, by sourcing ENVIRON_FILE file, and executing
7 # build_configure, configure, make & make install
8 # remark : hxx2salome has to be lanched with clean PATH, LD_LIBRARY_PATH & PYTHONPATH variables!
9 #
10 # options you want to pass to configure
11 CONFIGURE_OPTION=
12 #
13 #
14 usage()
15 {
16     echo -e "\n  Usage :\n"
17     echo -e "  Set HXX2SALOME_ROOT_DIR variable"
18     echo -e "  ${HXX2SALOME_ROOT_DIR}/hxx2salome [options] "
19     echo -e "             cppComponent_root_dir cppComponent.hxx"
20     echo -e "             libcppComponent.so salomeComponentRoot\n"
21     echo -e "     - cppComponent_root_dir : install directory (absolute path)"
22     echo -e "                               of the c++ component\n"
23     echo -e "     - cppComponent.hxx      : header of the component"
24     echo -e "     - libcppComponent.so    : library\n"
25     echo -e "       (cppComponent.hxx and libcppComponent.so have to be found"
26     echo -e "        in cppComponent_root_dir)\n"
27     echo -e "     - salomeComponentRoot   : directory of the source/build/install"
28     echo -e "                               of the Salome component\n"
29     echo -e "\n  Options :"
30     echo -e "    -h : help"
31     echo -e "    -e environment_script : to specify the name of a environment file that will be updated with new necessary commands"
32     echo -e "                            (this file is also used for sourcing environment before compilation if it has sh or bash syntax,"
33     echo -e "                             if the syntax is csh, it is not sourced and for compiling (-c option) environment must be set up before)"
34     echo -e "    -s script_extension   : to use if your environment file name doesn't have extension"
35     echo -e "    -c                    : to compile after generation"
36     echo -e "                            (use this option only if you don't have dependencies in your header or libraries"
37     echo -e "                             if it is the case, you'll have to adapt your Makefile.in" 
38     echo -e "    -l                    : to launch salome "
39     exit
40 }
41 #
42 welcome()
43 {
44     echo -e "\n\n"
45     echo  "----------------------------------------------------------------------------"
46     echo
47     echo  "                              hxx2salome"
48     echo
49     echo  "     Automatic generation of a Salome2 component from a C++ component"
50     echo 
51     echo  "----------------------------------------------------------------------------"
52     echo 
53     echo 
54     echo 
55 }
56
57 check_arguments()
58 {
59
60     # check if $1 is a directory
61     echo -e "-> check arguments\n"
62     if [ ! -d $1 ]
63     then
64        echo -e "Error : directory $1 does not exist!\n"
65        usage
66     fi
67     CPP_ROOT_DIR=${1%%/} # remove trailing slash if present 
68     echo "    C++ Component directory : ${CPP_ROOT_DIR}"
69
70     # look for include file $2 - check number of files found and extension
71     nb=`find ${CPP_ROOT_DIR} -name $2 | wc -l` # number of files found, should be equal to 1
72     extension=${2##*\.}
73     if [ $nb -eq 0 ]
74     then
75           echo -e "\n  Error:\n  Include file $2 not found in $1 directory!\n"
76           usage
77     elif [ $nb -ge 2 ]
78     then
79          echo -e "\n  Error:\n  More than one file named $2 was found in $1!\n  Include file should be unique!"
80          usage
81     elif [ $extension != "hxx" -a $extension != "hh" -a $extension != "h" ]
82     then
83          echo -e "\n  Error:\n  Extension=$extension\n  Include file $2 should have extension .hxx .hh or .h !\n"
84          usage
85     fi
86     hxx_file=`find ${CPP_ROOT_DIR} -name $2` # name of c++ header we will parse to generate salome module
87     hxx=$2
88     echo "    C++ Component header    : ${hxx_file}"
89     hxx_dir=`dirname ${hxx_file}`
90
91     # look for library $3
92     nb=`find ${CPP_ROOT_DIR} -name $3 | wc -l` # number of files found, should be equal to 1
93     if [ $nb -eq 0 ]
94     then
95         echo -e "\n  Error:\n  Library file $3 not found in $1 directory!\n"
96         usage
97     elif [ $nb -ge 2 ]
98     then
99         echo -e "\n  Error:\n  More than one file named $3 was found in $1!\n  Library file should be unique!"
100         usage
101     fi
102     so_file=`find ${CPP_ROOT_DIR} -name $3` # absolute path of library containing c++ module
103     echo "    C++ Component library   : ${so_file}"
104     lib_dir=`dirname ${so_file}`
105     lib_file=${3%.so} # name without .so
106     lib_file=${lib_file#lib} # name of library without lib and .so (needed by makefile)
107
108     # installation directory
109     if [[ ! -d $4 ]]
110     then
111        mkdir -p $4
112     fi
113     salomeComponentRoot=${4%%/} # remove trailing slash
114     echo "    Salome Component directory : ${salomeComponentRoot}"
115 }
116
117 # retrieve python test file ending up with _test.py
118 get_python_test_file()
119 {
120     cd ${CPP_ROOT_DIR}
121     for file in `find . -name "*_test.py"`
122     do
123        cp $file ${tmp_dir}/${CLASS_NAME}_SRC/src/${CLASS_NAME}
124        python_test_file=${python_test_file}" "`basename $file`
125     done
126     echo -e "\nList of exported python file test : $python_test_file \n"
127     cd -
128 }
129
130 create_component_tree()
131 {
132     INSTALL_DIR=${salomeComponentRoot}/${CLASS_NAME}
133
134     export NEW_COMPONENT_SRC_DIR=${INSTALL_DIR}/${CLASS_NAME}_SRC
135     export NEW_COMPONENT_BUILD_DIR=${INSTALL_DIR}/${CLASS_NAME}_BUILD
136     export NEW_COMPONENT_ROOT_DIR=${INSTALL_DIR}/${CLASS_NAME}_INSTALL
137
138     \rm -rf ${NEW_COMPONENT_SRC_DIR}
139     mkdir -p ${NEW_COMPONENT_SRC_DIR}
140 }
141
142
143 get_info_makefile()
144 {
145     makefile_lib="-L\${${CLASS_NAME}_CPP_ROOT}${lib_dir#${CPP_ROOT_DIR}} -l${lib_file}"
146     makefile_include="-I\${${CLASS_NAME}_CPP_ROOT}${hxx_dir#${CPP_ROOT_DIR}}"
147     
148     echo -e "\nlinking option : $makefile_lib"
149     echo -e "include option : $makefile_include"
150 }
151
152 generate_module_source()
153 {
154 #
155 # go in temporary directory to work on code generation
156     cd ${tmp_dir}
157 #
158 #
159 # -------------------------  parse hxx file and generate code  ---------------------------------------
160 #
161     echo -e "\n-> Extract public functions\n"
162     cat ${hxx_file} | awk -f ${gene_dir}/parse01.awk | awk -f ${gene_dir}/parse1.awk > ${CLASS_NAME}_public_functions
163     cat ${CLASS_NAME}_public_functions
164     if [ ! -s ${CLASS_NAME}_public_functions ]
165     then
166         echo -e "\nError:\n  Sorry - No compatible function was found!\n  Please check your header file\n"
167         exit
168     fi
169 #
170     echo -e "\n\n-> Parse public functions and generate Salome2 files\n\n  compatibility      function\n"
171     cat ${CLASS_NAME}_public_functions | awk -f ${gene_dir}/parse2.awk |\
172     awk -v class_name=${CLASS_NAME} -f ${gene_dir}/parse3.awk
173 #
174 # outputs
175     echo -e "\n  IDL file:"
176     cat parse_result > hxx2salome_journal
177     echo -e "\n----------------- IDL file ------------------\n">>hxx2salome_journal
178     cat code_idl >> hxx2salome_journal
179     cat code_idl
180     echo -e "\n----------------- hxx file ------------------\n" >> hxx2salome_journal
181     cat code_hxx >> hxx2salome_journal
182     echo -e "\n----------------- cxx file ------------------\n" >> hxx2salome_journal
183     cat code_cxx >> hxx2salome_journal
184     echo
185 #
186 #
187 # -------------------  duplicates template module and insert generated code  ------------------------------
188 #
189     echo -e "\n-> Duplicate template module" | tee hxx2salome_journal
190     tar xvfz ${gene_dir}/template_src.tgz >> hxx2salome_journal
191     mv TEMPLATE_SRC ${CLASS_NAME}_SRC
192     ${gene_dir}/renameSalomeModule -i TEMPLATE ${CLASS_NAME} ${CLASS_NAME}_SRC >> hxx2salome_journal
193 #
194     echo -e "\n-> Substitute generated code in idl file"
195     echo "// this idl file was generated by hxx2salome" > tmpfile
196     cat ${CLASS_NAME}_SRC/idl/${CLASS_NAME}_Gen.idl |awk ' 
197         $0 ~ "HXX2SALOME_IDL_CODE" {system("cat code_idl >> tmpfile")} 
198         $0 != "HXX2SALOME_IDL_CODE" { print $0 >> "tmpfile" }'
199     mv tmpfile ${CLASS_NAME}_SRC/idl/${CLASS_NAME}_Gen.idl
200 #
201     echo -e "\n-> Substitute generated code in hxx file"
202     echo "// this hxx file was generated by hxx2salome" > tmpfile
203     cat ${CLASS_NAME}_SRC/src/${CLASS_NAME}/${CLASS_NAME}_i.hxx |awk '
204         $0 ~ "HXX2SALOME_HXX_CODE" {system("cat code_hxx >> tmpfile")}
205         $0 !~ "HXX2SALOME" { print $0 >> "tmpfile" }'
206     mv tmpfile ${CLASS_NAME}_SRC/src/${CLASS_NAME}/${CLASS_NAME}_i.hxx
207 #
208     echo -e "\n-> Substitute generated code in cxx file"
209     echo "// this cxx file was generated by hxx2salome" > tmpfile
210     cat ${CLASS_NAME}_SRC/src/${CLASS_NAME}/${CLASS_NAME}_i.cxx |awk -v cpp_include=$hxx '
211         $0 ~ "HXX2SALOME_CXX_CODE" {system("cat code_cxx >> tmpfile")}
212         $0 ~ "HXX2SALOME_CPP_INCLUDE" { printf "#include \"%s\"\n",cpp_include >> "tmpfile" }
213         $0 !~ "HXX2SALOME" { print $0 >> "tmpfile" }'
214     mv tmpfile ${CLASS_NAME}_SRC/src/${CLASS_NAME}/${CLASS_NAME}_i.cxx
215 #
216 # add flags in makefile
217     get_python_test_file
218     get_info_makefile
219     
220     echo -e "\n-> Substitute flags in Makefile.in"
221     sed "s?HXX2SALOME_INCLUDE?${makefile_include}?g
222          s?HXX2SALOME_PYTHON_FILE?${python_test_file}?g
223          s?HXX2SALOME_LIB?${makefile_lib}?g
224         " ${CLASS_NAME}_SRC/src/${CLASS_NAME}/Makefile.in > tmpfile
225     mv tmpfile ${CLASS_NAME}_SRC/src/${CLASS_NAME}/Makefile.in
226 #
227 # generate component catalog
228     echo -e "\n-> Generate component catalog" | tee hxx2salome_journal
229     if [ -f ${KERNEL_ROOT_DIR}/bin/salome/runIDLparser ]
230     then
231        idlparser=${KERNEL_ROOT_DIR}/bin/salome/runIDLparser
232     else
233        idlparser=${gene_dir}/runIDLparser
234     fi
235     cd ${CLASS_NAME}_SRC/resources
236     VER=`cat ${KERNEL_ROOT_DIR}/bin/salome/VERSION | awk ' { print $NF }'` # extract number of version 
237     ${idlparser} -Wbcatalog=tmp.xml,icon=${CLASS_NAME}.png,version=${VER} -I${KERNEL_ROOT_DIR}/idl/salome -I${MED_ROOT_DIR}/idl/salome ../idl/${CLASS_NAME}_Gen.idl >& /dev/null | tee  hxx2salome_journal
238     cat tmp.xml | sed 's/_Gen//g' > ${CLASS_NAME}Catalog.xml
239     rm tmp.xml
240 #
241 }
242
243 compile()
244 {
245     echo "----------------- Configure -------------------"
246     
247     echo "----------------- Compile ---------------------"
248     make 
249     if [ $? -eq 0 ]
250     then
251         # compilation succeeded : we make install
252         echo
253         echo "----------------- Install ---------------------"
254         make install
255     else
256         exit 1
257     fi
258 }
259
260 update_environment()
261 {
262     if [ -z ${ENVIRON_FILE} ]
263     then
264         ENVIRON_FILE="${NEW_COMPONENT_SRC_DIR}/env_${CLASS_NAME}.${SHELL_EXT}"
265     fi
266
267     echo -e "\nEnvironment file : ", $ENVIRON_FILE
268     if [ -e ${ENVIRON_FILE} ]
269     then
270         cp ${ENVIRON_FILE} ${ENVIRON_FILE}.old
271     fi
272     touch ${ENVIRON_FILE}
273
274     if [ "${SHELL_EXT}" == "csh" ]
275     then
276         grep -q " ${CLASS_NAME}_SRC_DIR" ${ENVIRON_FILE}
277         res=$?
278         if [ $res == 1 ]
279         then
280             echo -e "###\n#------ ${CLASS_NAME}-Src ------" >>  ${ENVIRON_FILE}
281             echo -e "setenv ${CLASS_NAME}_BASE ${INSTALL_DIR}" >> ${ENVIRON_FILE}
282             echo -e "setenv ${CLASS_NAME}_SRC_DIR \${${CLASS_NAME}_BASE}/${CLASS_NAME}_SRC\n" >> ${ENVIRON_FILE}
283         fi
284         
285         grep -q " ${CLASS_NAME}_ROOT_DIR" ${ENVIRON_FILE}
286         res=$?
287         if [ $res == 1 ]
288         then
289             echo -e "###\n#------ ${CLASS_NAME}-Bin ------" >>  ${ENVIRON_FILE}
290             echo -e "setenv ${CLASS_NAME}_ROOT_DIR \${${CLASS_NAME}_BASE}/${CLASS_NAME}_INSTALL" >> ${ENVIRON_FILE}
291             echo -e "setenv ${CLASS_NAME}_CPP_ROOT ${CPP_ROOT_DIR}" >> ${ENVIRON_FILE}
292             echo -e "setenv LD_LIBRARY_PATH \${${CLASS_NAME}_CPP_ROOT}${lib_dir#${CPP_ROOT_DIR}}:\${LD_LIBRARY_PATH}" >> ${ENVIRON_FILE}
293         fi
294     fi
295     if [ "${SHELL_EXT}" == "sh" ]
296     then
297         grep -q " ${CLASS_NAME}_SRC_DIR=" ${ENVIRON_FILE}
298         res=$?
299         if [ $res == 1 ]
300         then
301             echo -e "###\n#------ ${CLASS_NAME}-Src ------" >>  ${ENVIRON_FILE}
302             echo -e "export ${CLASS_NAME}_BASE=${INSTALL_DIR}" >> ${ENVIRON_FILE}
303             echo -e "export ${CLASS_NAME}_SRC_DIR=\${${CLASS_NAME}_BASE}/${CLASS_NAME}_SRC\n" >> ${ENVIRON_FILE}
304         fi
305         
306         grep -q " ${CLASS_NAME}_ROOT_DIR=" ${ENVIRON_FILE}
307         res=$?
308         if [ $res == 1 ]
309         then
310             echo -e "###\n#------ ${CLASS_NAME}-Bin ------" >>  ${ENVIRON_FILE}
311             echo -e "export ${CLASS_NAME}_ROOT_DIR=\${${CLASS_NAME}_BASE}/${CLASS_NAME}_INSTALL" >> ${ENVIRON_FILE}
312             echo -e "export ${CLASS_NAME}_CPP_ROOT=${CPP_ROOT_DIR}" >> ${ENVIRON_FILE}
313             echo -e "export LD_LIBRARY_PATH=\${${CLASS_NAME}_CPP_ROOT}${lib_dir#${CPP_ROOT_DIR}}:\${LD_LIBRARY_PATH}" \
314             >> ${ENVIRON_FILE}
315         fi
316         
317     fi
318 }
319
320 copy_component_source()
321 {
322     mv ${tmp_dir}/${CLASS_NAME}_SRC/* ${NEW_COMPONENT_SRC_DIR}
323 }
324
325 good_bye()
326 {
327     echo -e "\n\nModule was created in ${NEW_COMPONENT_SRC_DIR}"
328     echo -e "\nTo compile it, do the following : \n"
329     echo -e "\tsource ${ENVIRON_FILE}"
330     echo -e "\tcd \${${CLASS_NAME}_SRC_DIR}"
331     echo -e "\t./build_configure"
332     echo -e "\tmkdir -p \${${CLASS_NAME}_BUILD_DIR}"
333     echo -e "\tcd \${${CLASS_NAME}_BUILD_DIR}"
334     echo -e "\t\${${CLASS_NAME}_SRC_DIR}/configure ${CONFIGURE_OPTION} --prefix=\${${CLASS_NAME}_ROOT_DIR}"
335     echo -e "\tmake"
336     echo -e "\tmake install"
337     echo -e "\nTo use it :\n"
338     echo -e "\tsource the Salome environment"
339     echo -e "\tsource the component environment file (${ENVIRON_FILE})"
340     echo -e "\trun Salome"
341     echo -e "\tadd ${CLASS_NAME} to the Salome modules list"
342     echo -e "\t\t(with the --modules option of the runSalome command or"
343     echo -e "\t\tby editing the ~/.salome_2.2.4/salome.launch file)"
344     echo -e "\nIf the header of your component includes other headers that are not in the same directories,"
345     echo -e "or if yout library has dependencies you want to specify,"
346     echo -e "you'll have to modify the following Makefile:in : "
347     echo -e "\t\${${CLASS_NAME}_SRC_DIR}/src/${CLASS_NAME}/Makefile.in"
348 }
349
350 launch_salome()
351 {
352     ${KERNEL_ROOT_DIR}/bin/salome/runSalome --gui --modules=GEOM,SMESH,VISU,SUPERV,MED,`echo ${CLASS_NAME}`  --containers=cpp,python --killall
353 }
354
355 compile_module()
356 {
357     if [ ! -d ${NEW_COMPONENT_BUILD_DIR} ]
358     then
359         mkdir -p ${NEW_COMPONENT_BUILD_DIR}
360     fi
361     if [ ! -d ${NEW_COMPONENT_ROOT_DIR} ]
362     then
363         mkdir -p ${NEW_COMPONENT_ROOT_DIR}
364     fi
365     \rm -rf ${NEW_COMPONENT_ROOT_DIR}/* ${NEW_COMPONENT_BUILD_DIR}/*
366
367 #    source ${ENVIRON_FILE}
368     echo 
369     echo -e "\n-> Build Configure"
370     cd ${NEW_COMPONENT_SRC_DIR}
371     ./build_configure
372     cd ${NEW_COMPONENT_BUILD_DIR}
373     echo -e "\n-> Configure in ${NEW_COMPONENT_BUILD_DIR}"
374     echo -e "\n-> Install in ${NEW_COMPONENT_ROOT_DIR}"
375     ${NEW_COMPONENT_SRC_DIR}/configure ${CONFIGURE_OPTION} --prefix=${NEW_COMPONENT_ROOT_DIR}
376     echo
377
378     if [[ $do_compile -eq 1 ]]
379     then
380         compile
381     fi
382     
383     if [[ $do_launch -eq 1 ]]
384     then
385         launch_salome
386     fi
387 }
388 #
389 #
390 # ------------------------------------------------------------------------
391 # --------------------------- MAIN PROGRAM -------------------------------
392 # ------------------------------------------------------------------------
393 #
394 CPP_ROOT_DIR=
395 NEW_COMPONENT_ROOT_DIR=
396 NEW_COMPONENT_SRC_DIR=
397 NEW_COMPONENT_BUILD_DIR=
398 do_compile=0
399 do_launch=0
400 #
401 welcome # print some welcome info
402 #
403 while getopts "cs:e:h:l" Option
404 do
405    case $Option in
406      h) usage
407         exit;;
408      e) ENVIRON_FILE=$OPTARG;;
409      s) case $OPTARG in
410             bash) SHELL_EXT=sh;;
411             csh)  SHELL_EXT=csh;;      
412             *)    SHELL_EXT=sh;;
413         esac;;
414      c) do_compile=1;;
415      l) do_launch=1;;
416      *) echo "Unimplemented option chosen : $Option."
417         usage
418         exit;;   # DEFAULT
419    esac
420 done
421
422 shift $(($OPTIND - 1))
423
424 # check number of other arguments
425 #
426 if [ $# -ne 4 ]
427 then
428    echo -e "\nBad number of arguments\n\n"
429    usage
430    exit
431 fi
432
433 check_arguments $1 $2 $3 $4
434
435 # if there is a sh compatible environment file, source it
436 if [[ -n ${ENVIRON_FILE} && -f ${ENVIRON_FILE} ]]
437 then
438    # analyse extension of environment file
439    case ${ENVIRON_FILE##*\.} in 
440        bash) SHELL_EXT=sh;;
441        ksh)  SHELL_EXT=sh;;
442        csh)  SHELL_EXT=csh;;
443        sh)   SHELL_EXT=sh;;
444    esac
445 fi
446
447 # Environment policy :
448 #   - an existing sh file was specified : we source environment file
449 #   - else (no file or csh syntax)      : we don't source environment file, and do compile 
450 #                                         only if KERNEL_ROOT_DIR and MED_ROOT_DIR are defined
451 if [ "${SHELL_EXT}" == "sh" ] && [ ${ENVIRON_FILE} ] && [ -f ${ENVIRON_FILE} ]
452 then
453    echo -e "\n    Environment file with sh syntax specified => we source ${ENVIRON_FILE}"
454    source ${ENVIRON_FILE}
455 else
456    if [ ${KERNEL_ROOT_DIR} ] && [ -d ${KERNEL_ROOT_DIR} ] && [ ${MED_ROOT_DIR} ] && [ -d ${MED_ROOT_DIR} ]
457    then
458        # if KERNEL_ROOT_DIR and MED_ROOT_DIR are defined, we consider that environment is set
459        echo -e "\n    Environment already set (KERNEL_ROOT_DIR and MED_ROOT_DIR are defined)"
460    else
461        if [ $do_compile -eq 1 ]
462        then 
463           echo -e "\n    Warning - Cannot compile : Environment shoud be set up before, or specify a environment file with sh syntax!\n"
464           do_compile=0
465        fi
466    fi
467 fi
468
469 #
470 if [ ${HXX2SALOME_ROOT_DIR} ] && [ -d ${HXX2SALOME_ROOT_DIR} ]
471 then
472     gene_dir=${HXX2SALOME_ROOT_DIR}
473 else
474     gene_dir=`pwd` # case where hxx2salome was launched from HXX2SALOME directory
475 fi
476 echo "    hxx2salome directory : $gene_dir"
477 if [ ! -f ${gene_dir}/parse1.awk -o ! -f ${gene_dir}/parse2.awk ] # check if script are found
478 then
479     echo -e "\nError : Variable HXX2SALOME_ROOT_DIR shoud be set, or hxx2salome should be launched localy from bin directory"
480     usage
481 fi
482 #
483 # get class name
484 #
485 CLASS_NAME=`awk '$1 == "class" && $0 !~ /;/ {print $2}' ${hxx_file}`
486 echo "    Name of class :" $CLASS_NAME
487 if [ ! $CLASS_NAME ]
488 then
489     echo -e "\nError:\n  Sorry - No class definition was found!\n  Please check your header file\n"
490     exit
491 fi
492
493 #
494 # create temporary working directory
495 #
496 tmp_dir="/tmp/${USER}/${CLASS_NAME}"
497 if [ -d ${tmp_dir} ]
498 then
499     rm -rf ${tmp_dir}/*
500 else
501     mkdir -p ${tmp_dir}
502 fi
503
504 #
505 # ---------------------  Generation of module source from template ------------------------------------------
506 #
507 get_info_makefile
508 generate_module_source
509
510 #
511 # ---------------------- Installation of new module sources  ------------------------------------------------
512 #
513 create_component_tree
514
515 #
516 # ---------------------- Modification of Salome environment file  -------------------------------------------
517 #
518 update_environment
519 export `echo ${CLASS_NAME}`_ROOT_DIR=${NEW_COMPONENT_ROOT_DIR}  # to avoid resource env for compiling and launching salome
520 export `echo ${CLASS_NAME}`_CPP_ROOT=${CPP_ROOT_DIR}  # idem
521 #
522 # ---------------------- Copy the generated source from temp dir  -------------------------------------------
523 #
524 copy_component_source
525
526 #
527 # ---------------------- If requested, compilation of the Salome component ----------------------------------
528 if [ ${do_compile} -eq 1 ]
529 then
530     compile_module
531 else
532     good_bye
533 fi
534
535 echo -e "\nGeneration done\n"