]> SALOME platform Git repositories - plugins/ghs3dplugin.git/blob - build_configure
Salome HOME
Using Automake for building procedure
[plugins/ghs3dplugin.git] / build_configure
1 #!/bin/bash
2
3 #
4 # Tool for updating list of .in file for the SALOME project 
5 # and regenerating configure script
6 #
7 # Author : Marc Tajchman - CEA
8 # Date : 10/10/2002
9 # $Header$
10 #
11
12 ORIG_DIR=`pwd`
13 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
14
15 ########################################################################
16 # Test if the KERNEL_ROOT_DIR is set correctly
17
18 if test ! -d "${KERNEL_ROOT_DIR}"; then
19     echo "failed : KERNEL_ROOT_DIR variable is not correct !"
20     exit
21 fi
22
23 # Test if the KERNEL_SRC is set correctly
24
25 #if test ! -d "${KERNEL_SRC}"; then
26 #    echo "failed : KERNEL_SRC variable is not correct !"
27 #    exit
28 #fi
29
30 ########################################################################
31 # Test if the GUI_ROOT_DIR is set correctly
32
33 if test ! -d "${GUI_ROOT_DIR}"; then
34     echo "failed : GUI_ROOT_DIR variable is not correct !"
35     exit
36 fi
37
38 ########################################################################
39 # Test if the GEOM_ROOT_DIR is set correctly
40
41 if test ! -d "${GEOM_ROOT_DIR}"; then
42     echo "failed : GEOM_ROOT_DIR variable is not correct !"
43     exit
44 fi
45
46 ########################################################################
47 # Test if the SMESH_ROOT_DIR is set correctly
48
49 if test ! -d "${SMESH_ROOT_DIR}"; then
50     echo "failed : SMESH_ROOT_DIR variable is not correct !"
51     exit
52 fi
53
54 cd ${CONF_DIR}
55 ABS_CONF_DIR=`pwd`
56
57 mkdir -p salome_adm/unix/config_files
58 cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
59 cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
60
61 cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
62
63 cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
64 cp -f ${GEOM_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
65 cp -f ${SMESH_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
66
67 # remove KERNEL deprecated configure files
68 for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
69   check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
70     check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
71     do
72       rm -f salome_adm/unix/config_files/${deprecated}
73       done
74
75
76 # ____________________________________________________________________
77 # aclocal creates the aclocal.m4 file from the standard macro and the
78 # custom macro embedded in the directory salome_adm/unix/config_files
79 # and KERNEL config_files directory.
80 # output:
81 #   aclocal.m4
82 #   autom4te.cache (directory)
83 echo "====================================================== aclocal"
84
85 aclocal -I adm_local/unix/config_files -I salome_adm/unix/config_files  || exit 1
86
87 # ____________________________________________________________________
88 # libtoolize creates some configuration files (ltmain.sh,
89 # config.guess and config.sub). It only depends on the libtool
90 # version. The files are created in the directory specified with the
91 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
92 # output:
93 #   salome_adm/unix/config_files/config.guess
94 #   salome_adm/unix/config_files/config.sub
95 #   salome_adm/unix/config_files/ltmain.sh
96 #echo "====================================================== libtoolize"
97
98 libtoolize --force --copy --automake || exit 1
99
100 # ____________________________________________________________________
101 # autoconf creates the configure script from the file configure.ac (or
102 # configure.in if configure.ac doesn't exist)
103 # output:
104 #   configure
105 echo "====================================================== autoconf"
106
107 autoconf
108
109 # ____________________________________________________________________
110 # automake creates some scripts used in building process
111 # (install-sh, missing, ...). It only depends on the automake
112 # version. The files are created in the directory specified with the
113 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
114 # creates the Makefile.in files from the Makefile.am files.
115 # output:
116 #   salome_adm/unix/config_files/compile
117 #   salome_adm/unix/config_files/depcomp
118 #   salome_adm/unix/config_files/install-sh
119 #   salome_adm/unix/config_files/missing
120 #   salome_adm/unix/config_files/py-compile
121 #   Makefile.in (from Makefile.am)
122 echo "====================================================== automake"
123
124 automake --copy --gnu --add-missing