diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | NEWS | 14 | ||||
-rw-r--r-- | THANKS | 2 | ||||
-rw-r--r-- | bin/automake.in | 56 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/automake.texi | 47 | ||||
-rwxr-xr-x | gen-testsuite-part | 8 | ||||
-rw-r--r-- | lib/am/distdir.am | 9 | ||||
-rw-r--r-- | lib/am/header-vars.am | 35 | ||||
-rw-r--r-- | lib/am/texi-vers.am | 18 | ||||
-rwxr-xr-x | lib/config.guess | 173 | ||||
-rwxr-xr-x | lib/config.sub | 36 | ||||
-rwxr-xr-x | lib/gitlog-to-changelog | 9 | ||||
-rwxr-xr-x | lib/gnupload | 2 | ||||
-rwxr-xr-x | lib/update-copyright | 2 | ||||
-rw-r--r-- | m4/amversion.m4 | 4 | ||||
-rw-r--r-- | m4/init.m4 | 6 | ||||
-rw-r--r-- | m4/lispdir.m4 | 2 | ||||
-rw-r--r-- | t/Makefile.inc | 4 | ||||
-rw-r--r-- | t/aminit-trailing-dnl-comment-pr16841.sh | 44 | ||||
-rw-r--r-- | t/distcom-subdir.sh | 53 | ||||
-rw-r--r-- | t/distcom2.sh | 14 | ||||
-rw-r--r-- | t/distcom3.sh | 24 | ||||
-rw-r--r-- | t/distcom4.sh | 30 | ||||
-rw-r--r-- | t/distcom5.sh | 44 | ||||
-rw-r--r-- | t/hdr-vars-defined-once.sh | 25 | ||||
-rw-r--r-- | t/list-of-tests.mk | 1 |
27 files changed, 306 insertions, 360 deletions
diff --git a/Makefile.am b/Makefile.am index 143308a11..8501e2a0e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,7 +72,7 @@ generated_file_finalize = $(AM_V_at) \ # For some tests or targets, we need to have the just-build automake and # aclocal scripts avaiable on PATH. extend_PATH = \ - { PATH='$(abs_builddir)/t/wrap'$(PATH_SEPARATOR)$$PATH && export PATH; } + { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export PATH; } # The master location for INSTALL is lib/INSTALL. # This is where "make fetch" will install new versions. @@ -108,6 +108,18 @@ New in 1.14.2: * Bugs fixed: + - The expansion of AM_INIT_AUTOMAKE ends once again with a trailing + newline (bug#16841). Regression introduced in Automake 1.14. + + - The code used to detect whether the currently used make is GNU make + or not (relying on the private macro 'am__is_gnu_make') no longer + risks causing "Arg list too long" for projects using automatic + dependency tracking and having a ton of source files (bug#18744). + + - Automake tries to offer a more deterministic output for generated + Makefiles, in the face of the newly-introduced randomization for + hash keys order in Perl 5.18. + - In older Automake versions, if a user defined one single Makefile fragment (say 'foo.am') to be included (via Automake includes) in his main Makefile.am, and defined a custom make rule to generate that @@ -130,7 +142,7 @@ New in 1.14.1: was only relevant when the number of python files was high (which is unusual in practice). - - Automake try to offer a more reproducible output for warning messages, + - Automake try to offer a more deterministic output for warning messages, in the face of the newly-introduced randomization for hash keys order in Perl 5.18. @@ -152,10 +152,12 @@ Harlan Stenn Harlan.Stenn@pfcs.com He Li tippa000@yahoo.com Henrik Frystyk Nielsen frystyk@w3.org Hib Eris hib@hiberis.nl +Hilko Bengen bengen@debian.org Ian Lance Taylor ian@cygnus.com Ignacy Gawedzki i@lri.fr Илья Н. Голубев gin@mo.msk.ru Imacat imacat@mail.imacat.idv.tw +Infirit infirit@gmail.com Inoue inoue@ainet.or.jp Jack Kelly jack@jackkelly.name James Amundson amundson@users.sourceforge.net diff --git a/bin/automake.in b/bin/automake.in index 283d1bbfe..d48b2863d 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -342,7 +342,7 @@ my %extension_map = (); # List of the DIST_COMMON files we discovered while reading # configure.ac. -my $configure_dist_common = ''; +my @configure_dist_common = (); # This maps languages names onto objects. my %languages = (); @@ -489,6 +489,9 @@ my %language_scratch; # handling on a per-language basis. my %lang_specific_files; +# List of distributed files to be put in DIST_COMMON. +my @dist_common; + # This is set when 'handle_dist' has finished. Once this happens, # we should no longer push on dist_common. my $handle_dist_run; @@ -586,8 +589,11 @@ sub initialize_per_input () @dist_targets = (); + @dist_common = (); + $handle_dist_run = 0; + %known_programs = (); - %known_libraries= (); + %known_libraries = (); %extension_seen = (); @@ -595,8 +601,6 @@ sub initialize_per_input () %lang_specific_files = (); - $handle_dist_run = 0; - $need_link = 0; $must_handle_compiled_objects = 0; @@ -3693,8 +3697,8 @@ sub handle_dist () } } - # We might copy elements from $configure_dist_common to - # %dist_common if we think we need to. If the file appears in our + # We might copy elements from @configure_dist_common to + # @dist_common if we think we need to. If the file appears in our # directory, we would have discovered it already, so we don't # check that. But if the file is in a subdir without a Makefile, # we want to distribute it here if we are doing '.'. Ugly! @@ -3706,23 +3710,25 @@ sub handle_dist () # See also automake bug#9651. if ($relative_dir eq '.') { - foreach my $file (split (' ' , $configure_dist_common)) + foreach my $file (@configure_dist_common) { my $dir = dirname ($file); push_dist_common ($file) if ($dir eq '.' || ! is_make_dir ($dir)); } + @configure_dist_common = (); } - # Files to distributed. Don't use ->value_as_list_recursive - # as it recursively expands '$(dist_pkgdata_DATA)' etc. - my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value); - @dist_common = uniq (@dist_common); - variable_delete 'DIST_COMMON'; - define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common); + # $(am__DIST_COMMON): files to be distributed automatically. Will be + # appended to $(DIST_COMMON) in the generated Makefile. + # Use 'sort' so that the expansion of $(DIST_COMMON) in the generated + # Makefile is deterministic, in face of m4 and/or perl randomizations + # (see automake bug#17908). + define_pretty_variable ('am__DIST_COMMON', TRUE, INTERNAL, + uniq (sort @dist_common)); - # Now that we've processed DIST_COMMON, disallow further attempts - # to set it. + # Now that we've processed @dist_common, disallow further attempts + # to modify it. $handle_dist_run = 1; $transform{'DISTCHECK-HOOK'} = !! rule 'distcheck-hook'; @@ -5432,8 +5438,7 @@ sub scan_autoconf_files () if -f $config_aux_dir . '/install.sh'; # Preserve dist_common for later. - $configure_dist_common = variable_value ('DIST_COMMON') || ''; - + @configure_dist_common = @dist_common; } ################################################################ @@ -7399,11 +7404,10 @@ sub required_file_check_or_copy return if $found_it && (! $add_missing || ! $force_missing); - # If we've already looked for it, we're done. You might - # wonder why we don't do this before searching for the - # file. If we do that, then something like - # AC_OUTPUT(subdir/foo foo) will fail to put foo.in into - # DIST_COMMON. + # If we've already looked for it, we're done. You might wonder why we + # don't do this before searching for the file. If we do that, then + # something like AC_OUTPUT([subdir/foo foo]) will fail to put 'foo.in' + # into $(DIST_COMMON). if (! $found_it) { return if defined $required_file_not_found{$fullfile}; @@ -7690,8 +7694,7 @@ sub push_dist_common { prog_error "push_dist_common run after handle_dist" if $handle_dist_run; - Automake::Variable::define ('DIST_COMMON', VAR_AUTOMAKE, '+', TRUE, "@_", - '', INTERNAL, VAR_PRETTY); + push @dist_common, @_; } @@ -7883,10 +7886,7 @@ sub generate_makefile # Helper function for usage(). sub print_autodist_files { - # NOTE: we need to call our 'uniq' function with the leading '&' - # here, because otherwise perl complains that "Unquoted string - # 'uniq' may clash with future reserved word". - my @lcomm = sort (&uniq (@_)); + my @lcomm = uniq (sort @_); my @four; format USAGE_FORMAT = diff --git a/configure.ac b/configure.ac index 0500ed877..0098131c1 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. AC_PREREQ([2.69]) -AC_INIT([GNU Automake], [1.14.1], [bug-automake@gnu.org]) +AC_INIT([GNU Automake], [1.14.1a], [bug-automake@gnu.org]) AC_CONFIG_SRCDIR([bin/automake.in]) AC_CONFIG_AUX_DIR([lib]) diff --git a/doc/automake.texi b/doc/automake.texi index cd33ad7c3..e690d52b7 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -2,6 +2,8 @@ @c %**start of header @setfilename automake.info @settitle automake +@documentencoding UTF-8 +@documentlanguage en @setchapternewpage off @c %**end of header @@ -1828,7 +1830,7 @@ variable definitions. @cindex indentation in Makefile.am Generally, Automake is not particularly smart in the parsing of unusual Makefile constructs, so you're advised to avoid fancy constructs or -``creative'' use of whitespaces. +``creative'' use of whitespace. @c Keep this in sync with doc-parsing-buglets-tabs.sh For example, @key{TAB} characters cannot be used between a target name and the following ``@code{:}'' character, and variable assignments @@ -3276,7 +3278,7 @@ find third-party @file{.m4} files. When this option is given, normal processing is suppressed. This option was used @emph{in the past} by third-party packages to determine where to install @file{.m4} macro files, but @emph{this usage is today discouraged}, since it causes -@samp{$(prefix)} not to be thoroughly honoured (which violates the +@samp{$(prefix)} not to be thoroughly honored (which violates the GNU Coding Standards), and a similar semantics can be better obtained with the @env{ACLOCAL_PATH} environment variable; @pxref{Extending aclocal}. @@ -3472,7 +3474,7 @@ Also note that, if the @option{--install} option is used, any @file{.m4} file containing a required macro that is found in a directory listed in @env{ACLOCAL_PATH} will be installed locally. @c Keep in sync with aclocal-path-installed-serial.sh -In this case, serial numbers in @file{.m4} are honoured too, +In this case, serial numbers in @file{.m4} are honored too, @pxref{Serials}. Conversely to @file{dirlist}, @env{ACLOCAL_PATH} is useful if you are @@ -3912,12 +3914,15 @@ This usage is mostly obsolete because the @var{package} and @var{version} can be obtained from Autoconf's @code{AC_INIT} macro. However, differently from what happens for @code{AC_INIT} invocations, this @code{AM_INIT_AUTOMAKE} invocation supports shell variables' expansions -in the @code{PACKAGE} and @code{VERSION} arguments, and this can be -still be useful in some selected situations. Our hope is that future -Autoconf versions will improve their support for package versions -defined dynamically at configure runtime; when (and if) this happens, -support for the two-args @code{AM_INIT_AUTOMAKE} invocation will likely -be removed from Automake. +in the @code{PACKAGE} and @code{VERSION} arguments (which otherwise +defaults, respectively, to the @code{PACKAGE_TARNAME} and +@code{PACKAGE_VERSION} defined via the @code{AC_INIT} invocation; +@pxref{AC_INIT, , The @code{AC_INIT} macro, autoconf, The Autoconf Manual}); +and this can be still be useful in some selected situations. +Our hope is that future Autoconf versions will improve their support +for package versions defined dynamically at configure runtime; when +(and if) this happens, support for the two-args @code{AM_INIT_AUTOMAKE} +invocation will likely be removed from Automake. @anchor{Modernize AM_INIT_AUTOMAKE invocation} If your @file{configure.ac} has: @@ -7874,7 +7879,7 @@ All of these targets can be extended using @samp{-local} rules If the @file{.texi} file @code{@@include}s @file{version.texi}, then that file will be automatically generated. The file @file{version.texi} -defines four Texinfo flag you can reference using +defines four Texinfo flags you can reference using @code{@@value@{EDITION@}}, @code{@@value@{VERSION@}}, @code{@@value@{UPDATED@}}, and @code{@@value@{UPDATED-MONTH@}}. @@ -8379,9 +8384,13 @@ We recommend that you follow this same set of heuristics in your The @code{dist} rule in the generated @file{Makefile.in} can be used to generate a gzipped @code{tar} file and other flavors of archive for distribution. The file is named based on the @code{PACKAGE} and -@code{VERSION} variables defined by @code{AM_INIT_AUTOMAKE} -(@pxref{Macros}); more precisely the gzipped @code{tar} file is named -@samp{@var{package}-@var{version}.tar.gz}. +@code{VERSION} variables automatically defined by either the +@code{AC_INIT} invocation or by a @emph{deprecated} two-arguments +invocation of the @code{AM_INIT_AUTOMAKE} macro (see @ref{Public Macros} +for how these variables get their values, from either defaults or explicit +values -- it's slightly trickier than one would expect). +More precisely the gzipped @code{tar} file is named +@samp{$@{PACKAGE@}-$@{VERSION@}.tar.gz}. @vindex GZIP_ENV You can use the @command{make} variable @code{GZIP_ENV} to control how gzip is run. The default setting is @option{--best}. @@ -8476,7 +8485,7 @@ dist-hook: rm -rf `find $(distdir)/doc -type d -name .svn` @end example -@c The caveates described here should be documented in 'disthook.sh'. +@c The caveats described here should be documented in 'disthook.sh'. @noindent Note that the @code{dist-hook} recipe shouldn't assume that the regular files in the distribution directory are writable; this might not be the @@ -9489,7 +9498,7 @@ The @file{.trs} file is used to register some metadata through the use of custom reStructuredText fields. This metadata is expected to be employed in various ways by the parallel test harness; for example, to count the test results when printing the testsuite summary, or to decide -which tests to re-run upon @command{make reheck}. Unrecognized metadata +which tests to re-run upon @command{make recheck}. Unrecognized metadata in a @file{.trs} file is currently ignored by the harness, but this might change in the future. The list of currently recognized metadata follows. @@ -10149,7 +10158,11 @@ brittle. @opindex no-define This option is meaningful only when passed as an argument to @code{AM_INIT_AUTOMAKE}. It will prevent the @code{PACKAGE} and -@code{VERSION} variables from being @code{AC_DEFINE}d. +@code{VERSION} variables from being @code{AC_DEFINE}d. But notice +that they will remain defined as shell variables in the generated +@code{configure}, and as make variables in the generated +@code{Makefile}; this is deliberate, and required for backward +compatibility. @item @option{no-dependencies} @cindex Option, @option{no-dependencies} @@ -12978,7 +12991,7 @@ instance, here is how @code{AM_PATH_LISPDIR} (@pxref{Emacs Lisp}) computes @samp{$(lispdir)}: @example -$EMACS -batch -q -eval '(while load-path +$EMACS -batch -Q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' >conftest.out lispdir=`sed -n diff --git a/gen-testsuite-part b/gen-testsuite-part index 3bd5c9f01..32158bac2 100755 --- a/gen-testsuite-part +++ b/gen-testsuite-part @@ -297,8 +297,9 @@ foreach my $test (@all_tests) $wrapper_setups{$test} = \@setups if @setups; } # And now create all the wrapper tests. -while (my ($wrapped_test, $setup_list) = each %wrapper_setups) +for my $wrapped_test (sort keys %wrapper_setups) { + my $setup_list = $wrapper_setups{$wrapped_test}; (my $base = $wrapped_test) =~ s/\.([^.]*)$//; my $suf = $1 or die "$me: test '$wrapped_test' lacks a suffix\n"; my $count = 0; @@ -359,7 +360,7 @@ my %depmodes = foreach my $lt (TRUE, FALSE) { - foreach my $m (keys %depmodes) + foreach my $m (sort keys %depmodes) { my $planned = ($lt && $m eq "auto") ? 84 : 28; my @required = @@ -414,8 +415,9 @@ print <<EOF; EOF -while (my ($k, $x) = each %deps_extractor) +for my $k (sort keys %deps_extractor) { + my $x = $deps_extractor{$k}; my $dist_prereqs = $x->{dist_prereqs} || ""; my $nodist_prereqs = $x->{nodist_prereqs} || ""; my @tests = grep { line_match $x->{line_matcher}, $_ } @all_tests; diff --git a/lib/am/distdir.am b/lib/am/distdir.am index a8ad63cef..5a13055fc 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -14,6 +14,7 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see <http://www.gnu.org/licenses/>. +DIST_COMMON += $(am__DIST_COMMON) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) if %?TOPDIR_P% @@ -339,8 +340,8 @@ dist-xz: distdir ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z .PHONY: dist-tarZ dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) @@ -348,9 +349,9 @@ dist-tarZ: distdir ?SHAR?DIST_ARCHIVES += $(distdir).shar.gz .PHONY: dist-shar dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index d25efa612..9283903a1 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994-2013 Free Software Foundation, Inc. +## Copyright (C) 1994-2014 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 @@ -27,9 +27,36 @@ VPATH = @srcdir@ ## DESTDIR = ## Shell code that determines whether we are running under GNU make. -## This is somewhat of an hack, and might be improved, but is good -## enough for now. -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +## +## Why the this needs to be so convoluted? +## +## (1) We can't unconditionally use make functions or special variables +## starting with a dot, as those cause non-GNU implmentations to +## crash hard. +## +## (2) We can't use $(MAKE_VERSION) here, as it is also defined in some +## non-GNU make implementations (e.g., FreeBSD make). But at least +## BSD make does *not* define the $(CURDIR) variable -- it uses +## $(.CURDIR) instead. +## +## (3) We can't use $(MAKEFILE_LIST) here, as in some situations it +## might cause the shell to die with "Arg list too long" (see +## automake bug#18744). +## +## (4) We can't use $(MAKE_HOST) unconditionally, as it is only +## defined in GNU make 4.0 or later. +## +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} ## Shell code that determines whether the current make instance is ## running with a given one-letter option (e.g., -k, -n) that takes diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am index bddf3827d..e98bb8234 100644 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@ -31,25 +31,25 @@ DIST_COMMON += %VTEXI% %STAMPVTI% ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file ## should never be dependent upon a non-distributed built file. ## Therefore we ensure that %DIRSTAMP% exists in the rule. +## Use cp + mv so that the update of %VTEXI% is atomic even if +## the source directory is on a different file system. ?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP% @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \ set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)") > %VTI%.tmp -## Use cp and rm here because some older "mv"s can't move across -## filesystems. Furthermore, GNU "mv" in the AmigaDOS environment -## can't handle this. - @cmp -s %VTI%.tmp %VTEXI% \ - || (echo "Updating %VTEXI%"; \ - cp %VTI%.tmp %VTEXI%) - -@rm -f %VTI%.tmp + echo "@set VERSION $(VERSION)") > %VTI%.tmp$$$$ && \ + (cmp -s %VTI%.tmp$$$$ %VTEXI% \ + || (echo "Updating %VTEXI%" && \ + cp %VTI%.tmp$$$$ %VTEXI%.tmp$$$$ && \ + mv %VTEXI%.tmp$$$$ %VTEXI%)) && \ + rm -f %VTI%.tmp$$$$ %VTEXI%.$$$$ @cp %VTEXI% $@ mostlyclean-am: mostlyclean-%VTI% mostlyclean-%VTI%: - -rm -f %VTI%.tmp + -rm -f %VTI%.tmp* %VTEXI%.tmp* maintainer-clean-am: maintainer-clean-%VTI% maintainer-clean-%VTI%: diff --git a/lib/config.guess b/lib/config.guess index 9afd67620..6c32c8645 100755 --- a/lib/config.guess +++ b/lib/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-11-29' +timestamp='2014-11-04' # 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 @@ -24,12 +24,12 @@ timestamp='2013-11-29' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to <config-patches@gnu.org>. me=`echo "$0" | sed -e 's,.*/,,'` @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -149,7 +149,7 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac @@ -579,8 +579,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -826,7 +827,7 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -969,10 +970,10 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} exit ;; - or32:Linux:*:*) + or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) @@ -1371,154 +1372,6 @@ EOF exit ;; esac -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <<EOF $0: unable to guess system type diff --git a/lib/config.sub b/lib/config.sub index 61cb4bc22..7ffe37378 100755 --- a/lib/config.sub +++ b/lib/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-10-01' +timestamp='2014-12-03' # 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 @@ -25,7 +25,7 @@ timestamp='2013-10-01' # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to <config-patches@gnu.org>. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -283,8 +283,10 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -296,11 +298,11 @@ case $basic_machine in | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or1k | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -311,6 +313,7 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -325,6 +328,9 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none @@ -402,8 +408,10 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -415,6 +423,7 @@ case $basic_machine in | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -432,6 +441,7 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -769,6 +779,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -824,6 +837,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1369,14 +1386,14 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1594,9 +1611,6 @@ case $basic_machine in mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; diff --git a/lib/gitlog-to-changelog b/lib/gitlog-to-changelog index e02d34c21..190f7b5db 100755 --- a/lib/gitlog-to-changelog +++ b/lib/gitlog-to-changelog @@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2012-07-29 06:11'; # UTC +my $VERSION = '2014-11-20 17:25'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# Copyright (C) 2008-2014 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 @@ -72,6 +72,7 @@ OPTIONS: directory can be derived. --since=DATE convert only the logs since DATE; the default is to convert all log entries. + --until=DATE convert only the logs older than DATE. --format=FMT set format string for commit subject and body; see 'man git-log' for the list of format metacharacters; the default is '%s%n%b%n' @@ -220,6 +221,7 @@ sub git_dir_option($) { my $since_date; + my $until_date; my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; @@ -232,6 +234,7 @@ sub git_dir_option($) help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, + 'until=s' => \$until_date, 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, @@ -243,6 +246,8 @@ sub git_dir_option($) defined $since_date and unshift @ARGV, "--since=$since_date"; + defined $until_date + and unshift @ARGV, "--until=$until_date"; # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) # that makes a correction in the log or attribution of that commit. diff --git a/lib/gnupload b/lib/gnupload index e3ac1ba0c..0832e16c9 100755 --- a/lib/gnupload +++ b/lib/gnupload @@ -3,7 +3,7 @@ scriptversion=2013-03-19.17; # UTC -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 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/lib/update-copyright b/lib/update-copyright index c72d0e67d..90624e900 100755 --- a/lib/update-copyright +++ b/lib/update-copyright @@ -5,7 +5,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' my $VERSION = '2013-01-03.09:41'; # UTC -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 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/m4/amversion.m4 b/m4/amversion.m4 index 0454321f6..645b18df7 100644 --- a/m4/amversion.m4 +++ b/m4/amversion.m4 @@ -15,7 +15,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.14.1a], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -31,7 +31,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.14.1a])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff --git a/m4/init.m4 b/m4/init.m4 index 432ff200c..d8350fe44 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -164,7 +164,11 @@ to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further diff --git a/m4/lispdir.m4 b/m4/lispdir.m4 index 4e0c9140d..ed2e224c2 100644 --- a/m4/lispdir.m4 +++ b/m4/lispdir.m4 @@ -34,7 +34,7 @@ AC_DEFUN([AM_PATH_LISPDIR], # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. - AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out]) + AC_RUN_LOG([$EMACS -batch -Q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out]) am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ diff --git a/t/Makefile.inc b/t/Makefile.inc index b67f3a581..e4fe06c27 100644 --- a/t/Makefile.inc +++ b/t/Makefile.inc @@ -64,9 +64,9 @@ AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_; # in case it is given with a relative name containing no slashes. AM_TESTS_ENVIRONMENT += \ if test $(srcdir) != .; then \ - PATH='$(abs_srcdir)/%D%/ax'$(PATH_SEPARATOR)$$PATH; \ + PATH='$(abs_srcdir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \ fi; \ - PATH='$(abs_builddir)/%D%/ax'$(PATH_SEPARATOR)$$PATH; \ + PATH='$(abs_builddir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \ export PATH; # Hand-written tests. diff --git a/t/aminit-trailing-dnl-comment-pr16841.sh b/t/aminit-trailing-dnl-comment-pr16841.sh new file mode 100644 index 000000000..fc73ebead --- /dev/null +++ b/t/aminit-trailing-dnl-comment-pr16841.sh @@ -0,0 +1,44 @@ +#! /bin/sh +# Copyright (C) 2014 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 a trailing 'dnl' m4 comment automake after the +# AM_INIT_AUTOMAKE invocation doesn't produce a syntactically +# invalid configure script. This used to be the case until +# automake 1.13, but we broke that in automake 1.14. See +# automake bug#16841. + +am_create_testdir=empty +. test-init.sh + +cat > configure.ac <<END +AC_INIT([test-pr16841], [1.0]) +AM_INIT_AUTOMAKE([1.14 -Werror]) dnl Some comment +echo "OK OK OK" +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +END + +: > Makefile.am + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure >stdout || { cat stdout; exit 1; } +cat stdout +grep '^OK OK OK$' stdout + +: diff --git a/t/distcom-subdir.sh b/t/distcom-subdir.sh index b3651f1cd..df40f96cd 100644 --- a/t/distcom-subdir.sh +++ b/t/distcom-subdir.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 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 @@ -17,59 +17,60 @@ # Test to make sure that if an auxfile (here depcomp) is required # by a subdir Makefile.am, it is distributed by that Makefile.am. +required=cc . test-init.sh cat >> configure.ac << 'END' AC_CONFIG_FILES([subdir/Makefile]) AC_PROG_CC +AC_PROG_FGREP AC_OUTPUT END cat > Makefile.am << 'END' SUBDIRS = subdir +test-distdir: distdir + test -f $(distdir)/depcomp +.PHONY: test-distdir +check-local: test-distdir END rm -f depcomp mkdir subdir -: > subdir/Makefile.am +cat > subdir/Makefile.am << 'END' +.PHONY: test-distcom +test-distcom: + echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp ' +END $ACLOCAL $AUTOCONF $AUTOMAKE test ! -e depcomp -cat > subdir/Makefile.am << 'END' +cat >> subdir/Makefile.am << 'END' bin_PROGRAMS = foo +.PHONY: test-distcom +test-distcom: + echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp ' +check-local: test-distcom END -: > subdir/foo.c +cat > subdir/foo.c <<'END' +int main (void) +{ + return 0; +} +END $AUTOMAKE -a subdir/Makefile test -f depcomp -# FIXME: the logic of this check and other similar ones in other -# FIXME: 'distcom*.sh' files should be factored out in a common -# FIXME: subroutine in 'am-test-lib.sh'... -sed -n -e " - /^DIST_COMMON =.*\\\\$/ { - :loop - p - n - t clear - :clear - s/\\\\$/\\\\/ - t loop - s/$/ / - s/[$tab ][$tab ]*/ /g - p - n - }" subdir/Makefile.in > dc.txt -cat dc.txt -$FGREP ' $(top_srcdir)/depcomp ' dc.txt - ./configure -$MAKE distdir -test -f $distdir/depcomp +(cd subdir && $MAKE test-distcom) +$MAKE test-distdir + +$MAKE distcheck : diff --git a/t/distcom2.sh b/t/distcom2.sh index 1f39b6679..3eb03762d 100644 --- a/t/distcom2.sh +++ b/t/distcom2.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 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 @@ -51,22 +51,18 @@ for opt in '' --no-force; do test -f depcomp for dir in . subdir; do - # FIXME: the logic of this check and other similar ones in other - # FIXME: 'distcom*.sh' files should be factored out in a common - # FIXME: subroutine in 'am-test-lib.sh'... sed -n -e " - /^DIST_COMMON =.*\\\\$/ { + /^am__DIST_COMMON =.*/ { + b body :loop - p n - t clear - :clear + :body + p s/\\\\$/\\\\/ t loop s/$/ / s/[$tab ][$tab ]*/ /g p - n }" $dir/Makefile.in > $dir/dc.txt done diff --git a/t/distcom3.sh b/t/distcom3.sh index d5dc295c5..6f1ebaf3a 100644 --- a/t/distcom3.sh +++ b/t/distcom3.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 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 @@ -19,9 +19,13 @@ . test-init.sh +echo AC_OUTPUT >> configure.ac + cat > Makefile.am << 'END' README: echo 'I bet you are reading me.' > README +test-distcommon: + echo ' ' $(DIST_COMMON) ' ' | grep ' README ' END # Files required by '--gnu'. @@ -36,20 +40,14 @@ $AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; exit 1; } cat output grep README output && exit 1 -sed -n -e '/^DIST_COMMON =.*\\$/ { - :loop - p - n - t clear - :clear - s/\\$/\\/ - t loop - p - n - }' -e '/^DIST_COMMON =/ p' Makefile.in | grep README - +$AUTOCONF +./configure +$MAKE test-distcommon +$MAKE distdir +test -f $distdir/README # Should warn about missing README. +rm -f README : > Makefile.am AUTOMAKE_fails --add-missing --gnu grep 'required file.*README.*not found' stderr diff --git a/t/distcom4.sh b/t/distcom4.sh index 3febb61e8..39b5b7179 100644 --- a/t/distcom4.sh +++ b/t/distcom4.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 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 @@ -43,8 +43,13 @@ mkdir tests : > README : > tests/wrapper.in cat > Makefile.am << 'END' -.PHONY: test -test: distdir +.PHONY: test1 test 2 +test1: + for x in $(DIST_COMMON); do echo $$x; done \ + | grep 'tests/' > lst + cat lst # For debugging. + test `wc -l <lst` -eq 1 +test2: distdir test -f $(distdir)/tests/wrapper.in END @@ -52,23 +57,6 @@ $ACLOCAL $AUTOCONF $AUTOMAKE --add-missing ./configure -$MAKE test - -sed -n -e '/^DIST_COMMON =.*\\$/ { - :loop - p - n - t clear - :clear - s/\\$/\\/ - t loop - p - n - }' -e '/^DIST_COMMON =/ p' Makefile.in > dc.txt - -cat dc.txt # For debugging. - -test 1 -eq $(grep -c tests dc.txt) -grep configure dc.txt +$MAKE test1 test2 : diff --git a/t/distcom5.sh b/t/distcom5.sh index 72f51869f..939702f14 100644 --- a/t/distcom5.sh +++ b/t/distcom5.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 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 @@ -21,21 +21,6 @@ . test-init.sh -extract_distcommon () -{ - sed -n -e '/^DIST_COMMON =.*\\$/ { - :loop - p - n - t clear - :clear - s/\\$/\\/ - t loop - p - n - }' -e '/^DIST_COMMON =/ p' ${1+"$@"} -} - cat >> configure.ac << 'END' AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in], [chmod +x tests/autoconf]) @@ -57,28 +42,31 @@ END mkdir tests : > tests/wrapper.in -: > tests/Makefile.am + cat > Makefile.am << 'END' SUBDIRS = tests .PHONY: test test: distdir test -f $(distdir)/tests/wrapper.in +check-local: test + for x in $(DIST_COMMON); do echo $$x; done \ + | grep tests && exit 1; : +END + +cat > tests/Makefile.am <<'END' +check-local: + for x in $(DIST_COMMON); do echo $$x; done \ + | grep wrapper.in > lst + cat lst # For debugging. + test `wc -l <lst` -eq 1 END $ACLOCAL $AUTOCONF $AUTOMAKE --add-missing ./configure -$MAKE test - -extract_distcommon Makefile.in > top.txt -extract_distcommon tests/Makefile.in > inner.txt - -# Might be useful for debugging. -cat top.txt -cat inner.txt - -test 0 -eq $(grep -c tests top.txt) -test 1 -eq $(grep -c wrapper inner.txt) +$MAKE check +# Sanity check. +test -f tests/lst : diff --git a/t/hdr-vars-defined-once.sh b/t/hdr-vars-defined-once.sh index 91fbcb63b..fdf0bb76d 100644 --- a/t/hdr-vars-defined-once.sh +++ b/t/hdr-vars-defined-once.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 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,25 +25,22 @@ END cat > Makefile.am << 'END' include Will_Be_Included_In_Makefile +test-distcommon: + echo ' ' $(DIST_COMMON) ' ' \ + | grep '[ /]Will_Be_Included_In_Makefile ' END -: > Will_Be_Included_In_Makefile +id=0c35bbde7c95b569a +echo "# $id" > Will_Be_Included_In_Makefile $ACLOCAL $AUTOMAKE test $(grep -c '^srcdir' Makefile.in) -eq 1 -# Also make sure include file is distributed. -sed -n -e '/^DIST_COMMON =.*\\$/ { - :loop - p - n - t clear - :clear - s/\\$/\\/ - t loop - p - n - }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile +$AUTOCONF +./configure +$MAKE test-distcommon +$MAKE distdir +grep "$id" $distdir/Will_Be_Included_In_Makefile : diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index c07eb72bd..dcdfec783 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -132,6 +132,7 @@ t/amhello-cflags.sh \ t/amhello-cross-compile.sh \ t/amhello-binpkg.sh \ t/aminit-moreargs-deprecation.sh \ +t/aminit-trailing-dnl-comment-pr16841.sh \ t/amassign.sh \ t/am-config-header.sh \ t/am-prog-cc-stdc.sh \ |