2003-05-19 19:18:36 +06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#
|
|
|
|
# Tool for updating list of .in file for the SALOME project
|
|
|
|
# and regenerating configure script
|
|
|
|
#
|
|
|
|
# Author : Marc Tajchman - CEA
|
|
|
|
# Date : 10/10/2002
|
2007-04-13 20:53:27 +06:00
|
|
|
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
2003-05-19 19:18:36 +06:00
|
|
|
# $Header$
|
|
|
|
#
|
|
|
|
|
|
|
|
ORIG_DIR=`pwd`
|
|
|
|
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
|
2007-08-21 14:30:33 +06:00
|
|
|
SMESH_WITH_GUI="yes"
|
2003-05-19 19:18:36 +06:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Test if the KERNEL_ROOT_DIR is set correctly
|
|
|
|
|
|
|
|
if test ! -d "${KERNEL_ROOT_DIR}"; then
|
|
|
|
echo "failed : KERNEL_ROOT_DIR variable is not correct !"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Test if the KERNEL_SRC is set correctly
|
|
|
|
|
|
|
|
#if test ! -d "${KERNEL_SRC}"; then
|
|
|
|
# echo "failed : KERNEL_SRC variable is not correct !"
|
|
|
|
# exit
|
|
|
|
#fi
|
2006-03-13 20:29:49 +05:00
|
|
|
|
2007-08-21 14:30:33 +06:00
|
|
|
for option
|
|
|
|
do
|
|
|
|
case $option in
|
|
|
|
-with-ihm | --with-ihm)
|
|
|
|
SMESH_WITH_GUI="yes"
|
|
|
|
break;;
|
|
|
|
-without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
|
|
|
|
SMESH_WITH_GUI="no"
|
|
|
|
break;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2006-03-13 20:29:49 +05:00
|
|
|
########################################################################
|
|
|
|
# Test if the GUI_ROOT_DIR is set correctly
|
|
|
|
|
2007-08-21 14:30:33 +06:00
|
|
|
if test ${SMESH_WITH_GUI} = yes; then
|
|
|
|
if test ! -d "${GUI_ROOT_DIR}"; then
|
|
|
|
echo "failed : GUI_ROOT_DIR variable is not correct !"
|
|
|
|
exit
|
|
|
|
fi
|
2006-03-13 20:29:49 +05:00
|
|
|
fi
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Test if the MED_ROOT_DIR is set correctly
|
|
|
|
|
|
|
|
if test ! -d "${MED_ROOT_DIR}"; then
|
|
|
|
echo "failed : MED_ROOT_DIR variable is not correct !"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Test if the GEOM_ROOT_DIR is set correctly
|
|
|
|
|
|
|
|
if test ! -d "${GEOM_ROOT_DIR}"; then
|
|
|
|
echo "failed : GEOM_ROOT_DIR variable is not correct !"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2003-05-19 19:18:36 +06:00
|
|
|
|
|
|
|
cd ${CONF_DIR}
|
|
|
|
ABS_CONF_DIR=`pwd`
|
|
|
|
|
2007-08-21 14:30:33 +06:00
|
|
|
#######################################################################
|
|
|
|
# Update configure.ac script: to set SMESH_WITH_GUI variable
|
|
|
|
sed -e s/SMESH_WITH_GUI=[a-z]*/SMESH_WITH_GUI=${SMESH_WITH_GUI}/g configure.ac > configure.tmp
|
|
|
|
mv -f configure.tmp configure.ac
|
|
|
|
|
2007-04-13 20:53:27 +06:00
|
|
|
mkdir -p salome_adm/unix/config_files
|
2007-06-27 19:10:19 +06:00
|
|
|
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
|
|
|
|
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
|
2007-04-13 20:53:27 +06:00
|
|
|
|
|
|
|
cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
|
|
|
|
|
2007-06-27 19:10:19 +06:00
|
|
|
#cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
|
|
|
#cp -f ${MED_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
|
|
|
#cp -f ${GEOM_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
2007-04-13 20:53:27 +06:00
|
|
|
|
2007-04-20 14:36:13 +06:00
|
|
|
# remove KERNEL deprecated configure files
|
2007-06-25 15:04:02 +06:00
|
|
|
#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
|
|
|
|
# check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
|
|
|
|
# check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
|
|
|
|
# do
|
|
|
|
# rm -f salome_adm/unix/config_files/${deprecated}
|
|
|
|
# done
|
2007-04-20 14:36:13 +06:00
|
|
|
|
|
|
|
|
2007-04-13 20:53:27 +06:00
|
|
|
# ____________________________________________________________________
|
|
|
|
# aclocal creates the aclocal.m4 file from the standard macro and the
|
|
|
|
# custom macro embedded in the directory salome_adm/unix/config_files
|
|
|
|
# and KERNEL config_files directory.
|
|
|
|
# output:
|
|
|
|
# aclocal.m4
|
|
|
|
# autom4te.cache (directory)
|
|
|
|
echo "====================================================== aclocal"
|
|
|
|
|
2007-08-21 14:30:33 +06:00
|
|
|
if test ${SMESH_WITH_GUI} = yes; then
|
|
|
|
aclocal -I adm_local/unix/config_files \
|
|
|
|
-I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
|
|
|
|
-I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
|
|
|
|
-I ${MED_ROOT_DIR}/adm_local/unix/config_files \
|
|
|
|
-I ${GEOM_ROOT_DIR}/adm_local/unix/config_files || exit 1
|
|
|
|
else
|
|
|
|
aclocal -I adm_local/unix/config_files \
|
|
|
|
-I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
|
|
|
|
-I ${MED_ROOT_DIR}/adm_local/unix/config_files \
|
|
|
|
-I ${GEOM_ROOT_DIR}/adm_local/unix/config_files || exit 1
|
|
|
|
fi
|
2007-04-13 20:53:27 +06:00
|
|
|
|
|
|
|
# ____________________________________________________________________
|
|
|
|
# libtoolize creates some configuration files (ltmain.sh,
|
|
|
|
# config.guess and config.sub). It only depends on the libtool
|
|
|
|
# version. The files are created in the directory specified with the
|
|
|
|
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
|
|
|
|
# output:
|
|
|
|
# salome_adm/unix/config_files/config.guess
|
|
|
|
# salome_adm/unix/config_files/config.sub
|
|
|
|
# salome_adm/unix/config_files/ltmain.sh
|
|
|
|
#echo "====================================================== libtoolize"
|
|
|
|
|
|
|
|
libtoolize --force --copy --automake || exit 1
|
|
|
|
|
|
|
|
# ____________________________________________________________________
|
|
|
|
# autoconf creates the configure script from the file configure.ac (or
|
|
|
|
# configure.in if configure.ac doesn't exist)
|
|
|
|
# output:
|
|
|
|
# configure
|
|
|
|
echo "====================================================== autoconf"
|
|
|
|
|
|
|
|
autoconf
|
|
|
|
|
|
|
|
# ____________________________________________________________________
|
|
|
|
# automake creates some scripts used in building process
|
|
|
|
# (install-sh, missing, ...). It only depends on the automake
|
|
|
|
# version. The files are created in the directory specified with the
|
|
|
|
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
|
|
|
|
# creates the Makefile.in files from the Makefile.am files.
|
|
|
|
# output:
|
|
|
|
# salome_adm/unix/config_files/compile
|
|
|
|
# salome_adm/unix/config_files/depcomp
|
|
|
|
# salome_adm/unix/config_files/install-sh
|
|
|
|
# salome_adm/unix/config_files/missing
|
|
|
|
# salome_adm/unix/config_files/py-compile
|
|
|
|
# Makefile.in (from Makefile.am)
|
|
|
|
echo "====================================================== automake"
|
|
|
|
|
|
|
|
automake --copy --gnu --add-missing
|