3 # helps bootstrapping M4, when checked out from CVS
4 # requires GNU Autoconf, GNU Automake, GNU Gettext and GNU Libtool
9 : ${GNULIB_TOOL=gnulib-tool}
10 : ${AUTORECONF=autoreconf}
13 config_aux_dir
=$ltdldir/config
14 config_macro_dir
=$ltdldir/m4
16 # List dependencies here too; we don't extract them, otherwise dependent
17 # modules could end up being imported to src/ *and* gnu/!
18 src_modules
='getopt version-etc-fsf version-etc'
23 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
24 # is ksh but when the shell is invoked as "sh" and the current value of
25 # the _XPG environment variable is not equal to 1 (one), the special
26 # positional parameter $0, within a function call, is the name of the
30 # The name of this program:
31 progname
=`echo "$progpath" | $SED "$basename"`
34 # Echo program name prefixed message.
37 echo $progname: ${1+"$@"}
40 func_echo
"running: ${GNULIB_TOOL} --import"
41 ${GNULIB_TOOL} --import
43 func_echo
"patching include directories in gnulib regex module"
44 mv $config_macro_dir/regex.
m4 $config_macro_dir/regex-m4.old
45 sed 's,lib/regex.c,gnu/regex.c,g' $config_macro_dir/regex-m4.old
> $config_macro_dir/regex.
m4 && \
46 $RM $config_macro_dir/regex-m4.old
48 func_echo
"hiding gnulib jm_\* macros"
49 cat >> $config_macro_dir/gnulib.
m4 <<\EOF
50 AC_DEFUN
([gl_AC_HEADER_INTTYPES_H
], [jm_AC_HEADER_INTTYPES_H
])
51 AC_DEFUN
([gl_AC_HEADER_STDINT_H
], [jm_AC_HEADER_STDINT_H
])
52 AC_DEFUN
([gl_AC_TYPE_UINTMAX_T
], [jm_AC_TYPE_UINTMAX_T
])
55 func_echo
"fetching modules for src directory"
56 gnulibdir
=`which gnulib-tool | $SED "$dirname"`
58 for file in `${GNULIB_TOOL} --extract-filelist $src_modules`; do
60 dest
=`echo $file | $SED "$basename"`
62 lib
/*) dest
=src
/$dest ;;
63 m
4/*) dest
=$config_macro_dir/$dest ;;
64 *) func_echo
"Unknown file: $file"
69 func_echo
"copying file \`$dest'"
70 cp $gnulibdir/$file $dest
73 func_echo
"running: libtoolize --ltdl=\"$ltdldir\" --force --copy"
74 libtoolize
--ltdl="$ltdldir" --force --copy
76 func_echo
"running: $AUTORECONF --force --verbose --install"
77 $AUTORECONF --force --verbose --install
80 func_echo
"generating testsuite"
82 $AWK -f .
/generate.
awk ..
/doc
/m4.texinfo
> generated.
at