Index: ChangeLog from Raja R Harinath * Makefile.am (MAINTAINERCLEANFILES): Add acversion.m4. (INSTALL.txt): Put into $(srcdir). (acversion.m4): Build here ... * configure.in (AC_OUTPUT): Not here. * tests/Makefile.am (MACRO_FILES): Don't use $(top_srcdir). (syntax.m4): Create in $(srcdir). (update.m4): Likewise. * tests/atspecific.m4 (AT_CHECK_UPDATE): Look for autoconf macros in the top source directory. Index: Makefile.am =================================================================== RCS file: /cvs/autoconf/Makefile.am,v retrieving revision 1.27 diff -u -p -u -r1.27 Makefile.am --- Makefile.am 2000/09/04 12:12:21 1.27 +++ Makefile.am 2000/10/12 19:57:59 @@ -54,9 +54,25 @@ $(distpkgdataDATA) CLEANFILES = autoconf.m4f \ $(bin_SCRIPTS) -## --------- ## + +## ------------------ ## +## Maintainer rules. ## +## ------------------ ## + +## acversion.m4. ## + +# - acversion.m4 needs to be updated only once, since it depends on +# configure.in, not on the results of a 'configure' run. +# - It is guaranteed (with GNU Make) that when the version in configure.in +# is changed, acversion.m4 is built only after the new version number is +# propagated to the Makefile. (Libtool uses the same guarantee.) + +acversion.m4: $(srcdir)/acversion.m4.in $(srcdir)/configure.in + sed -e 's,@''VERSION@,$(VERSION),' $(srcdir)/acversion.m4.in > acversion.tm4 + cp acversion.tm4 $(srcdir)/acversion.m4 + rm -f acversion.tm4 + ## INSTALL. ## -## --------- ## # INSTALL is a special case. Automake seems to have a single name space # for both targets and variables. If we just use INSTALL, then the var @@ -64,6 +80,14 @@ CLEANFILES = autoconf.m4f \ INSTALL.txt: $(top_srcdir)/doc/install.texi $(MAKEINFO) $< --no-headers --no-validate --no-split --output=$@ + if test '$(srcdir)' != '.'; then cp $@ $(srcdir); rm -f $@; fi + +MAINTAINERCLEANFILES = acversion.m4 INSTALL.txt + + +## ----------------------------------- ## +## Special installation instructions. ## +## ----------------------------------- ## install-data-hook: INSTALL.txt @$(NORMAL_INSTALL) @@ -74,7 +98,6 @@ install-data-hook: INSTALL.txt $(INSTALL_DATA) $$d$$p.txt $(DESTDIR)$(pkgdatadir)/$$f; \ done -MAINTAINERCLEANFILES = INSTALL.txt ## ------------- ## ## The scripts. ## Index: configure.in =================================================================== RCS file: /cvs/autoconf/configure.in,v retrieving revision 1.29 diff -u -p -u -r1.29 configure.in --- configure.in 2000/09/04 12:12:21 1.29 +++ configure.in 2000/10/12 19:57:59 @@ -42,5 +42,5 @@ if test -f $srcdir/standards.texi; then AC_SUBST(standards_texi, standards.texi)dnl fi -AC_OUTPUT(acversion.m4 Makefile m4/Makefile man/Makefile doc/Makefile +AC_OUTPUT(Makefile m4/Makefile man/Makefile doc/Makefile tests/Makefile tests/atconfig) Index: tests/Makefile.am =================================================================== RCS file: /cvs/autoconf/tests/Makefile.am,v retrieving revision 1.32 diff -u -p -u -r1.32 Makefile.am --- tests/Makefile.am 2000/10/05 13:52:41 1.32 +++ tests/Makefile.am 2000/10/12 19:57:59 @@ -39,14 +39,14 @@ testsuite: atgeneral.m4 atspecific.m4 su # The files which contains macro we check for syntax. -MACRO_FILES = $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 \ - $(top_srcdir)/acfunctions.m4 $(top_srcdir)/aclang.m4 +MACRO_FILES = ../acgeneral.m4 ../acspecific.m4 \ + ../acfunctions.m4 ../aclang.m4 syntax.m4: mktests.sh $(MACRO_FILES) - ./mktests.sh $(MACRO_FILES) + cd $(srcdir) && ./mktests.sh $(MACRO_FILES) update.m4: mktests.sh $(MACRO_FILES) - ./mktests.sh $(MACRO_FILES) + cd $(srcdir) && ./mktests.sh $(MACRO_FILES) CLEANFILES = debug-*.sh macro configure configure.in config.status \ config.cache config.log config.h.in config.h Index: tests/atspecific.m4 =================================================================== RCS file: /cvs/autoconf/tests/atspecific.m4,v retrieving revision 1.15 diff -u -p -u -r1.15 atspecific.m4 --- tests/atspecific.m4 2000/10/12 15:02:42 1.15 +++ tests/atspecific.m4 2000/10/12 19:57:59 @@ -131,7 +131,7 @@ AT_DEFINE([AT_CHECK_UPDATE], [AT_SETUP([the autoupdating of $1]) _AT_CHECK_AC_MACRO([$1], -[AT_CHECK([autoupdate --autoconf-dir ..], 0, +[AT_CHECK([autoupdate --autoconf-dir $at_top_srcdir], 0, [], [autoupdate: `configure.in' is updated ])])