From: Alexandre Duret-Lutz Date: Thu, 10 Oct 2002 17:37:38 +0000 (+0000) Subject: For PR automake/358: X-Git-Tag: v1.10.2~1124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd386946d86f0b0c7733124dac09ff4d564c43e6;p=platform%2Fupstream%2Fautomake.git For PR automake/358: * lib/am/texi-vers.am (%STAMPVTI%): Depend on configure instead of configure.ac. Suggested by Thien-Thi Nguyen. * lib/am/configure.am ($(srcdir)/configure): Depends on %CONFIGURE_DEPS% * automake.in (@configure_deps): New array. (scan_autoconf_traces): Scan for m4_include and m4_sinclude, and fill @configure_deps. (handle_configure): Substitute %CONFIGURE_DEPS%. Distribute @configure_deps. * tests/version7.texi: New file. * tests/vtexi.test: Adjust. * tests/Makefile.am (TESTS): Add version7.test. * automake.texi (Dist): Mention that m4_include'd files are distributed. --- diff --git a/ChangeLog b/ChangeLog index 6f55b48..3687abb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2002-10-10 Alexandre Duret-Lutz + + For PR automake/358: + * lib/am/texi-vers.am (%STAMPVTI%): Depend on configure instead of + configure.ac. + Suggested by Thien-Thi Nguyen. + * lib/am/configure.am ($(srcdir)/configure): Depends on + %CONFIGURE_DEPS% + * automake.in (@configure_deps): New array. + (scan_autoconf_traces): Scan for m4_include and m4_sinclude, + and fill @configure_deps. + (handle_configure): Substitute %CONFIGURE_DEPS%. + Distribute @configure_deps. + * tests/version7.texi: New file. + * tests/vtexi.test: Adjust. + * tests/Makefile.am (TESTS): Add version7.test. + * automake.texi (Dist): Mention that m4_include'd files + are distributed. + 2002-10-09 Akim Demaille * m4/ccstdc.m4 (AM_PROG_CC_STDC): Its definition is now empty: diff --git a/THANKS b/THANKS index 9272a40..897889b 100644 --- a/THANKS +++ b/THANKS @@ -177,13 +177,13 @@ Ryan T. Sammartino ryants@shaw.ca Sam Hocevar sam@zoy.org Sergey Vlasov vsu@mivlgu.murom.ru Seth Alves alves@hungry.com -Shuhei Amakawa +Shuhei Amakawa sa264@cam.ac.uk Shigio Yamaguchi shigio@tamacom.com Steve M. Robbins steve@nyongwa.montreal.qc.ca Sven Verdoolaege skimo@kotnet.org Tatu Ylonen ylo@ssh.fi The Crimson Binome steve@nyongwa.montreal.qc.ca -thi ttn@revel.glug.org +Thien-Thi Nguyen ttn@glug.org Thomas Gagne tgagne@ix.netcom.com Thomas Morgan tmorgan@pobox.com Thomas Tanner tanner@ffii.org diff --git a/automake.in b/automake.in index 2d2c16e..bf757b5 100755 --- a/automake.in +++ b/automake.in @@ -413,6 +413,9 @@ my %vars_scanned = (); # TRUE if --cygnus seen. my $cygnus_mode = 0; +# Files included by @configure. +my @configure_deps = (); + # Hash table of AM_CONDITIONAL variables seen in configure. my %configure_cond = (); @@ -4425,6 +4428,9 @@ sub handle_configure my ($regen_aclocal_m4, @aclocal_m4_deps) = scan_aclocal_m4 (); + push_dist_common (@configure_deps) + if $relative_dir eq '.'; + $output_rules .= &file_contents ('configure', new Automake::Location, @@ -4441,7 +4447,8 @@ sub handle_configure => $cmdline_use_dependencies ? '' : ' --ignore-deps', 'MAKEFILE-AM-SOURCES' => "$input$colon_infile", 'REGEN-ACLOCAL-M4' => $regen_aclocal_m4, - ACLOCAL_M4_DEPS => "@aclocal_m4_deps"); + ACLOCAL_M4_DEPS => "@aclocal_m4_deps", + CONFIGURE_DEPS => "@configure_deps"); if ($relative_dir eq '.') { @@ -5171,7 +5178,9 @@ sub scan_autoconf_traces ($) AM_GNU_GETTEXT AM_INIT_AUTOMAKE AM_MAINTAINER_MODE - AM_PROG_CC_C_O); + AM_PROG_CC_C_O + m4_include + m4_sinclude); my $traces = ($ENV{AUTOCONF} || 'autoconf') . " "; @@ -5281,6 +5290,16 @@ sub scan_autoconf_traces ($) { $seen_cc_c_o = $where; } + elsif ($macro eq 'm4_include' || $macro eq 'm4_sinclude') + { + # Some modified versions of Autoconf don't use + # forzen files. Consequently it's possible that we see all + # m4_include's performed during Autoconf's startup. + # Obviously we don't want to distribute Autoconf's files + # so we skip absolute filenames here. + push @configure_deps, $args[1] + unless $here =~ m,^(?:\w:)?[\\/],; + } } } diff --git a/automake.texi b/automake.texi index f15af25..8d02d68 100644 --- a/automake.texi +++ b/automake.texi @@ -4098,7 +4098,9 @@ or as the target of a @file{Makefile.am} rule). This list is printed by @samp{automake --help}. Also, files which are read by @code{configure} (i.e. the source files corresponding to the files specified in various Autoconf macros such as @code{AC_CONFIG_FILES} and siblings) are -automatically distributed. +automatically distributed. Files included in @file{Makefile.am}s (using +@code{include}) or in @file{configure.in} (using @code{m4_include}) are +also distributed. Still, sometimes there are files which must be distributed, but which are not covered in the automatic rules. These files should be listed in diff --git a/lib/am/configure.am b/lib/am/configure.am index f7debeb..fe53b48 100644 --- a/lib/am/configure.am +++ b/lib/am/configure.am @@ -54,7 +54,7 @@ $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) DIST_COMMON += configure %CONFIGURE-AC% ## Explicitly look in srcdir for benefit of non-GNU makes. -$(srcdir)/configure: %MAINTAINER-MODE% $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) +$(srcdir)/configure: %MAINTAINER-MODE% $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) %CONFIGURE_DEPS% cd $(srcdir) && $(AUTOCONF) endif %?TOPDIR_P% diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am index cacc429..8325c7f 100644 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@ -26,9 +26,10 @@ DIST_COMMON += %VTEXI% %STAMPVTI% ## discard any %VTEXI% file found in a VPATH seatch. %VTEXI%: %MAINTAINER-MODE% %STAMPVTI% -## Depend on %CONFIGURE-AC% so that version number updates cause a -## rebuild. -%STAMPVTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC% +## Depend on configure so that version number updates cause a rebuild. +## (Not configure.ac, because not all setups define the version number +## in this file.) +%STAMPVTI%: %TEXI% $(top_srcdir)/configure ## It is wrong to have %STAMPTVTI% dependent on %DIRSTAMP%, because ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file ## should never be dependent upon a non-distributed built file. diff --git a/stamp-vti b/stamp-vti index fa1c2f1..bcad838 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 25 September 2002 -@set UPDATED-MONTH September 2002 +@set UPDATED 10 October 2002 +@set UPDATED-MONTH October 2002 @set EDITION 1.7a @set VERSION 1.7a diff --git a/tests/Makefile.am b/tests/Makefile.am index 7c06319..75cfa67 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -416,6 +416,7 @@ version3.test \ version4.test \ version5.test \ version6.test \ +version7.test \ vpath.test \ vtexi.test \ vtexi2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 44699b0..e3c0fdb 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -508,6 +508,7 @@ version3.test \ version4.test \ version5.test \ version6.test \ +version7.test \ vpath.test \ vtexi.test \ vtexi2.test \ diff --git a/tests/version7.test b/tests/version7.test new file mode 100755 index 0000000..5cc6448 --- /dev/null +++ b/tests/version7.test @@ -0,0 +1,68 @@ +#! /bin/sh +# Copyright (C) 2002 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with autoconf; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Test for a special setup where the package's version isn't defined +# in configure.in. + +required='makeinfo tex' +. ./defs || exit 1 + +set -e + +cat >configure.in <<'END' +m4_include([version.m4]) +AC_INIT([version7], [THE_VERSION]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +END + +echo 'm4_define([THE_VERSION], [2.718])' > version.m4 + +cat > Makefile.am << 'END' +info_TEXINFOS = zardoz.texi + +check: + test -f $(srcdir)/version.m4 +END + +cat > zardoz.texi << 'END' +\input texinfo +@setfilename zardoz.info +@settitle Zardoz +@node Top +Hello walls. +@include version.texi +@bye +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE --add-missing +./configure --version | grep '2\.718' +./configure +$MAKE +grep '2\.718' version.texi + + +echo 'm4_define([THE_VERSION], [3.141])' > version.m4 +$MAKE distcheck +./configure --version | grep '3\.141' +grep '3\.141' version.texi diff --git a/tests/vtexi.test b/tests/vtexi.test index 8cb9090..c6328e6 100755 --- a/tests/vtexi.test +++ b/tests/vtexi.test @@ -54,7 +54,7 @@ grep '^textutils\.info:.*version\.texi$' Makefile.in # @CONFIGURE_AC@ was not properly substitued. $EGREP '^stamp-vti:.*textutils\.texi( .*)?$' Makefile.in -$EGREP '^stamp-vti:.*\$\(top_srcdir\)/configure\.in( .*)?$' Makefile.in +$EGREP '^stamp-vti:.*\$\(top_srcdir\)/configure( .*)?$' Makefile.in # Check that the path to mdate-sh is correct. Over escaping of `$' diff --git a/version.texi b/version.texi index fa1c2f1..bcad838 100644 --- a/version.texi +++ b/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 25 September 2002 -@set UPDATED-MONTH September 2002 +@set UPDATED 10 October 2002 +@set UPDATED-MONTH October 2002 @set EDITION 1.7a @set VERSION 1.7a