diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-06-13 10:14:29 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-06-13 11:28:49 +0200 |
commit | 013d9ba640bd2f234bd62d1f4d92574a58773830 (patch) | |
tree | cda2aba07cbe490a5c265677a0c72985cecc625d | |
parent | aee79c539713a13e4e904d2acda938d5661337e0 (diff) | |
parent | f61b6ef9255ada04114d0d1a3199297ed4ed0171 (diff) | |
download | automake-013d9ba640bd2f234bd62d1f4d92574a58773830.tar.gz |
Merge branch 'master' into ng/master
* master:
THANKS: update e-mall address for Ralf Corsepius
lang, suffix rules: don't require C stuff needlessly
tests: expose automake bug#14560
maint: add a missing copyright notice
sync: update config.guess from upstream
tests: expose automake bug#13928
comments: fix some out-of-sync refs to test scripts
tests: expose automake bug#13940
fixup: botched merge for 'bin/automake.in'
configure: remove an obsolete TODO comment
post-release: micro version bump (1.13.3a)
release: stable micro release 1.13.3
typofix: fix grammaro in comments in t/tags-pr12372.sh
NEWS: minor fixlets, re-wording, and better text wrapping
tests: slightly stricter checks in t/cxx-demo.sh
tests: fix spurious failure when 'etags' program is Exuberant Ctags
tests: fix spurious failure due to missing sleeps
maint: version bump after beta release 1.13b
release: beta release 1.13b (will become 1.14)
maint: support new Automake versioning scheme in tagging/uploading rules
announcement: can be generated from development snapshots as well
announcement: can be generated from development snapshots as well
announcement: be less strict in the paring of NEWS
maint: version bump after beta release 1.13.2b
release: beta release 1.13.2b (will become 1.13.3)
sync: update config.guess from upstream
automake: assume we can always pass '-o' to the C compiler
NEWS: document recent testsuite fixes (MinGW/MSYS related)
depcomp: avoid trailing backslash in depfile for depmode=msvc7
tests: prune some weed in a non-POSIX test
tests: avoid a spurious failure on MSYS
t/README: document "run_make", discourage "make -e"
cosmetics: tiny whitespace fixlets
tests: avoid a spurious failure with MSVC
tests: avoid a spurious failure on non-POSIX systems
tests: avoid a spurious failure when TeX is not installed.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r-- | NEWS | 60 | ||||
-rw-r--r-- | THANKS | 3 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | lib/Automake/Rule.pm | 4 | ||||
-rw-r--r-- | lib/am/distdir.mk | 2 | ||||
-rwxr-xr-x | lib/config.guess | 144 | ||||
-rwxr-xr-x | lib/depcomp | 3 | ||||
-rw-r--r-- | maintainer/maint.mk | 39 | ||||
-rw-r--r-- | t/Makefile.inc | 2 | ||||
-rw-r--r-- | t/README | 18 | ||||
-rw-r--r-- | t/ax/deltree.pl | 15 | ||||
-rw-r--r-- | t/cxx-demo.sh | 7 | ||||
-rw-r--r-- | t/distcheck-pr10470.sh | 6 | ||||
-rw-r--r-- | t/lex-header.sh | 1 | ||||
-rw-r--r-- | t/no-extra-c-stuff.sh | 74 | ||||
-rw-r--r-- | t/no-extra-makefile-code.sh | 7 | ||||
-rw-r--r-- | t/override-conditional-pr13940.sh | 44 | ||||
-rw-r--r-- | t/remake-configure-dependencies.sh | 3 | ||||
-rw-r--r-- | t/subobj-indir-pr13928.sh | 49 | ||||
-rw-r--r-- | t/subobj-vpath-pr13928.sh | 60 | ||||
-rw-r--r-- | t/suffix-extra-c-stuff-pr14560.sh | 37 | ||||
-rw-r--r-- | t/tags-pr12372.sh | 12 | ||||
-rw-r--r-- | t/txinfo-no-split.sh | 7 | ||||
-rw-r--r-- | t/yacc-bison-skeleton.sh | 1 |
24 files changed, 491 insertions, 110 deletions
@@ -90,7 +90,7 @@ New in 2.0: (the one that has until now been labelled as '1.14') will actually become "Automake 2.0". Automake 1.14 will be the next minor version, which will introduce new features, deprecations and bug fixes, but - no real backward incompatibility. + no serious backward incompatibility. - See discussion about automake bug#13578 for more details and background: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13578> @@ -130,10 +130,10 @@ New in 2.0: to retire support for them in December 2013: <http://www.sgi.com/services/support/irix_mips_support.html> - - Future versions of Automake might remove support for MS-DOS and - Windows 95/98/ME (support for them was offered by relying on the - DJGPP project). Note however that both Cygwin and MSYS/MinGW on - modern Windows versions will continue to be fully supported. + - Automake 2.0 will remove support for MS-DOS and Windows 95/98/ME + (support for them was offered by relying on the DJGPP project). + Note however that both Cygwin and MSYS/MinGW on modern Windows + versions will continue to be fully supported. - Automake-provided scripts and makefile recipes might (finally!) start assuming a POSIX shell in Automake 2.0. @@ -271,6 +271,17 @@ New in 1.14: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +New in 1.13.4: + +* Bugs fixed: + + - Fix a minor regression introduced in Automake 1.13.3: when two or more + user-defined suffix rules were present in a single Makefile.am, + automake would needlessly include definition of some make variables + related to C compilation in the generated Makefile.in (bug#14560). + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + New in 1.13.3: * Documentation fixes: @@ -281,18 +292,19 @@ New in 1.13.3: * Bugs fixed: - - Byte-compilation of Emacs lisp files could fail spuriously on Solaris, - when /bin/ksh or /usr/xpg4/bin/sh were used as shell. + - Byte-compilation of Emacs lisp files could fail spuriously on + Solaris, when /bin/ksh or /usr/xpg4/bin/sh were used as shell. - - The same user-defined suffix being transformed into different - Automake-known suffixes in different Makefiles could confuse automake - and make it generate inconsistent Makefiles (automake bug#14441). - For example, if 'Makefile.am' contained a ".ext.cc:" suffix rule, and - 'sub/Makefile.am' contained a ".ext.c:" suffix rule, automake would - have mistakenly put into 'Makefile.in' rules to compile *.c files - into object files, and into 'sub/Makefile.in' rules to compile *.cc - files into object files --- rather than the other way around. - This is now fixed. + - If the same user-defined suffixes were transformed into different + Automake-known suffixes in different Makefile.am files in the same + project, automake could get confused and generate inconsistent + Makefiles (automake bug#14441). + For example, if 'Makefile.am' contained a ".ext.cc:" suffix rule, + and 'sub/Makefile.am' contained a ".ext.c:" suffix rule, automake + would have mistakenly placed into 'Makefile.in' rules to compile + "*.c" files into object files, and into 'sub/Makefile.in' rules to + compile "*.cc" files into object files --- rather than the other + way around. This is now fixed. * Testsuite work: @@ -305,14 +317,18 @@ New in 1.13.3: 'run_make', and several related changes. These serve a two-fold purpose: - 1. Removing brittleness due to the use of "make -e" in test cases. + 1. Remove brittleness due to the use of "make -e" in test cases. + + 2. Seamlessly allow the use of parallel make ("make -j...") in the + test cases, even where redirection of make output is involved + (see automake bug#11413 for a description of the subtle issues + in this area). - 2. Seamlessly allowing the use of parallel make ("make -j...") in - the test cases, even where redirection of make output is involved - (see automake bug#11413 for a description of the subtle issues in - this area). + - Several spurious failures have been fixed (they hit especially + MinGW/MSYS builds). See automake bugs #14493, #14494, #14495, + #14498, #14499, #14500, #14501, #14517 and #14528. - - Some other minor, miscellaneous changes and fixlets. + - Some other minor miscellaneous changes and fixlets. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -67,6 +67,7 @@ Christian Cornelssen ccorn@cs.tu-berlin.de Christina Gratorp christina.gratorp@gmail.com Claudio Fontana sick_soul@yahoo.it Clifford Wolf clifford@clifford.at +Colin Watson cjwatson@ubuntu.com Dagobert Michelsen dam@opencsw.org Daiki Ueno ueno@unixuser.org Dalibor Topic robilad@kaffe.org @@ -331,7 +332,7 @@ Rainer Orth ro@techfak.uni-bielefeld.de Rafael Laboissiere laboissiere@psy.mpg.de Rainer Tammer tammer@tammer.net Raja R Harinath harinath@cs.umn.edu -Ralf Corsepius corsepiu@faw.uni-ulm.de +Ralf Corsepius ralf.corsepius@gmail.com Ralf Menzel menzel@ls6.cs.uni-dortmund.de Ralf Wildenhues Ralf.Wildenhues@gmx.de Ralph Schleicher rs@purple.UL.BaWue.DE diff --git a/configure.ac b/configure.ac index 097a19a74..663f62cb7 100644 --- a/configure.ac +++ b/configure.ac @@ -246,9 +246,6 @@ exit 77" >&AS_MESSAGE_LOG_FD 2>&1; test $? -eq 77; } # would emit "P=1" into file with /usr/xpg4/bin/sh from Solaris 10 and # /bin/sh from SunOS 5.11 and OpenBSD 4.7. # -# Finally, we look for weird bugs and portability problems mentioned in -# the Autoconf manual, and reject shells that suffers from them. (TODO) -# # Use '$am_score' to indicate the degree of acceptability of the shell. # A score of "10" means that the shell is good enough for our needs; # a score of "9" means that the shell has some minor bugs or limitation, diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm index c5048a729..d5c345c2b 100644 --- a/lib/Automake/Rule.pm +++ b/lib/Automake/Rule.pm @@ -439,7 +439,7 @@ sub _maybe_warn_about_duplicated_target ($$$$$$) ## from rules that only add dependencies. E.g., ## .PHONY: foo ## .PHONY: bar - ## is legitimate. (This is phony.test.) + ## is legitimate. This is checked in the 'phony.sh' test. # msg ('syntax', $where, # "redefinition of '$target'$condmsg ...", partial => 1); @@ -545,7 +545,7 @@ sub _conditionals_for_rule ($$$$) # condition. So for now we do our best *here*. If 'foo:' # was already defined in condition COND1 and we want to define # it in condition TRUE, then define it only in condition !COND1. - # (See cond14.test and cond15.test for some test cases.) + # (See cond14.sh and cond15.sh for some test cases.) @conds = $rule->not_always_defined_in_cond ($cond)->conds; # No conditions left to define the rule. diff --git a/lib/am/distdir.mk b/lib/am/distdir.mk index a1a5be7f5..df8d05df5 100644 --- a/lib/am/distdir.mk +++ b/lib/am/distdir.mk @@ -212,7 +212,7 @@ endif # am.conf.check-news ## is distributed from several Makefiles at once (see automake bug#9546 ## and bug#9651, and the follow-up commits 'v1.11-1219-g326ecba', ## 'v1.11-1220-g851b1ae' and 'v1.11-1221-gdccae6a'). See also test -## 't/dist-repeated.sh'. +## 'dist-repeated.sh'. test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ diff --git a/lib/config.guess b/lib/config.guess index 2055429b1..516ac6c17 100755 --- a/lib/config.guess +++ b/lib/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-04-24' +timestamp='2013-05-16' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -132,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -853,21 +874,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -880,67 +901,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif - #else - #include <features.h> - #ifdef __UCLIBC__ - LIBC=uclibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -959,59 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - LIBC=gnu - test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q __uClibc_main && LIBC=uclibc echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1244,19 +1256,21 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) diff --git a/lib/depcomp b/lib/depcomp index ad4729dfd..e61e6d172 100755 --- a/lib/depcomp +++ b/lib/depcomp @@ -1,7 +1,7 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-10-18.11; # UTC +scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. @@ -516,6 +516,7 @@ $ { G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; diff --git a/maintainer/maint.mk b/maintainer/maint.mk index da821b222..305ef1cd1 100644 --- a/maintainer/maint.mk +++ b/maintainer/maint.mk @@ -107,10 +107,16 @@ GIT = git EXTRA_DIST += lib/gnupload -base_version_rx = ^[1-9][0-9]*\.[0-9][0-9]* -stable_major_version_rx = $(base_version_rx)$$ -stable_minor_version_rx = $(base_version_rx)\.[0-9][0-9]*$$ -beta_version_rx = $(base_version_rx)(\.[0-9][0-9]*)?[bdfhjlnprtvxz]$$ +# First component of a version number (mandatory). +rx-0 = ^[1-9][0-9]* +# Later components of a version number (optional). +rx-1 = \.[0-9][0-9]* +# Used in recipes to decide which kind of release we are. +stable_major_version_rx = $(rx-0)\.0$$ +stable_minor_version_rx = $(rx-0)$(rx-1)$$ +stable_micro_version_rx = $(rx-0)$(rx-1)$(rx-1)$$ +beta_version_rx = $(rx-0)($(rx-1)){1,2}[bdfhjlnprtvxz]$$ +alpha_version_rx = $(rx-0)($(rx-1)){1,2}[acegikmoqsuwy]$$ match_version = echo "$(VERSION)" | $(EGREP) >/dev/null # Check that we don't have uncommitted or unstaged changes. @@ -131,14 +137,28 @@ determine_release_type = \ dest=ftp; \ elif $(match_version) '$(stable_minor_version_rx)'; then \ release_type='Minor release'; \ + announcement_type='minor release'; \ + dest=ftp; \ + elif $(match_version) '$(stable_micro_version_rx)'; then \ + release_type='Micro release'; \ announcement_type='maintenance release'; \ dest=ftp; \ elif $(match_version) '$(beta_version_rx)'; then \ release_type='Beta release'; \ announcement_type='test release'; \ dest=alpha; \ + elif $(match_version) '$(alpha_version_rx)'; then \ + echo "$@: improper version '$(VERSION)' for a release" >&2; \ + if test -n '$(strip $(DEVEL_SNAPSHOT))'; then \ + echo "$@: continuing anyway since DEVEL_SNAPSHOT is set" >&2; \ + release_type='Development snapshot'; \ + announcement_type='development snapshot'; \ + dest=alpha; \ + else \ + exit 1; \ + fi; \ else \ - echo "$@: invalid version '$(VERSION)' for a release" >&2; \ + echo "$@: invalid version number '$(VERSION)'" >&2; \ exit 1; \ fi @@ -146,7 +166,7 @@ determine_release_type = \ print-release-type: @$(determine_release_type); \ echo "$$release_type $(VERSION);" \ - "it will be announced as a $$announcement_type" + "it will be announced as a \"$$announcement_type\"" git-tag-release: maintainer-check @set -e -u; \ @@ -262,6 +282,7 @@ compare-autodiffs: autodiffs PACKAGE_MAILINGLIST = automake@gnu.org +announcement: DEVEL_SNAPSHOT = yes announcement: NEWS $(AM_V_GEN): \ && rm -f $@ $@-t \ @@ -294,8 +315,8 @@ announcement: NEWS && X "-*-*-*-" \ && X \ && $(AWK) '\ - ($$0 == "New in $(VERSION):") { wait_for_end=1; } \ - (/^~~~/ && wait_for_end) { exit(0) } \ + ($$0 ~ /^New in .*:/) { wait_for_end=1; } \ + (/^~~~/ && wait_for_end) { print; exit(0) } \ { print } \ ' <$(srcdir)/NEWS >> $@-t \ && mv -f $@-t $@ @@ -391,7 +412,7 @@ web-manual: web-manual-update: $(AM_V_at)$(determine_release_type); \ case $$release_type in \ - [Mm]ajor\ release|[Mm]inor\ release);; \ + [Mm]ajor\ release|[Mm]inor\ release|[Mm]icro\ release);; \ *) echo "Cannot upload manuals from a \"$$release_type\"" >&2; \ exit 1;; \ esac diff --git a/t/Makefile.inc b/t/Makefile.inc index 87763e085..819ef7f07 100644 --- a/t/Makefile.inc +++ b/t/Makefile.inc @@ -91,9 +91,11 @@ XFAIL_TESTS = \ %D%/interp3.sh \ %D%/java-nobase.sh \ %D%/objext-pr10128.sh \ + %D%/override-conditional-pr13940.sh \ %D%/remake-timing-bug-pr8365.sh \ %D%/remake-am-pr10111.sh \ %D%/remake-m4-pr10111.sh \ + %D%/subobj-vpath-pr13928.sh \ %D%/var-undef-append.sh \ $(perl_fake_XFAIL_TESTS) @@ -204,6 +204,24 @@ Writing test cases $PERL, $MAKE, $EGREP, and $FGREP, instead of the corresponding commands. +* When you want to redirect the output from a make invocation, use the + 'run_make' function rather than calling $MAKE directly. Not only is + this more idiomatic, but it also avoid possible spurious racy failures + when the make invocations in the testsuite are run in parallel mode + (as with "make check AM_TESTSUITE_MAKE='make -j4"'). + +* Do not override Makefile variables using make arguments, as in e.g.: + + $MAKE prefix=/opt install # BAD + + This is not portable for recursive targets (with non-GNU make, + targets that call a sub-make may not pass "prefix=/opt" along). + Instead, use the 'run_make' function, which automatically uses + the AM_MAKEFLAGS to propagate the variable definitions along to + sub-make: + + run_make prefix=/opt install # GOOD + * Use '$sleep' when you have to make sure that some file is newer than another. diff --git a/t/ax/deltree.pl b/t/ax/deltree.pl index 70607662f..9b638dd19 100644 --- a/t/ax/deltree.pl +++ b/t/ax/deltree.pl @@ -2,6 +2,21 @@ # deltree: recursively removes file and directory, # trying to handle permissions and other complications. +# Copyright (C) 2013 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/>. + use strict; use warnings FATAL => 'all'; use File::Path qw/rmtree/; diff --git a/t/cxx-demo.sh b/t/cxx-demo.sh index f6d568d78..97a46ce00 100644 --- a/t/cxx-demo.sh +++ b/t/cxx-demo.sh @@ -165,7 +165,12 @@ END Good morning, work. END for p in play work; do - ./$p > got.$p || { cat got.$p; exit 1; } + # The program must run correctly (exit status = 0). + ./$p + # And it must have the expected output. Note that we strip extra + # CR characters (if any), to cater to MinGW programs on MSYS. + # See automake bug#14493. + ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; } cat exp.$p cat got.$p diff exp.$p got.$p diff --git a/t/distcheck-pr10470.sh b/t/distcheck-pr10470.sh index 26cce1c50..d210fd360 100644 --- a/t/distcheck-pr10470.sh +++ b/t/distcheck-pr10470.sh @@ -45,13 +45,13 @@ chmod a+x foo.test $ACLOCAL $AUTOCONF -$AUTOMAKE +$AUTOMAKE -a ./configure # We can build the distribution. -run_make -E -e FAIL distcheck +run_make -E distcheck # Sanity check: verify that our code has hit a problem removing # the distdir, but has recovered from it. -grep "rm:.*$destdir" stderr || fatal_ "expected code path not covered" +$EGREP "(^| )(rm|find):.*$distdir" output || fatal_ "expected code path not covered" : diff --git a/t/lex-header.sh b/t/lex-header.sh index e2546142e..60b78c262 100644 --- a/t/lex-header.sh +++ b/t/lex-header.sh @@ -55,6 +55,7 @@ cat > lexer.l << 'END' END cat > main.c <<'END' +#define YY_NO_UNISTD_H 1 #include "mylex.h" int main (void) { diff --git a/t/no-extra-c-stuff.sh b/t/no-extra-c-stuff.sh new file mode 100644 index 000000000..de0dd12e9 --- /dev/null +++ b/t/no-extra-c-stuff.sh @@ -0,0 +1,74 @@ +#! /bin/sh +# Copyright (C) 2013 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/>. + +# Check that Automake doesn't generated rules or definitions related +# to compilation of C sources for a project that doesn't use nor need +# a C Compiler. Inspired by the issues reported in automake bug#14560. + +am_create_testdir=empty +. test-init.sh + +cat > configure.ac <<END +AC_INIT([$me], [1.0]) +AC_CONFIG_AUX_DIR([.]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([ + Makefile + sub/Makefile + sub2/Makefile +]) +AC_PROG_CXX +AC_PROG_F77 +AC_OUTPUT +END + +cat > Makefile.am <<END +SUBDIRS = sub sub2 +bin_PROGRAMS = bar +bar_SOURCES = bar.cc +END + +mkdir sub sub2 + +cat > sub/Makefile.am <<END +bin_PROGRAMS = foo +foo_SOURCES = foo.f +END + +cat > sub2/Makefile.am <<END +bin_PROGRAMS = baz +baz_SOURCES = baz.cxx +END + + +$ACLOCAL +$AUTOCONF +$AUTOMAKE --add-missing + +test -f install-sh +test ! -e compile + +# Sanity checks. +$FGREP '$(CXX)' Makefile.in +$FGREP '$(CXX)' sub2/Makefile.in +$FGREP '$(F77)' Makefile.in sub2/Makefile.in && exit 1 +$FGREP '$(F77)' sub/Makefile.in +$FGREP '$(CXX)' sub/Makefile.in && exit 1 + +$EGREP '(^COMPILE|$\(CC\)|AM_V_CC)' \ + Makefile.in sub/Makefile.in sub2/Makefile.in && exit 1 + +: diff --git a/t/no-extra-makefile-code.sh b/t/no-extra-makefile-code.sh index 01891bf1c..51df42d8c 100644 --- a/t/no-extra-makefile-code.sh +++ b/t/no-extra-makefile-code.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2013 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 @@ -25,9 +25,14 @@ echo AC_OUTPUT >> configure.ac : > Makefile.am +# Automake shouldn't need nor require these. rm -f depcomp compile $ACLOCAL + +# Don't use '--add-missing' here, so that we can implicitly +# check that the auxiliary scripts 'compile' and 'depcomp' +# are not spuriously required by Automake. $AUTOMAKE $EGREP 'INCLUDE|-compile|\$\(OBJEXT\)|tab\.[ch]' Makefile.in && exit 1 diff --git a/t/override-conditional-pr13940.sh b/t/override-conditional-pr13940.sh new file mode 100644 index 000000000..4bc412888 --- /dev/null +++ b/t/override-conditional-pr13940.sh @@ -0,0 +1,44 @@ +#! /bin/sh +# Copyright (C) 2013 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/>. + +# Expose automake bug#1394: automake erroneously think that a .PHONY +# target's rule is overridden only because we declare dependencies +# to such targets twice: one in an Automake conditional, and once +# unconditionally. + +. test-init.sh + +cat >> configure.ac << 'END' +AM_CONDITIONAL([FOO], [true]) +AC_OUTPUT +END + +cat > Makefile.am << 'END' +# The conditional here is important: Automake only appears to warn +# when one of the all-local rules is inside a conditional and the +# other is not. +if FOO +all-local: bar +bar: ; @echo bar +endif +all-local: baz +baz: ; @echo baz +END + +$ACLOCAL +$AUTOMAKE -a + +: diff --git a/t/remake-configure-dependencies.sh b/t/remake-configure-dependencies.sh index c24a8ca63..0a4585029 100644 --- a/t/remake-configure-dependencies.sh +++ b/t/remake-configure-dependencies.sh @@ -61,6 +61,7 @@ $AUTOMAKE ./configure $MAKE test-1 +$sleep (echo '#!/bin/sh' && echo 'printf %s 2.1') > print-version $MAKE test-2 @@ -69,6 +70,8 @@ mkdir build cd build ../configure $MAKE test-2 + +$sleep (echo '#!/bin/sh' && echo 'printf %s 3.14') > ../print-version $MAKE test-3 diff --git a/t/subobj-indir-pr13928.sh b/t/subobj-indir-pr13928.sh new file mode 100644 index 000000000..11b865c8e --- /dev/null +++ b/t/subobj-indir-pr13928.sh @@ -0,0 +1,49 @@ +#! /bin/sh +# Copyright (C) 2013 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/>. + +# Expose part of Automake bug#13928: config.status generates broken +# makefiles if the subdir-objects option is used and a _SOURCES +# variable lists sources whose directory part is specified as a +# make variable ("foo_SOURCES = $(src)/foo.c"). + +required=cc +. test-init.sh + +cat >> configure.ac << 'END' +AC_PROG_CC +AM_PROG_CC_C_O +AC_OUTPUT +END + +cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +src = s +bin_PROGRAMS = foo +foo_SOURCES = $(src)/foo.c +END + +mkdir s +echo 'int main(void) { return 0; }' > s/foo.c + +$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" + +./configure +$MAKE +test -f s/.deps/foo.Po +find . | $FGREP '$(src)' && exit 1 +$MAKE distcheck + +: diff --git a/t/subobj-vpath-pr13928.sh b/t/subobj-vpath-pr13928.sh new file mode 100644 index 000000000..96cb219d8 --- /dev/null +++ b/t/subobj-vpath-pr13928.sh @@ -0,0 +1,60 @@ +#! /bin/sh +# Copyright (C) 2013 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/>. + +# Expose part of automake bug#13928: if the subdir-objects option is +# in use and a source file is listed in a _SOURCES variable with a +# leading $(srcdir) component, Automake will generate a Makefile that +# tries to create the corresponding object file in $(srcdir) as well. + +required=cc +. test-init.sh + +cat >> configure.ac << 'END' +AC_PROG_CC +AM_PROG_CC_C_O +AC_OUTPUT +END + +cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +noinst_PROGRAMS = test +test_SOURCES = $(srcdir)/test.c +test-objs: + test ! -f $(srcdir)/test.$(OBJEXT) + test -f test.$(OBJEXT) +END + +$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" + +$EGREP 'test\.|DEPDIR|dirstamp|srcdir' Makefile.in || : # For debugging. +$EGREP '\$.srcdir./test\.[o$]' Makefile.in && exit 1 +$FGREP '$(srcdir)/$(am__dirstamp)' Makefile.in && exit 1 +$FGREP '$(srcdir)/$(DEPDIR)' && exit 1 + +cat > test.c << 'END' +int main (void) +{ + return 0; +} +END + +mkdir build && cd build || fatal "preparation of build directory failed" +../configure || fatal_ "./configure failed" + +$MAKE +$MAKE test-objs + +: diff --git a/t/suffix-extra-c-stuff-pr14560.sh b/t/suffix-extra-c-stuff-pr14560.sh new file mode 100644 index 000000000..45fdd1774 --- /dev/null +++ b/t/suffix-extra-c-stuff-pr14560.sh @@ -0,0 +1,37 @@ +#! /bin/sh +# Copyright (C) 2013 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 bug#14560: if multiple user-specified suffix rules were +# present, Automake could generate useless definitions and rules +# related to C compilation. + +. test-init.sh + +cat > Makefile.am <<'END' +.foo.bar: + foo2bar -o $@ $< +.baz.qux: + baz2qux -o $@ $< +bin_SCRIPTS = a.bar b.qux +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +$EGREP '\$\(CC\)|COMPILE|AM_V_CC|-compile|INCLUDES' Makefile.in && exit 1 + +: diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh index 0ddebd9a0..e652d9de6 100644 --- a/t/tags-pr12372.sh +++ b/t/tags-pr12372.sh @@ -63,7 +63,17 @@ $AUTOMAKE ./configure -$MAKE +# Exuberant Ctags (at least version 5.8) doesn't generate any tags +# for file extensions it doesn't recognize. This can be fixed by +# using the '--langmap' option. But we must be careful, because +# etags from Emacs (at least version 23.4) doesn't recognize that +# option. +if etags --help | grep '.*--langmap'; then + run_make ETAGSFLAGS="--langmap=c:+.pc" +else + $MAKE +fi + cat TAGS cat sub/TAGS $FGREP foo-main.pc TAGS diff --git a/t/txinfo-no-split.sh b/t/txinfo-no-split.sh index aecf7e735..6a50f1ccb 100644 --- a/t/txinfo-no-split.sh +++ b/t/txinfo-no-split.sh @@ -34,6 +34,13 @@ check-local: test "`find $(srcdir) . | grep '\.info'`" = "$(srcdir)/foo.info" END +# Systems lacking a working TeX installation cannot run "make dvi". +if test -z "$TEX"; then + warn_ "TeX installation missing, \"make dvi\" will be skipped" + echo AUTOMAKE_OPTIONS = -Wno-override >> Makefile.am + echo 'dvi:; @echo Tex is missing, do nothing' >> Makefile.am +fi + cat > foo.texi << 'END' \input texinfo @setfilename foo.info diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh index f41cdf4bb..1a7eed952 100644 --- a/t/yacc-bison-skeleton.sh +++ b/t/yacc-bison-skeleton.sh @@ -22,6 +22,7 @@ required='cc bison' cat >> configure.ac << 'END' AC_PROG_CC +AC_C_INLINE dnl Required by some pre-C99 compilers such as MSVC. AC_PROG_YACC AC_OUTPUT END |