From: Alexandre Duret-Lutz Date: Wed, 4 Jun 2003 19:30:35 +0000 (+0000) Subject: * tests/alpha.test: Really run $MAKE. Augment to test X-Git-Tag: Release-1-7b~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32eb6b5a4c06e3f7c30d068767de40908f560568;p=thirdparty%2Fautomake.git * tests/alpha.test: Really run $MAKE. Augment to test subdirectories, and check-news report. * tests/alpha2.test: New file. Bug report from Akim Demaille. * tests/gnits2.test: Make sure README-alpha is not distributed. * tests/Makefile.am (TESTS): Add alpha2.test. * automake.in (handle_minor_options): Distribute README-alpha using push_dist_common, not require_file_with_macro. --- diff --git a/ChangeLog b/ChangeLog index 773d09ada..401efd206 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2003-06-04 Alexandre Duret-Lutz + + * tests/alpha.test: Really run $MAKE. Augment to test + subdirectories, and check-news report. + * tests/alpha2.test: New file. Bug report from Akim Demaille. + * tests/gnits2.test: Make sure README-alpha is not distributed. + * tests/Makefile.am (TESTS): Add alpha2.test. + * automake.in (handle_minor_options): Distribute README-alpha + using push_dist_common, not require_file_with_macro. + 2003-06-03 Alexandre Duret-Lutz * lib/Automake/Configure_ac.pm diff --git a/automake.in b/automake.in index 1a3b800ff..cfe589bb9 100755 --- a/automake.in +++ b/automake.in @@ -4852,8 +4852,7 @@ sub handle_minor_options { # This means we have an alpha release. See # GNITS_VERSION_PATTERN for details. - require_file_with_macro (TRUE, 'AUTOMAKE_OPTIONS', - FOREIGN, 'README-alpha'); + push_dist_common ('README-alpha'); } } } diff --git a/tests/Makefile.am b/tests/Makefile.am index 24c67bef6..030d8692c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,6 +20,7 @@ acsubst.test \ acsubst2.test \ all.test \ alpha.test \ +alpha2.test \ amassign.test \ ammissing.test \ ansi.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a0a97e3d7..f192399df 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -131,6 +131,7 @@ acsubst.test \ acsubst2.test \ all.test \ alpha.test \ +alpha2.test \ amassign.test \ ammissing.test \ ansi.test \ diff --git a/tests/alpha.test b/tests/alpha.test index 06fda0cc6..3db81bfb6 100755 --- a/tests/alpha.test +++ b/tests/alpha.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc. # # This file is part of GNU Automake. # @@ -22,17 +22,34 @@ # Jim Meyering. . ./defs || exit 1 +set -e + cat > configure.in << 'END' -AC_INIT -AM_INIT_AUTOMAKE(zardoz, 1.5e) -AC_CONFIG_FILES(Makefile) +AC_INIT([alpha], [1.0a]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([sub/Makefile]) +AC_OUTPUT END cat > Makefile.am << 'END' AUTOMAKE_OPTIONS = gnits +SUBDIRS = sub +check-local: distdir + test -f $(distdir)/README-alpha + test -f $(distdir)/sub/README + test ! -f $(distdir)/sub/README-alpha + : > works +END + +mkdir sub +cat > sub/Makefile.am << 'END' +AUTOMAKE_OPTIONS = gnits END : > README-alpha +: > sub/README-alpha +: > sub/README # Gnits stuff. : > INSTALL @@ -43,7 +60,17 @@ END : > ChangeLog : > THANKS -$ACLOCAL || exit 1 -$AUTOMAKE || exit 1 +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure + +# make distdir should fail because NEWS does not mention 1.0a +$MAKE check 2>stderr && exit 1 +cat stderr +grep 'NEWS not updated' stderr +test ! -f works -grep README-alpha Makefile.in +echo 'alpha 1.0a released' > NEWS +$MAKE check +test -f works diff --git a/tests/alpha2.test b/tests/alpha2.test new file mode 100755 index 000000000..55b378149 --- /dev/null +++ b/tests/alpha2.test @@ -0,0 +1,65 @@ +#! /bin/sh +# Copyright (C) 2003 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 Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Another check for README-alpha support. This time it is requested +# from configure.in. Report from Akim Demaille. + +. ./defs || exit 1 + +set -e + +cat > configure.in << 'END' +AC_INIT([alpha], [1.0b]) +AM_INIT_AUTOMAKE([readme-alpha]) +AC_CONFIG_FILES([Makefile sub/Makefile]) +AC_OUTPUT +END + +cat > Makefile.am << 'END' +SUBDIRS = sub +check-local: distdir + test -f $(distdir)/README-alpha + test -f $(distdir)/sub/README + test ! -f $(distdir)/sub/README-alpha + : > works +END + +mkdir sub +: > sub/Makefile.am + +: > README-alpha +: > sub/README-alpha +: > sub/README + +# Gnits stuff. +: > INSTALL +: > NEWS +: > README +: > COPYING +: > AUTHORS +: > ChangeLog +: > THANKS + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +$MAKE check +test -f works diff --git a/tests/gnits2.test b/tests/gnits2.test index 8b32f1f3a..32ff1ea05 100755 --- a/tests/gnits2.test +++ b/tests/gnits2.test @@ -88,12 +88,18 @@ chmod +x sub/scriptnok.sh : > ChangeLog : > THANKS +# The following file should not be distributed. +# (alpha.test checks the case where it must be distributed.) +: > README-alpha + set -e $ACLOCAL $AUTOCONF $AUTOMAKE -a +grep README-alpha Makefile.in && exit 1 + mkdir build cd build