Salome HOME
PR: merge from tag BR_CCRT2_mergeto_V2_1_0b1
[modules/kernel.git] / build_configure
index 0cf5fc380ad1cb9c6ef1809fefdc8e7d658e694f..d3294fb598984b68abfa9d9457bb0f874b8c2ece 100755 (executable)
@@ -28,8 +28,11 @@ CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
 
 find_in()
 {
-  local i
-  local f=$2
+#CCRT
+  #local i
+  i=0
+  #local f=$2
+  f=$2
 
 # if the first argument is not a directory, returns
 
@@ -79,9 +82,13 @@ ABS_CONF_DIR=`pwd`
 # Common part of the configure.in file
 #
 chmod u+w configure.in.base
-if ! \cp -f configure.in.base configure.in_tmp1 
+#CCRT
+#if ! \cp -f configure.in.base configure.in_tmp1
+if \cp -f configure.in.base configure.in_tmp1
 then
        echo
+else
+       echo
        echo "error : can't create files in" ${CONF_DIR}
        echo "aborting ..."
         chmod u-w configure.in.base 
@@ -119,7 +126,7 @@ echo "  ./salome_adm/Makefile \\" >> configure.in_tmp1
 touch configure.in_tmp2
 find_in . configure.in_tmp2
 sed '/^...salome_adm/d' configure.in_tmp2 >  configure.in_tmp3
-sed '/configure.in/d' configure.in_tmp3 >  configure.in_tmp2
+sed '/configure.in/d;/make_config.in/d' configure.in_tmp3 >  configure.in_tmp2
 sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1
 
 echo  "])" >> configure.in_tmp1
@@ -149,9 +156,13 @@ then
        fi
 else
        echo -n "Updating 'configure.in' file ... "
-       if ! \cp configure.in configure.in_old >& /dev/null
+#CCRT
+#      if ! \cp configure.in configure.in_old >& /dev/null
+       if \cp configure.in configure.in_old >& /dev/null
        then
                echo
+        else
+               echo
                echo
                echo "Can't backup previous configure.in"
                echo -n "Continue (you will not be able to revert) - (Y/N) ? "
@@ -191,6 +202,23 @@ else
        echo "failed (check file permissions and/or user quotas ...)"
 fi
 
+###############################################################
+# Creating make_config
+#
+if test -f make_config
+then
+       echo -n "Updating 'make_config' script ...  "
+else
+       echo -n "Creating 'make_config' script ...  "
+fi
+
+if autoconf -o make_config make_config.in
+then
+       echo "done"
+else
+       echo "failed (check file permissions and/or user quotas ...)"
+fi
+
 cd ${ORIG_DIR}
 
 echo