cvs server: Diffing . Index: ChangeLog =================================================================== RCS file: /cvsroot/autoconf/autoconf/ChangeLog,v retrieving revision 1.1943 diff -u -r1.1943 ChangeLog --- ChangeLog 7 Jun 2002 11:20:19 -0000 1.1943 +++ ChangeLog 10 Jun 2002 03:19:33 -0000 @@ -1,3 +1,15 @@ +2002-06-09 Mark D. Roth + + * configure.ac: add --enable-site-macro-dir option. + * bin/Makefile.am: expand @address@hidden + * bin/autoconf.in: add $AC_MACRO_PATH and site macro dir to + include path. + * bin/autom4te.in: add --prepend-include option. + * doc/autoconf.texi: document use of $AC_MACRO_PATH and site + macro directory, remove note that include path directories are + used in reverse order, and document autom4te --prepend-include. + * lib/autom4te.in: use --prepend-include instead of --include. + 2002-06-07 Akim Demaille * tests/tools.at (autoconf: forbidden tokens, basic) Index: configure.ac =================================================================== RCS file: /cvsroot/autoconf/autoconf/configure.ac,v retrieving revision 1.38 diff -u -r1.38 configure.ac --- configure.ac 22 Apr 2002 14:33:05 -0000 1.38 +++ configure.ac 10 Jun 2002 03:19:33 -0000 @@ -31,6 +31,13 @@ AM_INIT_AUTOMAKE +AC_ARG_ENABLE([site-macro-dir], + AC_HELP_STRING([--enable-site-macro-dir=DIR], + [use site macro directory DIR @<:@DATADIR/autoconf/site_macros@:>@]), + , + [enable_site_macro_dir='${datadir}/autoconf/site_macros']) +AC_SUBST([SITE_MACRO_DIR], "${enable_site_macro_dir}") + # Initialize the test suite and build position independent wrappers. AC_CONFIG_TESTDIR([tests]) AC_CONFIG_FILES([tests/Makefile tests/atlocal]) cvs server: Diffing bin Index: bin/Makefile.am =================================================================== RCS file: /cvsroot/autoconf/autoconf/bin/Makefile.am,v retrieving revision 1.5 diff -u -r1.5 Makefile.am --- bin/Makefile.am 10 Apr 2002 15:58:19 -0000 1.5 +++ bin/Makefile.am 10 Jun 2002 03:19:33 -0000 @@ -45,7 +45,8 @@ -e 's,@M4\@,$(M4),g' \ -e 's,@AWK\@,$(AWK),g' \ -e 's,@VERSION\@,$(VERSION),g' \ - -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' + -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ + -e 's,@SITE_MACRO_DIR\@,$(SITE_MACRO_DIR),g' # autoconf is written in M4sh. AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh Index: bin/autoconf.in =================================================================== RCS file: /cvsroot/autoconf/autoconf/bin/autoconf.in,v retrieving revision 1.147 diff -u -r1.147 autoconf.in --- bin/autoconf.in 22 Apr 2002 09:13:43 -0000 1.147 +++ bin/autoconf.in 10 Jun 2002 03:19:33 -0000 @@ -252,6 +252,16 @@ esac done +# Add $AC_MACRO_PATH +if test -n "${AC_MACRO_PATH}"; then + AUTOM4TE="$AUTOM4TE -I `echo $AC_MACRO_PATH | sed 's/:/ -I /'`"; +fi + +# Add site macro dir +if test "@SITE_MACRO_DIR@" != "no"; then + AUTOM4TE="$AUTOM4TE address@hidden@"; +fi + # Find the input file. case $# in 0) Index: bin/autom4te.in =================================================================== RCS file: /cvsroot/autoconf/autoconf/bin/autom4te.in,v retrieving revision 1.63 diff -u -r1.63 autom4te.in --- bin/autom4te.in 7 Jun 2002 08:03:55 -0000 1.63 +++ bin/autom4te.in 10 Jun 2002 03:19:33 -0000 @@ -389,7 +389,8 @@ The environment variable \`WARNINGS\' is honored. Library directories: - -I, --include=DIR look for FILES in DIR (cumulative) + -i, --prepend-include=DIR prepend directory DIR to search path + -I, --include=DIR append directory DIR to search path Tracing: -t, --trace=MACRO report the MACRO invocations @@ -484,6 +485,7 @@ # Process the arguments for real this time. my @trace; + my @prepend_include; getopt ( # Operation modes: @@ -493,6 +495,7 @@ "M|melt" => \$melt, # Library directories: + "i|prepend-include=s" => address@hidden, "I|include=s" => address@hidden, # Tracing: @@ -525,7 +528,7 @@ # a pain since it introduces a useless difference in the path which # invalidates the cache. And strip `.' which is implicit and always # first. - @include = grep { !/^\.$/ } uniq (@include); + @include = grep { !/^\.$/ } uniq (reverse(@prepend_include), @include); # Convert @trace to %trace, and work around the M4 builtins tracing # problem. @@ -599,13 +602,10 @@ # # Neutralize its stdin, so that GNU M4 1.5 doesn't neutralize SIGINT. # - # Be extremely cautious to reverse the includes when talking to M4: - # it doesn't speak the same --include as we do. - # # We don't output directly to the cache files, to avoid problems # when we are interrupted (that leaves corrupted files). my $command = ("$m4" - . join (' --include=', '', reverse @include) + . join (' --include=', '', @include) . " --define=m4_warnings=$m4_warnings" . ' --debug=aflq' . " --error-output=$tcache" . $req->id . "t" @@ -1056,7 +1056,7 @@ # output but comments and empty lines. my $command = ("$m4" . ' --fatal-warning' - . join (' --include=', '', reverse @include) + . join (' --include=', '', @include) . ' --define=divert' . " @ARGV" . '