Salome HOME
Fix pb with Hexotic environment
[tools/install.git] / config_files / build.csh
index 864b9be1fd7cfcee770a9cfdd779f4790880aec5..10437d3456c96f49c76cd9ee03f1adc430dbee4e 100755 (executable)
@@ -21,7 +21,7 @@ set inst_with_gui=1
 set is_delete=0
 set verbose_level=2
 set params=""
-set modules=(KERNEL GUI GEOM MED SMESH VISU YACS NETGENPLUGIN GHS3DPLUGIN BLSURFPLUGIN HexoticPLUGIN GHS3DPRLPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT PYLIGHT SIERPINSKY RANDOMIZER)
+set modules=(KERNEL GUI GEOM MED SMESH VISU PARAVIS YACS NETGENPLUGIN GHS3DPLUGIN BLSURFPLUGIN HexoticPLUGIN GHS3DPRLPLUGIN COMPONENT PYCALCULATOR CALCULATOR HELLO PYHELLO LIGHT PYLIGHT SIERPINSKY RANDOMIZER HEXABLOCK HEXABLOCKPLUGIN ATOMIC ATOMGEN ATOMSOLV HOMARD JOBMANAGER)
 set optim=""
 set is_install=1
 set is_help=0
@@ -230,13 +230,20 @@ foreach module (${modules})
        #########################################################
        # check if build_configure script exists
        #########################################################
-       if ( ! -e ${module_src}/build_configure ) then
+       if ( ! -e ${module_src}/build_configure && "${module}" != "PARAVIS" ) then
            echo "\!\!\! Warning \!\!\! Can not find build_configure script in ${module_src}."
-       else
+           else
+           if ( "${module}" == "PARAVIS" ) then
+           echo "\!\!\! Warning \!\!\! build_configure step is not executed for ${module}."
+               else
            #########################################################
            # call build_configure
            #########################################################
+           if (! ($?BUILDCONF_OPTS) ) then
+           set mybuildconf_keys=""
+           else
            set mybuildconf_keys="${BUILDCONF_OPTS}"
+           endif    
            if ( $inst_with_gui == 0 ) then
                set mybuildconf_keys="${mybuildconf_keys} --without-gui"
            endif
@@ -249,6 +256,7 @@ foreach module (${modules})
                cat ${LOG_DIR}/build_configure_${module}.log | grep -E "(failed|: error:)" >/dev/stderr
            endif
        endif
+       endif
     endif
     #########################################################
     # deleting build directory if -d flag is given
@@ -302,6 +310,11 @@ foreach module (${modules})
        if ( "$vx" == "" ) then
            set vx=`grep -e "^AC_INIT" ${module_src}/configure.in.base | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
        endif
+    else if ( -e ${module_src}/CMakeLists.txt ) then
+           set ver_maj=`cat ${module_src}/CMakeLists.txt | grep SET\(VERSION_MAJOR | sed -e "s%[A-Z_() ]%%g"`
+           set ver_min=`cat ${module_src}/CMakeLists.txt | grep SET\(VERSION_MINOR | sed -e "s%[A-Z_() ]%%g"`
+           set ver_maintenance=`cat ${module_src}/CMakeLists.txt | grep SET\(VERSION_MAINTENANCE | sed -e "s%[A-Z_() ]%%g"`
+           set vx="${ver_maj}.${ver_min}.${ver_maintenance}"
     endif
     if ( "$vx" != "" ) then
         set vx="_$vx"
@@ -325,10 +338,14 @@ foreach module (${modules})
        #########################################################
        # check if configure script exists
        #########################################################
-       if ( ! -e ${module_src}/configure ) then
+       if ( ! -e ${module_src}/configure  && "${module}" != "PARAVIS" ) then
            echo "\!\!\! Warning \!\!\! Can not find configure script in ${module_src}."
        else
+           if (! ($?BUILDCONF_OPTS) ) then
+           set myconf_keys=""
+           else
            set myconf_keys="${CONF_OPTS}"
+           endif
            if ( $inst_with_gui == 0 ) then
                set myconf_keys="${myconf_keys} --without-gui"
            endif
@@ -338,7 +355,11 @@ foreach module (${modules})
            if ( "${module}" == "NETGENPLUGIN" && ($?NETGENHOME) ) then
                set myconf_keys="${myconf_keys} --with-netgen=${NETGENHOME}"
            endif
-           ${module_src}/configure --prefix=$px ${optim} ${myconf_keys} >& ${LOG_DIR}/configure_${module}.log
+               if ( "${module}" == "PARAVIS" )  then
+                   cd ${module_build}; cmake ${module_src} -DCMAKE_INSTALL_PREFIX=$px >& ${LOG_DIR}/configure_${module}.log
+               else
+                   ${module_src}/configure --prefix=$px ${optim} ${myconf_keys} >& ${LOG_DIR}/configure_${module}.log
+               endif
            #########################################################
            # echo possible errors
            #########################################################