Salome HOME
Implementation of the issue 0020151 (SALOME: Light Python module)
[modules/kernel.git] / build_configure
1 #!/bin/sh
2 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 #
7 #  This library is free software; you can redistribute it and/or
8 #  modify it under the terms of the GNU Lesser General Public
9 #  License as published by the Free Software Foundation; either
10 #  version 2.1 of the License.
11 #
12 #  This library is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 #  Lesser General Public License for more details.
16 #
17 #  You should have received a copy of the GNU Lesser General Public
18 #  License along with this library; if not, write to the Free Software
19 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 #
21 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #
23 # ====================================================================
24 # This script is just here to illustrate the procedure for preparing
25 # the configure process. It creates configuration files (ex:
26 # ltmain.sh) using libtoolize, the aclocal macro, the configure script
27 # using autoconf and some scripts used in building process (ex:
28 # install-sh) using automake. Automake is used here to creates the
29 # files Makefile.in from the files Makefile.am.
30 # ====================================================================
31 # CONF_DIR is the path containing the present script
32 #
33 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
34 cd ${CONF_DIR}
35
36 # ____________________________________________________________________
37 # aclocal creates the aclocal.m4 file from the standard macro and the
38 # custom macro embedded in the directory salome_adm/unix/config_files.
39 # output:
40 #   aclocal.m4
41 #   autom4te.cache (directory)
42 echo "====================================================== aclocal"
43
44 aclocal -I salome_adm/unix/config_files || exit 1
45
46
47 # ____________________________________________________________________
48 # libtoolize creates some configuration files (ltmain.sh,
49 # config.guess and config.sub). It only depends on the libtool
50 # version. The files are created in the directory specified with the
51 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
52 # output:
53 #   salome_adm/unix/config_files/config.guess
54 #   salome_adm/unix/config_files/config.sub
55 #   salome_adm/unix/config_files/ltmain.sh
56 echo "====================================================== libtoolize"
57
58 libtoolize --force --copy --automake || exit 1
59
60
61 # ____________________________________________________________________
62 # autoconf creates the configure script from the file configure.ac (or
63 # configure.in if configure.ac doesn't exist)
64 # output:
65 #   configure
66 echo "====================================================== autoconf"
67
68 autoconf
69
70 # ____________________________________________________________________
71 # autoheader creates config.h.in
72 # output:
73 #   configure
74 #echo "====================================================== autoheader"
75
76 #autoheader
77
78 # ____________________________________________________________________
79 # automake creates some scripts used in building process
80 # (install-sh, missing, ...). It only depends on the automake
81 # version. The files are created in the directory specified with the
82 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
83 # creates the Makefile.in files from the Makefile.am files.
84 # output:
85 #   salome_adm/unix/config_files/compile
86 #   salome_adm/unix/config_files/depcomp
87 #   salome_adm/unix/config_files/install-sh
88 #   salome_adm/unix/config_files/missing
89 #   salome_adm/unix/config_files/py-compile
90 #   Makefile.in (from Makefile.am)
91 echo "====================================================== automake"
92
93 automake --add-missing --copy --gnu
94
95
96 # ____________________________________________________________________
97 #
98 # Note that automake could be executed at last after autoconf. The
99 # order doesn't matter.
100 #
101 # When modifying a Makefile.am file, after a first step of
102 # configure+make, you just have to :
103 # - go to the top source directory and run automake, to rebuild the Makefile.in,
104 # - go to the top build directory and run config.status to rebuild the
105 #   Makefile from the Makefile.in,
106 # - go to the source directory being modified, and then run make.
107 #