diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-01-28 14:09:56 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-01-28 14:09:56 +0100 |
commit | 4fbec2fffe9d98470b3c5d1d03a94e32660366b0 (patch) | |
tree | a1f4baf02345fb141fecc5dee778c210381e14ae | |
parent | 73b1e4458679987e7e6a559e0f68f64307a54e1c (diff) | |
parent | 0436a1ed2c44b9e8b3c8f2f049e06bfac4969d3e (diff) | |
download | automake-4fbec2fffe9d98470b3c5d1d03a94e32660366b0.tar.gz |
Merge branch 'maint' into branch-1.11
* maint:
tests: avoid spurious failure of 'transform2.test' on Cygwin
tests: avoid spurious failure of deleted-am.test with FreeBSD make
tests: avoid possibly undeserved PASS from check8.test
warnings: more precise category and message for one warning
release: revamp rules to tag and upload the releases
amversion: add missing dependency
hacking: update advice w.r.t. synced files
hacking: don't reference ChangeLog anymore
-rw-r--r-- | HACKING | 34 | ||||
-rw-r--r-- | Makefile.am | 86 | ||||
-rw-r--r-- | automake.in | 9 | ||||
-rw-r--r-- | m4/Makefile.am | 2 | ||||
-rwxr-xr-x | tests/check8.test | 14 | ||||
-rwxr-xr-x | tests/conffile-leading-dot.test | 62 | ||||
-rwxr-xr-x | tests/deleted-am.test | 4 | ||||
-rw-r--r-- | tests/list-of-tests.mk | 1 | ||||
-rwxr-xr-x | tests/transform2.test | 17 |
9 files changed, 170 insertions, 59 deletions
@@ -16,24 +16,24 @@ appropriate paperwork. Second, be sure to add their name and email address to THANKS -* If a change fixes a test, mention the test in the ChangeLog entry. +* If a change fixes a test, mention the test in the commit message. If a change fixes a bug registered in the Automake debbugs tracker, - mention the bug number in the ChangeLog entry. + mention the bug number in the commit message. -* If somebody reports a new bug, mention his name in the ChangeLog entry +* If somebody reports a new bug, mention his name in the commit message and in the test case you write. Put him into THANKS. * When documenting a non-trivial idiom or example in the manual, be sure to add a test case for it, and to reference such test case from a proper Texinfo comment. -* Some files in the automake package are not owned by automake. These - files should never be edited here. These files are - COPYING (from FSF), - INSTALL (autoconf-patches@gnu.org), - config.guess, config.sub (config-patches@gnu.org), - texinfo.tex (bug-texinfo@gnu.org), - Most of them are updated before release with `make fetch'. +* Some files in the automake package are not owned by automake; these + files are listed in the $(FETCHFILES) variable in Makefile.am. They + should never be edited here. Almost all of them can be updated from + respective upstreams with "make fetch" (this should be done especially + before releases). The only exception is the 'lib/COPYING' (from FSF), + which should be updated by hand whenever the GPL gets updated (which + shouldn't happen that often anyway :-) * Changes other than bug fixes must be mentioned in NEWS. Important bug fixes should be mentioned in NEWS, too. @@ -164,10 +164,6 @@ release. For next, and for feature branches, the announcement for the branch should document rewinding policy. -* In order for rebasing and merging of ChangeLog entries to work seamlessly, - install and configure git-merge-changelog, currently available as gnulib - module. - ================================================================ = Test suite @@ -201,8 +197,6 @@ The repository will always have its own "odd" number so we can easily distinguish net and repo versions.) -* Update ChangeLog. - * Run this: ./bootstrap && ./configure && make && make check && make distcheck @@ -211,8 +205,8 @@ * Run `make git-release'. This will run "make dist" to create the tarballs, commit the last - NEWS/configure.ac/ChangeLog changes, tag the repository, sign - the tarballs, and upload them. + changes to NEWS, configure.ac and m4/amversion.m4, tag the repository, + sign the tarballs, and upload them. Use `make GNUPLOADFLAGS="--user key" git-release' to sign with a non-default key. @@ -243,8 +237,8 @@ ----- -Copyright (C) 2003, 2007, 2008, 2010, 2011 Free Software Foundation, -Inc. +Copyright (C) 2003, 2007, 2008, 2010, 2011, 2012 Free Software +Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Makefile.am b/Makefile.am index ad4d372e1..56784ca5d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -607,32 +607,66 @@ sc_at_in_texi: exit 1; \ fi - -git-dist: maintainer-check -## Make sure the NEWS file is up-to-date. - @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \ - echo "NEWS not updated; not releasing" 1>&2; \ - exit 1; \ - fi -## Build the distribution. We expect the developer to have already run -## "make check" and "make distcheck" on his own (as required in the -## HACKING file, section "Release procedure"). - $(MAKE) $(AM_MAKEFLAGS) dist -## Finally, if anything was successful, commit the last changes and tag -## the release in the repository. We don't use RCS keywords so it's OK -## to distribute the files before they were committed. - cd $(srcdir) && git commit -a -s && \ - git tag -s "v$(VERSION)" -m "Release $(VERSION)" - -git-release: git-dist - case $(VERSION) in \ - *[a-z]) dest=alpha;; \ - *) dest=ftp;; \ +## Tagging and/or uploading stable and beta releases. + +GIT = git + +version_rx = ^[1-9][0-9]*\.[0-9][0-9]*(\.[0-9][0-9]*)? +stable_version_rx = $(version_rx)$$ +beta_version_rx = $(version_rx)[bdfhjlnprtvxz]$$ +match_version = echo "$(VERSION)" | $(EGREP) >/dev/null + +## Check that we don't have uncommitted or unstaged changes. +## TODO: Maybe the git suite already offers a shortcut to verify if the +## TODO: working directory is "clean" or not? If yes, use that instead +## TODO: of duplicating the logic here. +git_must_have_clean_workdir = \ + $(GIT) rev-parse --verify HEAD >/dev/null \ + && $(GIT) update-index -q --refresh \ + && $(GIT) diff-files --quiet \ + && $(GIT) diff-index --quiet --cached HEAD \ + || fatal "you have uncommitted or unstaged changes" + +determine_release_type = \ + if $(match_version) '$(stable_version_rx)'; then \ + release_type='Release' dest=ftp; \ + elif $(match_version) '$(beta_version_rx)'; then \ + release_type='Beta release' dest=alpha; \ + else \ + fatal "invalid version '$(VERSION)' for a release"; \ + fi + +git-tag-release: maintainer-check + @set -e; set -u; \ + fatal () { echo "$@: $$*; not tagging" >&2; exit 1; }; \ + case '$(AM_TAG_DRYRUN)' in \ + ""|[nN]|[nN]o|NO) run="";; \ + *) run="echo Running:";; \ esac; \ - $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) \ - --to $$dest.gnu.org:automake $(DIST_ARCHIVES) - -.PHONY: git-release git-dist + $(determine_release_type); \ + $(git_must_have_clean_workdir); \ +## Make sure the NEWS file is up-to-date. + sed 1q $(srcdir)/NEWS | grep '$(VERSION)' >/dev/null \ + || fatal "NEWS not updated"; \ +## If all was successful, tag the release in the local repository. + $$run $(GIT) tag -s "v$(VERSION)" -m "$$release_type $(VERSION)" + +git-upload-release: + @set -e; set -u; \ + fatal () { echo "$@: $$*; not releasing" >&2; exit 1; }; \ + $(determine_release_type); \ + dest=$$dest.gnu.org:automake; \ + $(git_must_have_clean_workdir); \ +## Check that we are releasing from a valid tag. + tag=`$(GIT) describe` \ + && case $$tag in "v$(VERSION)") true;; *) false;; esac \ + || fatal "you can only create a release from a tagged version"; \ +## Build and upload the distribution tarball(s). + $(MAKE) $(AM_MAKEFLAGS) dist || exit 1; \ + echo Will upload to $$dest: $(DIST_ARCHIVES); \ + $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) --to $$dest $(DIST_ARCHIVES) + +.PHONY: git-upload-release git-tag-release ## Visually comparing differences between the Makefile.in files in ## automake's own build system as generated in two different branches @@ -711,7 +745,7 @@ WGET_SV_GIT_AC = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=b WGET_SV_GIT_GL = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=' ## Files that we fetch and which we compare against. -## FIXME should be a lot more here +## The 'lib/COPYING' file must still be synced by hand. FETCHFILES = \ INSTALL \ config.guess \ diff --git a/automake.in b/automake.in index a18d5a58a..69b601093 100644 --- a/automake.in +++ b/automake.in @@ -5270,10 +5270,11 @@ sub scan_autoconf_config_files ($$) # Handle $local:$input syntax. my ($local, @rest) = split (/:/); @rest = ("$local.in",) unless @rest; - msg ('portability', $where, - "Omit leading `./' from config file names such as `$local'," - . "\nas not all make implementations treat `file' and `./file' equally.") - if ($local =~ /^\.\//); + # Keep in sync with 'conffile-leading-dot.test'. + msg ('unsupported', $where, + "omit leading './' from config file names such as '$local';" + . "\nremake rules might be subtly broken otherwise") + if ($local =~ /^\.\//); my $input = locate_am @rest; if ($input) { diff --git a/m4/Makefile.am b/m4/Makefile.am index 9b627af19..c1442f608 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -73,7 +73,7 @@ EXTRA_DIST = acdir/dirlist amversion.in # loop otherwise. # Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is # how amversion.m4 appears in our dependencies. -$(top_srcdir)/m4/amversion.m4: $(srcdir)/amversion.in +$(top_srcdir)/m4/amversion.m4: $(top_srcdir)/configure.ac $(srcdir)/amversion.in $(AM_V_at)sed \ -e 's,[@]VERSION[@],$(VERSION),g' \ -e 's,[@]APIVERSION[@],$(APIVERSION),g' \ diff --git a/tests/check8.test b/tests/check8.test index dc8d3dda7..a9e573064 100755 --- a/tests/check8.test +++ b/tests/check8.test @@ -87,12 +87,14 @@ cd build ../configure $MAKE check >stdout && { cat stdout; Exit 1; } cat stdout -# Note: we are not grepping for the space here, due to the Solaris make VPATH -# rewriting (if we fix that, we can still write a separate test for it). +# Note: we are not grepping for the space in the lines from the 'foo' +# tests, due to the Solaris make VPATH rewriting (if we fix that, we +# can still write a separate test for it). grep 'XPASS.*foo$' stdout grep '^[^X]*PASS.*sub/foo$' stdout -grep '^[^X]*PASS.*bar' stdout -grep '^[^X]*PASS.*sub/bar' stdout -grep '^[^X]*FAIL.*baz' stdout -grep 'XFAIL.*sub/baz' stdout +grep '^[^X]*PASS.* bar' stdout +grep '^[^X]*PASS.* sub/bar' stdout +grep '^[^X]*FAIL.* baz' stdout +grep 'XFAIL.* sub/baz' stdout + : diff --git a/tests/conffile-leading-dot.test b/tests/conffile-leading-dot.test new file mode 100755 index 000000000..1d3d12fab --- /dev/null +++ b/tests/conffile-leading-dot.test @@ -0,0 +1,62 @@ +#! /bin/sh +# Copyright (C) 2012 Free Software Foundation, Inc. +# +# This program 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. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +# Automake must complain if AC_CONFIG_FILES is passed something starting +# with a dot (like "./Makefile"), since the remake rules might be subtly +# broken in that case. + +required=GNUmake +. ./defs || Exit 1 + +set -e + +cat > configure.in << END +AC_INIT([$me], [1.0]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([./Makefile]) +AC_CONFIG_FILES([./foo:a.in:b.in:c.in]) +AC_OUTPUT +END + +echo foo = barbarbar > Makefile.am + +touch a.in b.in c.in + +$ACLOCAL + +AUTOMAKE_fails -Wnone -Wunsupported +grep "^configure\.in:3:.*'\\./Makefile'" stderr +grep "^configure\.in:3:.* omit leading '\\./'" stderr +grep "^configure\.in:3:.*remake rules might be subtly broken" stderr +grep "^configure\.in:4:.*'\\./foo'" stderr +grep "^configure\.in:4:.* omit leading '\\./'" stderr +grep "^configure\.in:4:.*remake rules might be subtly broken" stderr + +# Check that our warning was actually justified. +$AUTOCONF +$AUTOMAKE -Wall -Wno-unsupported +./configure +$MAKE +grep barbarbar Makefile +# No need to sleep here, configure did that for us already. +echo foo = bazbazbaz > Makefile.am +# Check that remake rules do truly break -- otherwise automake is +# giving a bogus warning. +$MAKE 2>stderr && { cat stderr >&2 Exit 1; } +cat stderr >&2 +grep "config\\.status:.*invalid argument.*[\`\"']Makefile[\`\"']" stderr + +: diff --git a/tests/deleted-am.test b/tests/deleted-am.test index fa41e9e10..1e8d11a60 100755 --- a/tests/deleted-am.test +++ b/tests/deleted-am.test @@ -37,6 +37,7 @@ $AUTOMAKE $MAKE rm -f zardoz.am +$sleep # Required to avoid racy failures with FreeBSD make. $MAKE >output 2>&1 && { cat output; Exit 1; } cat output # This error will come from automake, not make, so we can be stricter @@ -44,12 +45,13 @@ cat output grep 'cannot open.*zardoz\.am' output grep 'foobar\.am' output && Exit 1 # No spurious error, please. -# Try with one less indirection. +# Try with one less indirection. : > foobar.am $AUTOMAKE Makefile ./config.status Makefile $MAKE # Sanity check. rm -f foobar.am +$sleep # Required to avoid racy failures with FreeBSD make. $MAKE >output 2>&1 && { cat output; Exit 1; } cat output # This error will come from automake, not make, so we can be stricter diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk index 04e1ace06..88946ebf6 100644 --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@ -260,6 +260,7 @@ configure.test \ confdeps.test \ conff.test \ conff2.test \ +conffile-leading-dot.test \ confh.test \ confh4.test \ confh5.test \ diff --git a/tests/transform2.test b/tests/transform2.test index 0f9d5ec08..07943bc9a 100755 --- a/tests/transform2.test +++ b/tests/transform2.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2012 Free Software +# Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -74,9 +75,23 @@ $MAKE uninstall test `find inst -type f -print | wc -l` = 0 # Also squash all file types in question. + +# On newer Cygwin versions, that won't work, likely due to overly +# aggressive appending of '.exe' suffix when copying/renaming Windows +# executables). So let's skip this part of the test if we detect the +# faulty heuristic is present. See also: +# <http://lists.gnu.org/archive/html/automake-patches/2010-08/msg00153.html> +# <http://thread.gmane.org/gmane.os.cygwin/119380> +echo Foo > foo +echo Bar > bar.exe +chmod a+x foo bar.exe +cp foo bar && cmp foo bar \ + || skip_ "your Cygwin is too aggressive in tweaking '.exe' suffixes" + ./configure --program-transform-name='s/.*/foo/' --prefix "`pwd`/inst" --mandir "`pwd`/inst/man" $MAKE $MAKE test-install-foo $MAKE uninstall test `find inst -type f -print | wc -l` = 0 + : |