3 # helps bootstrapping am-utils, when checked out from CVS
4 # requires GNU autoconf and GNU automake
5 # this is not meant to go into the distributions
6 # Erez Zadok <ezk@cs.columbia.edu>
9 test -f ..
/amd
/amd.c
&& cd ..
10 if [ ! -f amd
/amd.c
]; then
11 echo "Must run $0 from the top level source directory."
15 # validate macros directory and some macro files
16 if [ ! -d m
4/macros
]; then
17 echo No m
4/macros directory found
!
20 if [ ! -f m
4/macros
/HEADER
]; then
21 echo No m
4/macros
/HEADER
file found
!
25 # remove any remaining autom4te.cache directory
26 rm -fr autom4te.cache autom4te-
*.cache
28 # generate acinclude.m4 file
29 echo "AMU: prepare acinclude.m4..."
30 test -f acinclude.
m4 && mv -f acinclude.
m4 acinclude.
m4.old
32 for i
in HEADER
*.
m4; do
40 # generate aclocal.m4 file
41 echo "AMU: aclocal..."
42 test -f aclocal.
m4 && mv -f aclocal.
m4 aclocal.
m4.old
44 aclocal
--version 2>&1 |
head -1
48 echo "aclocal command failed. fix errors and rerun $0."
52 # produce new configure.in (temp) script
53 echo "AMU: autoconf..."
55 autoconf
--version 2>&1 |
head -1
58 autoconf configure.
in > configure.new
2> ${LOG}
59 # until Automake requires Autoconf 2.50, manual says to ignore this
60 CUTWARNMSG1
="warning: AC_PROG_LEX invoked multiple times|do not use m4_(patsubst|regexp):"
61 egrep -v "${CUTWARNMSG1}" ${LOG} > ${LOG}.new
63 if test -s ${LOG}; then
64 echo "AUTOCONF ERRORS
(MUST FIX
):"
69 # now prepare the real configure script
70 test -f configure && mv -f configure configure.old
71 mv -f configure.new configure
75 # run autoheader to produce C header .in files
76 echo "AMU
: autoheader...
"
78 autoheader --version 2>&1 | head -1
79 autoheader configure.in > config.h.in 2> ${LOG}
80 CUTWARNMSG2="autoheader
: \
`config.h.in' is updated"
81 egrep -v "${CUTWARNMSG2}" ${LOG} > ${LOG}.new
83 if test -s ${LOG}; then
84 echo "AUTOHEADER ERRORS (MUST FIX):"
92 cmd="automake --add-missing --copy --ignore-deps"
93 #cmd="automake --add-missing"
96 automake --version 2>&1 | head -1
100 echo "automake command failed. fix errors and rerun $0."
105 echo "AMU: save timestamp..."
106 echo timestamp > stamp-h.in