Salome HOME
Preparation win32 version
[modules/kernel.git] / build_configure
1 #!/bin/sh
2 # Copyright (C) 2007-2013  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 # ====================================================================
25 # This script is just here to illustrate the procedure for preparing
26 # the configure process. It creates configuration files (ex:
27 # ltmain.sh) using libtoolize, the aclocal macro, the configure script
28 # using autoconf and some scripts used in building process (ex:
29 # install-sh) using automake. Automake is used here to creates the
30 # files Makefile.in from the files Makefile.am.
31 # ====================================================================
32 # CONF_DIR is the path containing the present script
33 #
34 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
35 cd ${CONF_DIR}
36
37 # ____________________________________________________________________
38 # aclocal creates the aclocal.m4 file from the standard macro and the
39 # custom macro embedded in the directory salome_adm/unix/config_files.
40 # output:
41 #   aclocal.m4
42 #   autom4te.cache (directory)
43 echo "====================================================== aclocal"
44
45 aclocal -I salome_adm/unix/config_files || exit 1
46
47
48 # ____________________________________________________________________
49 # libtoolize creates some configuration files (ltmain.sh,
50 # config.guess and config.sub). It only depends on the libtool
51 # version. The files are created in the directory specified with the
52 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
53 # output:
54 #   salome_adm/unix/config_files/config.guess
55 #   salome_adm/unix/config_files/config.sub
56 #   salome_adm/unix/config_files/ltmain.sh
57 echo "====================================================== libtoolize"
58
59 libtoolize --force --copy --automake || exit 1
60
61
62 # ____________________________________________________________________
63 # autoconf creates the configure script from the file configure.ac (or
64 # configure.in if configure.ac doesn't exist)
65 # output:
66 #   configure
67 echo "====================================================== autoconf"
68
69 autoconf
70
71 # ____________________________________________________________________
72 # autoheader creates config.h.in
73 # output:
74 #   configure
75 #echo "====================================================== autoheader"
76
77 #autoheader
78
79 # ____________________________________________________________________
80 # automake creates some scripts used in building process
81 # (install-sh, missing, ...). It only depends on the automake
82 # version. The files are created in the directory specified with the
83 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
84 # creates the Makefile.in files from the Makefile.am files.
85 # output:
86 #   salome_adm/unix/config_files/compile
87 #   salome_adm/unix/config_files/depcomp
88 #   salome_adm/unix/config_files/install-sh
89 #   salome_adm/unix/config_files/missing
90 #   salome_adm/unix/config_files/py-compile
91 #   Makefile.in (from Makefile.am)
92 echo "====================================================== automake"
93
94 automake --add-missing --copy --gnu
95
96
97 # ____________________________________________________________________
98 #
99 # Note that automake could be executed at last after autoconf. The
100 # order doesn't matter.
101 #
102 # When modifying a Makefile.am file, after a first step of
103 # configure+make, you just have to :
104 # - go to the top source directory and run automake, to rebuild the Makefile.in,
105 # - go to the top build directory and run config.status to rebuild the
106 #   Makefile from the Makefile.in,
107 # - go to the source directory being modified, and then run make.
108 #