]> SALOME platform Git repositories - tools/sat.git/blob - data/templates/Cpp_Template_stda/build_configure
Salome HOME
add the template command
[tools/sat.git] / data / templates / Cpp_Template_stda / build_configure
1 #! /bin/bash
2
3 run() {
4     local logfile=$ORIG_DIR/build_configure.log
5     printf "%-50s" "$1 ... "
6     eval $1 > $logfile 2>&1
7     if test $? != 0 ; then
8         echo "[FAILED]"
9         echo "see file build_configure.log ..."
10         exit 1
11     fi
12     echo "[  OK  ]"
13 }
14
15 # --
16 ORIG_DIR=`pwd`
17
18 ########################################################################
19 #
20 # -- goto build_configure dir
21 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
22 cd ${CONF_DIR}
23 # --
24 # -- list all Makefile.am in Makefile.am.list
25 ./rfind . Makefile.am > Makefile.am.list
26 # --
27 # -- configure.in construction
28 cp configure.in.base configure.in
29 chmod +w configure.in
30 echo "AC_OUTPUT([ \\" >> configure.in
31 sed -e 's,\.am, \\,' -e 's,\.\/,,' Makefile.am.list >> configure.in
32 echo  "])" >> configure.in
33
34 # --
35 run "libtoolize"
36 run "aclocal -I adm/unix/config_files"
37 run "autoconf"
38 run "automake --add-missing --copy"