[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-2
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-216-g2dd9d32 |
Date: |
Fri, 11 May 2012 11:44:36 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=2dd9d32f3f3d38aea5946a1548fd0791a0a8c938
The branch, ng/master has been updated
via 2dd9d32f3f3d38aea5946a1548fd0791a0a8c938 (commit)
via a44fd52927c1e25b0572154004fb6455b93bf0e6 (commit)
via c62b42b64c588c98d9b1f370d208056e82b39d8b (commit)
via 42b0536dcc6327b3f09f711671847ac7db879d8c (commit)
via d5514ad9e26788c55d802487272a24d5ef7d6776 (commit)
from 3bf7d3a0219f4bf8815d3c2cb510223fe2554f6d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2dd9d32f3f3d38aea5946a1548fd0791a0a8c938
Merge: 3bf7d3a a44fd52
Author: Stefano Lattarini <address@hidden>
Date: Fri May 11 13:21:27 2012 +0200
Merge branch 'ng/distdir-refactor' into ng/master
* ng/distdir-refactor:
[ng] dist: optimize calculation of list of distributed file
[ng] dist: rename some non-public vars to make clear they are internal
[ng] dist: strip duplicates from dist files at make (not automake) runtime
[ng] dist: simplify VPATH handling
Signed-off-by: Stefano Lattarini <address@hidden>
commit a44fd52927c1e25b0572154004fb6455b93bf0e6
Author: Stefano Lattarini <address@hidden>
Date: Fri May 4 02:26:30 2012 +0200
[ng] dist: optimize calculation of list of distributed file
Our implementation of the $(am__uniq) make function is slow as
hell when applied to big lists. Since that function is used to
(re)calculate the list of distributed files, its inefficiency
reflects on *every* run of a Makefile generated by Automake which
distributes a lot of files. For example, a null build of the
Automake tree now takes 20 seconds (!) on my Debian system, while
earlier it was practically instantaneous (less than half a second).
Luckily, the GNU make manual documents that the $(sort) built-in
also strip duplicates from the sorted list. Since we don't care
about the order of the distributed files (or directories thereof),
we can use $(sort ...) instead of $(call am__uniq, ...), and live
happily.
* lib/am/distdir.am (am__dist_files)_: Uniqify content using
'$(sort)', not '$(am__uniq)'.
(am__dist_parent_dirs): Likewise.
Signed-off-by: Stefano Lattarini <address@hidden>
commit c62b42b64c588c98d9b1f370d208056e82b39d8b
Author: Stefano Lattarini <address@hidden>
Date: Thu May 3 18:56:57 2012 +0200
[ng] dist: rename some non-public vars to make clear they are internal
The variable $(DISTFILES), $(DIST_COMMON) and $(DIST_SOURCES) have never
been documented, and they were always intended to be internal variables.
This is absolutely not evident from their names, though. So rename them
like this:
DISTFILES => am__dist_files
DIST_COMMON => am__dist_common
DIST_SOURCES => am__dist_sources
* NG-NEWS: Update.
* automake.in: Adjust code and comments.
* lib/am/configure.am, lib/am/data.am, lib/am/java.am, lib/am/lisp.am,
lib/am/python.am, lib/am/scripts.am, lib/am/texi-vers.am: Likewise.
* lib/am/distdir.am: Likewise, and related variable renamings.
And throw in a few improvements to comments since we are at it.
* Several tests: Adjust.
* syntax-checks.mk: Add rules (and supporting variables) verifying
that the obsolete 'DIST*' variables are actually not used anymore.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 42b0536dcc6327b3f09f711671847ac7db879d8c
Author: Stefano Lattarini <address@hidden>
Date: Thu May 3 18:56:57 2012 +0200
[ng] dist: strip duplicates from dist files at make (not automake) runtime
We can do this thanks to the new make macros '$(am__uniq)' introduced in
the recent commit 'v1.12-145-g112d08a'.
* automake.in (handle_dist): Don't "uniq"ify the contents of DIST_COMMON
here, but instead ...
* lib/am/distdir.am: ... "uniq"ify the contents of DISTFILES here.
* t/dist-repeated.sh: Remove sanity check checking for a once expected
invariant that is not there anymore now.
* t/distcom4.sh, t/distcom5.sh: Adjust.
Signed-off-by: Stefano Lattarini <address@hidden>
commit d5514ad9e26788c55d802487272a24d5ef7d6776
Author: Stefano Lattarini <address@hidden>
Date: Tue Apr 24 19:50:00 2012 +0200
[ng] dist: simplify VPATH handling
Now that we don't need to cater to Sun and Tru64 make, we can simplify
and rationalize our VPATH support in the creation of the distribution
directory. Since we are at it, we clarify some existing comments, add
some new ones, and remove the obsolete ones.
This change has a little collateral effect in that after it the use of
"bare" wildcards in EXTRA_DIST does not work as intended anymore:
# Won't distribute all test files in the builddir anymore.
EXTRA_DIST = *.test
One will have to use the $(wildcard) GNU make builtin instead, as in:
EXTRA_DIST = $(wildcard *.test)
This new limitation is deemed acceptable, especially because "bare"
wildcards suffer of a number of issues and inconsistencies, and their
use is mostly deprecated in favor of the $(wildcard) builtin (refer
to the GNU make manual for more details).
* lib/am/distdir.am (distdir): Extend the comments explaining why, while
filling up the dist directory, we need to check whether any distributed
file already exists in there; in particular, refer to some relevant bug
numbers and past commit IDs. Remove workarounds and hack required to
support automatic VPATH rewrites with Sun and Tru64 make. Refactor the
recipe using ...
(am__dist_files_1, am__dist_files_2, am__dist_files,
am__dist_parent_dirs): This new internal custom GNU make macros.
* NG-NEWS: Document that "bare" wildcards are not supported anymore
in EXTRA_DIST definition.
* t/extra12.sh: Adjust accordingly.
* t/nodep.sh: Remove, it's giving too much false positives to be
usable.
* t/dist-srcdir.sh: New test.
* t/dist-srcdir2.sh: New test, xfailing.
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 1 +
NG-NEWS | 26 +++++
automake.in | 44 ++++-----
lib/am/configure.am | 4 +-
lib/am/data.am | 2 +-
lib/am/distdir.am | 150 +++++++++++++----------------
lib/am/java.am | 2 +-
lib/am/lisp.am | 2 +-
lib/am/python.am | 2 +-
lib/am/scripts.am | 2 +-
lib/am/texi-vers.am | 2 +-
syntax-checks.mk | 23 +++++
t/autodist-acconfig-no-subdir.sh | 4 +-
t/autodist-acconfig.sh | 2 +-
t/autodist-aclocal-m4.sh | 4 +-
t/autodist-config-headers.sh | 12 +-
t/autodist-configure-no-subdir.sh | 4 +-
t/autodist-stamp-vti.sh | 2 +-
t/autodist-subdir.sh | 10 +-
t/autodist.sh | 6 +-
t/colon5.sh | 2 +-
t/colon7.sh | 6 +-
t/confh.sh | 4 +-
t/confh8.sh | 8 +-
t/depdist.sh | 2 +-
t/dist-auxfile.sh | 8 +-
t/dist-repeated.sh | 8 --
t/dist-srcdir.sh | 92 ++++++++++++++++++
t/{objext-pr10128.sh => dist-srcdir2.sh} | 49 ++++------
t/distcom-subdir.sh | 2 +-
t/distcom2.sh | 6 +-
t/distcom3.sh | 4 +-
t/distcom4.sh | 28 ++----
t/distcom5.sh | 42 +++------
t/distdir.sh | 4 +-
t/extra12.sh | 3 +-
t/hdr-vars-defined-once.sh | 4 +-
t/insh2.sh | 3 +-
t/libobj7.sh | 8 +-
t/nodist.sh | 4 +-
t/nodist3.sh | 2 +-
t/pr2.sh | 2 +-
t/subdir4.sh | 6 +-
t/substref.sh | 4 +-
t/test-driver-is-distributed.sh | 2 +-
t/txinfo.sh | 4 +-
t/txinfo2.sh | 4 +-
t/txinfo8.sh | 4 +-
t/vtexi3.sh | 4 +-
t/vtexi4.sh | 4 +-
t/yacc-basic.sh | 2 +-
t/yacc-cxx.sh | 2 +-
t/yacc-d-basic.sh | 2 +-
t/yacc-d-cxx.sh | 2 +-
54 files changed, 356 insertions(+), 279 deletions(-)
create mode 100755 t/dist-srcdir.sh
copy t/{objext-pr10128.sh => dist-srcdir2.sh} (53%)
diff --git a/Makefile.am b/Makefile.am
index 60807b5..b37e2e7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -376,6 +376,7 @@ XFAIL_TESTS = \
t/yacc-bison-skeleton-cxx.sh \
t/yacc-bison-skeleton.sh \
t/cond17.sh \
+ t/dist-srcdir2.sh \
t/gcj6.sh \
t/override-conditional-2.sh \
t/dist-pr109765.sh \
diff --git a/NG-NEWS b/NG-NEWS
index 025ad2a..49c16ea 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -130,6 +130,21 @@ Pattern rules and suffix rules
foo_SOURCES = foo.c sub/bar.baz
DISTCLEANFILES = bar.c
+Distribution
+============
+
+* "Bare" wildcards are not usable anymore in $(EXTRA_DIST):
+
+ EXTRA_DIST = $(srcdir)/doc/*.txt # This won't work anymore.
+
+ You'll have to use the $(wildcard) GNU make builtin instead, as in:
+
+ EXTRA_DIST = $(wildcard $(srcdir)/doc/*.txt) # Good.
+
+ or even (for a better support of VPATH builds):
+
+ EXTRA_DIST = $(wildcard doc/*.txt $(srcdir)/doc/*.txt) # Better.
+
Miscellaneous
=============
@@ -138,6 +153,17 @@ Miscellaneous
variable $(AM_MAKEFLAGS) has been removed, and its content is no more
passed to recursive make invocations.
+* The variables $(DISTFILES), $(DIST_COMMON) and $(DIST_SOURCES) had
+ never been documented in mainline Automake, and were always intended
+ to be internal variables. But that was not clear from their names.
+ So we have renamed rename like this:
+
+ DISTFILES => am__dist_files
+ DIST_COMMON => am__dist_common
+ DIST_SOURCES => am__dist_sources
+
+ Do not use any of these variables in your Makefiles!
+
-----
Copyright (C) 2012 Free Software Foundation, Inc.
diff --git a/automake.in b/automake.in
index 737825b..11d1f0b 100644
--- a/automake.in
+++ b/automake.in
@@ -226,7 +226,7 @@ my @libtool_files = qw(ltmain.sh config.guess config.sub);
my @libtool_sometimes = qw(ltconfig ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh);
# Commonly found files we look for and automatically include in
-# DISTFILES.
+# distributed files.
my @common_files =
(qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
@@ -418,7 +418,7 @@ my %configure_cond = ();
# This maps extensions onto language names.
my %extension_map = ();
-# List of the DIST_COMMON files we discovered while reading
+# List of the distributed files we discovered while reading
# configure.ac.
my $configure_dist_common = '';
@@ -3740,7 +3740,7 @@ sub handle_dist ()
# check that. But if the file is in a subdir without a Makefile,
# we want to distribute it here if we are doing '.'. Ugly!
# Also, in some corner cases, it's possible that the following code
- # will cause the same file to appear in the $(DIST_COMMON) variables
+ # will cause the same file to appear in the $(am__dist_common) variables
# of two distinct Makefiles; but this is not a problem, since the
# 'distdir' target in 'lib/am/distdir.am' can deal with the same
# file being distributed multiple times.
@@ -3755,15 +3755,8 @@ sub handle_dist ()
}
}
- # 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);
-
- # Now that we've processed DIST_COMMON, disallow further attempts
- # to set it.
+ # We don't expected further attempts to modify $(am__dist_common)
+ # after this point, so disallow it, for extra safety.
$handle_dist_run = 1;
# Scan EXTRA_DIST to see if we need to distribute anything from a
@@ -5350,7 +5343,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 = variable_value ('am__dist_common') || '';
}
@@ -6551,7 +6544,7 @@ sub read_am_file ($$)
push (@include_stack, "\$\(top_srcdir\)/$path");
# Distribute any included file.
- # Always use the $(top_srcdir) prefix in DIST_COMMON,
+ # Always use the $(top_srcdir) prefix in am__dist_common,
# otherwise OSF make will implicitly copy the included
# file in the build tree during "make distdir" to satisfy
# the dependency.
@@ -6562,7 +6555,7 @@ sub read_am_file ($$)
{
$path =~ s/\$\(srcdir\)\///;
push (@include_stack, "\$\(srcdir\)/$path");
- # Always use the $(srcdir) prefix in DIST_COMMON,
+ # Always use the $(srcdir) prefix in am__dist_common,
# otherwise OSF make will implicitly copy the included
# file in the build tree during "make distdir" to satisfy
# the dependency.
@@ -7397,7 +7390,7 @@ sub locate_aux_dir ()
# &push_required_file ($DIR, $FILE, $FULLFILE)
# --------------------------------------------------
-# Push the given file onto DIST_COMMON.
+# Push the given file onto $(am__dist_common).
sub push_required_file
{
my ($dir, $file, $fullfile) = @_;
@@ -7472,7 +7465,8 @@ sub push_required_file
else
{
prog_error "a Makefile in relative directory $relative_dir " .
- "can't add files in directory $dir to DIST_COMMON";
+ "can't add files in directory $dir to the list " .
+ "of distributed files";
}
}
@@ -7507,11 +7501,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 the list of distributed files $(am__dist_common).
if (! $found_it)
{
return if defined $required_file_not_found{$fullfile};
@@ -7798,8 +7791,8 @@ 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);
+ Automake::Variable::define ('am__dist_common', VAR_AUTOMAKE, '+',
+ TRUE, "@_", '', INTERNAL, VAR_PRETTY);
}
@@ -7897,7 +7890,8 @@ sub generate_makefile ($$)
define_pretty_variable ('SOURCES', TRUE, INTERNAL, @sources);
if (! option 'no-dist')
{
- define_pretty_variable ('DIST_SOURCES', TRUE, INTERNAL, @dist_sources);
+ define_pretty_variable ('am__dist_sources', TRUE, INTERNAL,
+ @dist_sources);
}
handle_texinfo;
diff --git a/lib/am/configure.am b/lib/am/configure.am
index e0cd443..ac816c4 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -81,7 +81,7 @@ endif %?TOPDIR_P%
## Avoid the "deleted header file" problem for the dependencies.
?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS%:
-DIST_COMMON += %MAKEFILE-AM%
+am__dist_common += %MAKEFILE-AM%
## --------------------------- ##
@@ -93,7 +93,7 @@ if %?TOPDIR_P%
## don't exist. This is especially important for configure, since it
## won't be created until autoconf is run -- which might be after
## automake is run.
-DIST_COMMON += $(top_srcdir)/configure $(am__configure_deps)
+am__dist_common += $(top_srcdir)/configure $(am__configure_deps)
endif %?TOPDIR_P%
$(top_builddir)/config.status: $(top_srcdir)/configure
$(CONFIG_STATUS_DEPENDENCIES)
diff --git a/lib/am/data.am b/lib/am/data.am
index b8b6588..2bed9ae 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -95,5 +95,5 @@ endif %?INSTALL%
## -------------- ##
if %?DIST%
-DIST_COMMON += %DISTVAR%
+am__dist_common += %DISTVAR%
endif %?DIST%
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 2c7307f..face03a 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -14,7 +14,55 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+## Use 'sort', not 'am__uniq', for performance reasons. Luckily, we
+## don't care in which order the distributed files are.
+am__dist_files = $(strip $(sort \
+ $(am__dist_common) $(am__dist_sources) $(TEXINFOS) $(EXTRA_DIST)))
+
+## Try to avoid repeated slashed in the entries, to make the
+## filtering in the 'am__dist_files_1' definition below more reliable.
+## This idiom should compress up to four consecutive '/' characters in
+## each $(am__dist_files) entry.
+am__dist_files_1 = $(subst //,/,$(subst //,/,$(am__dist_files)))
+
+am__dist_files_2 = \
+## Files filtered out here require an ad-hoc "munging"; see the two
+## following 'patsubst's.
+ $(filter-out $(srcdir)/% $(top_srcdir)/%, $(am__dist_files_1)) \
+## Let's strip leading $(srcdir) (which might appears in EXTRA_DIST,
+## especially if one want to use the $(wildcard) built-in in there),
+## so that in our 'distdir' recipe below we can loop on the list of
+## distributed files and copy them in the distribution directory with
+## a simple "cp $file $(distdir)/$file" -- which would break if $file
+## contained a leading $(srcdir) component.
+## However, it should be noted that this filtering has the undesirable
+## side effect of triggering a VPATH search also for files specified
+## *explicitly* with a $(srcdir) prefix; but this limitation is also
+## present in mainstream Automake, and concerns only such corner-case
+## situations that it's probably not worth worrying about.
+ $(patsubst $(srcdir)/%, %, \
+ $(filter $(srcdir)/%, $(am__dist_files_1))) \
+## Also rewrite $(top_srcdir) -- which can sometimes appear in
+## $(am__dist_common), and can be absolute -- by $(top_builddir)
+## (which is always relative). If needed, $(srcdir) will be
+## prepended later by our VPATH-aware rules.
+## The same caveats reported above apply.
+ $(patsubst $(top_srcdir)/%, $(top_builddir)/%, \
+ $(filter $(top_srcdir)/%, $(am__dist_files_1)))
+
+## Strip extra whitespaces, for more safety.
+am__dist_files_cooked = $(strip $(am__dist_files_2))
+
+## Given the pre-processing done above to the list of distributed files,
+## this definition ensures that we won't try to create the wrong
+## directories when $(top_srcdir) or $(srcdir) appears in some entry of
+## the list of all distributed files.
+## For example, with EXTRA_DIST containing "$(srcdir)/subdir/file", this
+## will allow our rules to correctly create "$(distdir)/subdir", and not
+## "$(distdir)/$(srcdir)/subdir" -- which, in a VPATH build where
+## "$(subdir) = ..", would be the build directory!
+am__dist_parent_dirs = $(strip $(sort \
+ $(filter-out ., $(patsubst ./%,%,$(dir $(am__dist_files_cooked))))))
if %?TOPDIR_P%
distdir = $(PACKAGE)-$(VERSION)
@@ -74,7 +122,7 @@ if %?SUBDIRS%
AM_RECURSIVE_TARGETS += distdir
endif %?SUBDIRS%
-distdir: $(DISTFILES)
+distdir: $(am__dist_files)
##
## For Gnits users, this is pretty handy. Look at 15 lines
## in case some explanatory text is desirable.
@@ -122,92 +170,27 @@ if %?TOPDIR_P%
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
endif %?TOPDIR_P%
-##
-##
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-##
-## Yet another hack to support SUN make.
-##
-## Let's assume 'foo' appears in DISTFILES and is not a built file.
-## When building with VPATH=$(srcdir), SUN make and OSF1/Tru64 will
-## rewrite 'foo' as '$(srcdir)/foo'. An attempt to install the file
-## with
-## cp $file $(distdir)/$file
-## will thus install $(srcdir)/foo as $(distdir)/$(srcdir)/foo
-## instead of $(distdir)/foo.
-##
-## So let's strip this leading $(srcdir)/ when it exists. (As far we
-## know, only SUN make and OSF1/Tru64 make add it.) Searching whether
-## the file is to be found in the source or build directory will be
-## done later.
-##
-## In case we are _not_ using SUN or OSF1/Tru64 make, how can we be sure
-## we are not stripping a legitimate filename that starts with the
-## same pattern as $(srcdir)?
-## Well, it can't happen without the Makefile author distributing
-## something out of the distribution (which is bad). As an example,
-## consider "EXTRA_DIST = ../bar". This is an issue if $srcdir is
-## '..', however getting this value for srcdir is impossible:
-## "EXTRA_DIST = ../bar" implies we are in a subdirectory (so '../bar'
-## is within the package), hence '$srcdir' is something like
-## '../../subdir'.
-##
-## There is more to say about files which are above the current directory,
-## like '../bar' in the previous example. The OSF1/Tru64 make
-## implementation can simplify filenames resulting from a VPATH lookup.
-## For instance if "VPATH = ../../subdir" and '../bar' is found in that
-## VPATH directory, then occurrences of '../bar' will be replaced by
-## '../../bar' (instead of '../../subdir/../bar'). This obviously defeats
-## any attempt to strip a leading $srcdir. Presently we have no workaround
-## for this. We avoid this issue by writing "EXTRA_DIST = $(srcdir)/../bar"
-## instead of "EXTRA_DIST = ../bar". This prefixing is needed only for files
-## above the current directory. Fortunately, apart from auxdir files which
-## can be located in .. or ../.., this situation hardly occurs in practice.
-##
-## Also rewrite $(top_srcdir) (which sometimes appears in DISTFILES, and can
-## be absolute) by $(top_builddir) (which is always relative). $(srcdir) will
-## be prepended later.
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-## (The second 't' command clears the flag for the next round.)
-##
## Make the subdirectories for the files.
-##
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
-##
-##
- for file in $$dist_files; do \
-##
-## Always look for the file in the build directory first. That way
-## for something like yacc output we will correctly pick up the latest
-## version. Also check for directories in the build directory first,
-## so one can ship generated directories.
-##
+ @$(if $(am__dist_parent_dirs),\
+ $(MKDIR_P) $(patsubst %,"$(distdir)"/%,$(am__dist_parent_dirs)))
+## Install the files and directories, applying a "VPATH rewrite"
+## by hand where needed.
+## To get the files in the distribution directory, use 'cp', not 'ln'.
+## There are situations in which 'ln' can fail. For instance a file to
+## distribute could actually be a cross-filesystem symlink -- this can
+## easily happen if "gettextize" was run on the distribution.
+ @lst='$(am__dist_files_cooked)'; for file in $$lst; do \
+## Always look for the file or directory to distribute in the build
+## directory first, in VPATH spirit.
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-##
-## Use cp, not ln. There are situations in which "ln" can fail. For
-## instance a file to distribute could actually be a cross-filesystem
-## symlink -- this can easily happen if "gettextize" was run on the
-## distribution.
-##
if test -d $$d/$$file; then \
## Don't mention $$file in the destination argument, since this fails if
## the destination directory already exists. Also, use '-R' and not '-r'.
## '-r' is almost always incorrect.
-##
## If a directory exists both in '.' and $(srcdir), then we copy the
## files from $(srcdir) first and then install those from '.'. This
## can help people who distribute directories made of source files
-## *and* generated files. It is also important when the directory
-## exists only in $(srcdir), because some vendor Make (such as Tru64)
-## will magically create an empty directory in '.'.
+## *and* generated files.
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
## If the destination directory already exists, it may contain read-only
## files, e.g., during "make distcheck".
@@ -220,10 +203,11 @@ endif %?TOPDIR_P%
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
-## Test for file existence because sometimes a file gets included in
-## DISTFILES twice. For example this happens when a single source
-## file is used in building more than one program.
-## See also test 'dist-repeated.test'.
+## Test for file existence because sometimes a single auxiliary file
+## 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'.
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
diff --git a/lib/am/java.am b/lib/am/java.am
index 6c163b5..289013c 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -88,5 +88,5 @@ clean-%NDIR%JAVA:
## -------------- ##
if %?DIST%
-DIST_COMMON += %DISTVAR%
+am__dist_common += %DISTVAR%
endif %?DIST%
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 72bcf9a..d5dfaac 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -145,5 +145,5 @@ clean-lisp:
## -------------- ##
if %?DIST%
-DIST_COMMON += %DISTVAR%
+am__dist_common += %DISTVAR%
endif %?DIST%
diff --git a/lib/am/python.am b/lib/am/python.am
index cab6129..cf1d9b0 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -125,5 +125,5 @@ endif %?INSTALL%
## -------------- ##
if %?DIST%
-DIST_COMMON += %DISTVAR%
+am__dist_common += %DISTVAR%
endif %?DIST%
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 64e093e..8bc8c0a 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -94,7 +94,7 @@ endif %?INSTALL%
## -------------- ##
if %?DIST%
-DIST_COMMON += %DISTVAR%
+am__dist_common += %DISTVAR%
endif %?DIST%
diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am
index a13b7ad..4f2495c 100644
--- a/lib/am/texi-vers.am
+++ b/lib/am/texi-vers.am
@@ -14,7 +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 += %VTEXI% %STAMPVTI%
+am__dist_common += %VTEXI% %STAMPVTI%
## Don't give this rule a command (even '@:').
## %STAMPVTI% is always newer than %VTEXI%, so this rule is always
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 86a1fae..9f108ee 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -34,6 +34,7 @@ xtests := $(shell \
xdefs = $(srcdir)/defs $(srcdir)/defs-static.in
ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
+pms := $(dist_perllib_DATA)
# Some simple checks, and then ordinary check. These are only really
# guaranteed to work on my machine.
@@ -60,6 +61,9 @@ sc_tests_make_can_chain_suffix_rules \
sc_tests_make_dont_do_useless_vpath_rebuilds \
sc_no_dotmake_target \
sc_no_am_makeflags \
+sc_no_DISTFILES \
+sc_no_DIST_COMMON \
+sc_no_DIST_SOURCES \
sc_tests_no_make_e \
sc_docs_no_make_e \
sc_make_simple_include \
@@ -296,6 +300,25 @@ sc_no_am_makeflags:
exit 1; \
fi
+# Modern names for internal variables that had a bad name once.
+modern_DISTFILES = am__dist_files
+modern_DIST_COMMON = am__dist_common
+modern_DIST_SOURCES = am__dist_sources
+
+sc_no_DISTFILES sc_no_DIST_COMMON sc_no_DIST_SOURCES: sc_no_% :
+ @files="\
+ $(xtests) \
+ $(pms) \
+ $(ams) \
+ $(srcdir)/automake.in \
+ $(srcdir)/doc/*.texi \
+ "; \
+ if grep -F '$*' $$files; then \
+ echo "'\$$($*)' is obsolete and no more used." >&2; \
+ echo "You should use '$(modern_$*)' instead." >&2; \
+ exit 1; \
+ fi
+
## "make -e" is brittle and unsafe, since it let *all* the environment
## win over the macro definitions in the Makefiles. We needed it when
## we couldn't assume GNU make, but now that the tide has turned, it's
diff --git a/t/autodist-acconfig-no-subdir.sh b/t/autodist-acconfig-no-subdir.sh
index d4ad1d9..18cd5f4 100755
--- a/t/autodist-acconfig-no-subdir.sh
+++ b/t/autodist-acconfig-no-subdir.sh
@@ -40,8 +40,8 @@ cat > sub/Makefile.am <<'END'
acconfig.h:
echo target $@ should not be built >&2; exit 1
check-local:
- echo $(DISTFILES) | grep 'acconfig\.h' && exit 1; :
- echo $(DIST_COMMON) | grep 'acconfig\.h' && exit 1; :
+ echo $(am__dist_common) $(am__dist_files) \
+ | grep 'acconfig\.h' && exit 1; :
END
: > sub/acconfig.h
diff --git a/t/autodist-acconfig.sh b/t/autodist-acconfig.sh
index 18b280c..55884f7 100755
--- a/t/autodist-acconfig.sh
+++ b/t/autodist-acconfig.sh
@@ -28,7 +28,7 @@ cat > Makefile.am <<'END'
.PHONY: test
test: distdir
ls -l $(distdir)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]acconfig\.h '
test -f $(distdir)/acconfig.h
END
diff --git a/t/autodist-aclocal-m4.sh b/t/autodist-aclocal-m4.sh
index 6108f57..448634c 100755
--- a/t/autodist-aclocal-m4.sh
+++ b/t/autodist-aclocal-m4.sh
@@ -34,8 +34,8 @@ cat > Makefile.am <<'END'
test: distdir
ls -l $(distdir)
test ! -f $(distdir)/aclocal.m4
- echo $(DISTFILES) | grep 'aclocal\.m4' && exit 1; :
- echo $(DIST_COMMON) | grep 'aclocal\.m4' && exit 1; :
+ echo $(am__dist_files) $(am__dist_common) \
+ | grep 'aclocal\.m4' && exit 1; :
check-local: test
END
diff --git a/t/autodist-config-headers.sh b/t/autodist-config-headers.sh
index 65888f8..798284a 100755
--- a/t/autodist-config-headers.sh
+++ b/t/autodist-config-headers.sh
@@ -30,12 +30,12 @@ cat > Makefile.am <<'END'
.PHONY: test
test: distdir
ls -l $(distdir) $(distdir)/sub
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config\.h\.bot '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config\.h\.top '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]cfg2\.h\.bot '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]cfg2\.h\.top '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]sub/config\.h\.bot '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]sub/config\.h\.top '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]config\.h\.bot '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]config\.h\.top '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]cfg2\.h\.bot '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]cfg2\.h\.top '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]sub/config\.h\.bot '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]sub/config\.h\.top '
test -f $(distdir)/config.h.bot
test -f $(distdir)/config.h.top
test -f $(distdir)/cfg2.h.bot
diff --git a/t/autodist-configure-no-subdir.sh
b/t/autodist-configure-no-subdir.sh
index cc53caf..b974748 100755
--- a/t/autodist-configure-no-subdir.sh
+++ b/t/autodist-configure-no-subdir.sh
@@ -52,8 +52,8 @@ configure.ac:
configure.in:
$(dontbuild)
check-local:
- echo $(DISTFILES) | grep 'configure' && exit 1; :
- echo $(DIST_COMMON) | grep 'configure' && exit 1; :
+ echo $(am__dist_files) $(am__dist_common) \
+ | grep 'configure' && exit 1; :
END
: > sub/configure.ac
diff --git a/t/autodist-stamp-vti.sh b/t/autodist-stamp-vti.sh
index 4db1f14..33ceb1a 100755
--- a/t/autodist-stamp-vti.sh
+++ b/t/autodist-stamp-vti.sh
@@ -30,7 +30,7 @@ info_TEXINFOS = foo.texi
.PHONY: test
test: all distdir
ls -l $(distdir)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]stamp-vti '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]stamp-vti '
test -f $(distdir)/stamp-vti
END
diff --git a/t/autodist-subdir.sh b/t/autodist-subdir.sh
index 5e1f044..ad99d91 100755
--- a/t/autodist-subdir.sh
+++ b/t/autodist-subdir.sh
@@ -48,8 +48,8 @@ cat > Makefile.am <<'END'
SUBDIRS = sub
check-local:
## For debugging.
- @echo DIST_COMMON:
- @for f in $(DIST_COMMON); do echo " $$f"; done
+ @echo am__dist_common:
+ @for f in $(am__dist_common); do echo " $$f"; done
@echo DISTDIR:
@ls -l $(distdir) | sed 's/^/ /'
## Now the checks.
@@ -66,8 +66,8 @@ cat > sub/Makefile.am <<'END'
include distfiles.am
check-local:
## For debugging.
- @echo DIST_COMMON:
- @for f in $(DIST_COMMON); do echo " $$f"; done
+ @echo am__dist_common:
+ @for f in $(am__dist_common); do echo " $$f"; done
@echo DISTDIR:
@ls -l $(distdir) | sed 's/^/ /'
## Now the checks.
@@ -76,7 +76,7 @@ check-local:
## Some filenames might contain dots, but this won't cause spurious
## failures, and "spurious successes" are so unlikely that they're
## not worth worrying about.
- echo ' ' $(DIST_COMMON) ' ' | grep "[ /]$$f " >/dev/null \
+ echo ' ' $(am__dist_common) ' ' | grep "[ /]$$f " >/dev/null \
|| { echo $$f: distcom fail >&2; exit 1; }; \
done
END
diff --git a/t/autodist.sh b/t/autodist.sh
index e6435c5..1b9764d 100755
--- a/t/autodist.sh
+++ b/t/autodist.sh
@@ -47,8 +47,8 @@ cat > Makefile.am <<'END'
include distfiles.am
check-local:
## For debugging.
- @echo DIST_COMMON:
- @for f in $(DIST_COMMON); do echo " $$f"; done
+ @echo am__dist_common:
+ @for f in $(am__dist_common); do echo " $$f"; done
@echo DISTDIR:
@ls -l $(distdir) | sed 's/^/ /'
## Now the checks.
@@ -59,7 +59,7 @@ check-local:
## Some filenames might contain dots, but this won't cause spurious
## failures, and "spurious successes" are so unlikely that they're
## not worth worrying about.
- echo ' ' $(DIST_COMMON) ' ' | grep "[ /]$$f " >/dev/null \
+ echo ' ' $(am__dist_common) ' ' | grep "[ /]$$f " >/dev/null \
|| { echo $$f: distcom fail >&2; exit 1; }; \
done
END
diff --git a/t/colon5.sh b/t/colon5.sh
index 5a0ef37..6ce2e2b 100755
--- a/t/colon5.sh
+++ b/t/colon5.sh
@@ -39,7 +39,7 @@ test-grep:
grep '=GrEp$(empty)Me_am=' Makefile
grep '=GrEp$(empty)Me_dep=' Makefile
test-distcommon:
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]Makefile.dep '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]Makefile.dep '
test-distdir: distdir
test -f $(distdir)/Makefile.dep
END
diff --git a/t/colon7.sh b/t/colon7.sh
index 1b84d80..0d3cc1b 100755
--- a/t/colon7.sh
+++ b/t/colon7.sh
@@ -33,10 +33,10 @@ mkdir subdir
: > Makefile.am
: > subdir/foo
cat > subdir/Makefile.am << 'END'
-# DIST_COMMON should contain 'foo', not 'subdir/foo'.
+# am__dist_common should contain 'foo', not 'subdir/foo'.
test:
- case '$(DIST_COMMON)' in *subdir/foo*) exit 1;; *) exit 0;; esac
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]foo '
+ case '$(am__dist_common)' in *subdir/foo*) exit 1;; *) exit 0;; esac
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]foo '
.PHONY: test
END
diff --git a/t/confh.sh b/t/confh.sh
index 9dc2f15..1ba8534 100755
--- a/t/confh.sh
+++ b/t/confh.sh
@@ -27,8 +27,8 @@ END
cat > Makefile.am << 'END'
.PHONY: test1 test2
test1:
- @echo DIST_COMMON = $(DIST_COMMON)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
+ @echo am__dist_common = $(am__dist_common)
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]acconfig\.h '
test2: distdir
ls -l $(distdir)/*
test -f $(distdir)/acconfig.h
diff --git a/t/confh8.sh b/t/confh8.sh
index 2feaae5..50bf057 100755
--- a/t/confh8.sh
+++ b/t/confh8.sh
@@ -27,11 +27,11 @@ END
cat > Makefile.am << 'END'
.PHONY: test0 test1 test2
test0:
- @echo DIST_COMMON = $(DIST_COMMON)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]one\.h\.in '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]two\.h\.in '
+ @echo am__dist_common = $(am__dist_common)
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]one\.h\.in '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]two\.h\.in '
: Processed header files should not be distributed.
- if echo ' ' $(DIST_COMMON) ' ' | grep '\.h '; then \
+ if echo ' ' $(am__dist_common) ' ' | grep '\.h '; then \
exit 1; \
else \
exit 0; \
diff --git a/t/depdist.sh b/t/depdist.sh
index e81e097..39ad48e 100755
--- a/t/depdist.sh
+++ b/t/depdist.sh
@@ -43,7 +43,7 @@ SUBDIRS = subdir
check-local: test1 test2
.PHONY: test1 test2
test1:
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config/depcomp '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]config/depcomp '
test2: distdir
ls -l $(distdir)/*
test -f $(distdir)/config/depcomp
diff --git a/t/dist-auxfile.sh b/t/dist-auxfile.sh
index 9f7e8ee..b8db708 100755
--- a/t/dist-auxfile.sh
+++ b/t/dist-auxfile.sh
@@ -47,10 +47,10 @@ END
SUBDIRS = subdir
test: distdir
ls -l $(distdir) $(distdir)/* ;: For debugging.
- @echo DIST_COMMON = $(DIST_COMMON) ;: Likewise.
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]$(auxdir)foo.txt '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]$(auxdir)bar.sh '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]$(auxdir)zardoz '
+ @echo am__dist_common = $(am__dist_common) ;: Likewise.
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]$(auxdir)foo.txt '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]$(auxdir)bar.sh '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]$(auxdir)zardoz '
test -f $(distdir)/$(auxdir)foo.txt
test -f $(distdir)/$(auxdir)bar.sh
test -f $(distdir)/$(auxdir)zardoz
diff --git a/t/dist-repeated.sh b/t/dist-repeated.sh
index 6651e72..14ea6ac 100755
--- a/t/dist-repeated.sh
+++ b/t/dist-repeated.sh
@@ -29,13 +29,6 @@ bar_SOURCES = foo.c
python_PYTHON = bar.py
EXTRA_DIST = foo.c bar.py
-.PHONY: sanity-check
-sanity-check:
- for f in $(DISTFILES); do echo " $$f "; done > dist.txt
- cat dist.txt
- test `grep ' foo\.c ' dist.txt | wc -l` -eq 3
- test `grep ' bar\.py ' dist.txt | wc -l` -eq 2
-
# So that we don't have to require a C compiler.
AUTOMAKE_OPTIONS = no-dependencies
CC = false
@@ -94,7 +87,6 @@ $AUTOCONF
$AUTOMAKE
./configure
-$MAKE sanity-check || fatal_ "expected invariants not verified"
$MAKE distdir
test -f cp-wrapper-has-seen-foo-c && test -f cp-wrapper-has-seen-bar-py \
|| fatal_ "our cp wrapper hasn't run correctly"
diff --git a/t/dist-srcdir.sh b/t/dist-srcdir.sh
new file mode 100755
index 0000000..88d8d4a
--- /dev/null
+++ b/t/dist-srcdir.sh
@@ -0,0 +1,92 @@
+#! /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/>.
+
+# We use EXTRA_DIST to distribute stuff *explicitly* from the srcdir.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+ocwd=`pwd` || fatal_ "cannot get current working directory"
+
+mkdir src
+cd src
+
+cat >> configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+
+EXTRA_DIST = \
+ $(srcdir)/one \
+ @srcdir@/two \
+ $(top_srcdir)/three \
+ @top_srcdir@/four
+
+.PHONY: test
+check-local: test
+test: distdir
+ find $(distdir) # For debugging.
+ test -f $(distdir)/one
+ test -f $(distdir)/two
+ test -f $(distdir)/three
+ test -f $(distdir)/four
+ test -f $(distdir)/sub/five
+ test -f $(distdir)/sub/six
+ test ! -f $(distdir)/five
+ test ! -f $(distdir)/six
+ test -f $(distdir)/seven
+ test -f $(distdir)/eight
+ test ! -f $(distdir)/sub/seven
+ test ! -f $(distdir)/sub/eight
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+EXTRA_DIST = $(srcdir)/five @srcdir@/six
+EXTRA_DIST += $(top_srcdir)/seven @top_srcdir@/eight
+END
+
+touch one two three four sub/five sub/six seven eight
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+../configure
+$MAKE test
+$MAKE distcheck
+cd "$ocwd"
+
+mkdir a a/b a/b/c
+cd a/b/c
+../../../src/configure
+$MAKE test
+cd "$ocwd"
+
+mkdir build2
+cd build2
+"$ocwd"/src/configure
+$MAKE test
+cd "$ocwd"
+
+:
diff --git a/t/objext-pr10128.sh b/t/dist-srcdir2.sh
similarity index 53%
copy from t/objext-pr10128.sh
copy to t/dist-srcdir2.sh
index 2fe2dfd..e64d412 100755
--- a/t/objext-pr10128.sh
+++ b/t/dist-srcdir2.sh
@@ -14,45 +14,36 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test for automake bug#10128: $(OBJEXT) redefinition causes
-# $(foo_OBJECTS) to be defined as empty.
+# If we distribute a file whose name that starts with $(srcdir),
+# then the distribution rules should not try to instead distribute
+# a file with the same name from the builddir.
+# Currently, this doesn't work (the reasons and details for this
+# limitation should be explained in depth in comments in file
+# 'lib/am/distdir.am').
. ./defs || Exit 1
echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'END'
-LINK = echo >$@ Linked $@ from
-OBJEXT = fasl
-EXEEXT =
-
-noinst_PROGRAMS = foo zardoz
-foo_SOURCES = foo.lisp
-zardoz_SOURCES = mu1.lisp mu2.lisp
-
-## Un-commenting this is enough to make the test pass. Weird!
-##.lisp.o:
-
-.lisp.fasl:
- touch $@
-
-.PHONY: test
-test:
- is $(foo_OBJECTS) == foo.fasl
- is $(zardoz_OBJECTS) == mu1.fasl mu2.fasl
+EXTRA_DIST = $(srcdir)/filename-that-is-easy-to-grep
END
$ACLOCAL
-$AUTOMAKE
$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+../configure
+
+echo bad > filename-that-is-easy-to-grep
+$MAKE distdir 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'filename-that-is-easy-to-grep' stderr
-./configure
-$MAKE test
-touch foo.lisp mu1.lisp mu2.lisp
-$MAKE all
-cat foo
-cat zardoz
-test "`cat foo`" = "Linked foo from foo.fasl"
-test "`cat zardoz`" = "Linked zardoz from mu1.fasl mu2.fasl"
+echo good > ../filename-that-is-easy-to-grep
+$MAKE distdir
+test "`cat $distdir/filename-that-is-easy-to-grep`" = good
:
diff --git a/t/distcom-subdir.sh b/t/distcom-subdir.sh
index 4da74d0..46e516a 100755
--- a/t/distcom-subdir.sh
+++ b/t/distcom-subdir.sh
@@ -52,7 +52,7 @@ test -f depcomp
# FIXME: 'distcom*.test' files should be factored out in a common
# FIXME: subroutine in 'defs'...
sed -n -e "
- /^DIST_COMMON =.*\\\\$/ {
+ /^am__dist_common =.*\\\\$/ {
:loop
p
n
diff --git a/t/distcom2.sh b/t/distcom2.sh
index 4b86f92..141cd79 100755
--- a/t/distcom2.sh
+++ b/t/distcom2.sh
@@ -14,7 +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/>.
-# Test to make sure that depcomp and compile are added to DIST_COMMON.
+# Test to make sure that depcomp and compile are added to am__dist_common.
# Report from Pavel Roskin. Report of problems with '--no-force' from
# Scott James Remnant (Debian #206299)
@@ -54,7 +54,7 @@ for opt in '' --no-force; do
# FIXME: 'distcom*.test' files should be factored out in a common
# FIXME: subroutine in 'defs'...
sed -n -e "
- /^DIST_COMMON =.*\\\\$/ {
+ /^am__dist_common =.*\\\\$/ {
:loop
p
n
@@ -73,7 +73,7 @@ for opt in '' --no-force; do
cat subdir/dc.txt # Likewise.
$FGREP ' $(top_srcdir)/depcomp ' subdir/dc.txt
- # The 'compile' script will be listed in the DIST_COMMON of the top-level
+ # The 'compile' script will be listed in the am__dist_common of the top-level
# Makefile because it's required in configure.ac (by AM_PROG_CC_C_O).
$FGREP ' $(top_srcdir)/compile ' dc.txt || $FGREP ' compile ' dc.txt
diff --git a/t/distcom3.sh b/t/distcom3.sh
index 34ad709..8ed0809 100755
--- a/t/distcom3.sh
+++ b/t/distcom3.sh
@@ -36,7 +36,7 @@ $AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output;
Exit 1; }
cat output
grep README output && Exit 1
-sed -n -e '/^DIST_COMMON =.*\\$/ {
+sed -n -e '/^am__dist_common =.*\\$/ {
:loop
p
n
@@ -46,7 +46,7 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep README
+ }' -e '/^am__dist_common =/ p' Makefile.in | grep README
# Should warn about missing README.
diff --git a/t/distcom4.sh b/t/distcom4.sh
index 6f9d871..c8cc2c5 100755
--- a/t/distcom4.sh
+++ b/t/distcom4.sh
@@ -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 $(am__dist_files); 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 = `grep tests dc.txt | wc -l`
-grep configure dc.txt
+$MAKE test1 test2
:
diff --git a/t/distcom5.sh b/t/distcom5.sh
index adfbe52..7440397 100755
--- a/t/distcom5.sh
+++ b/t/distcom5.sh
@@ -21,21 +21,6 @@
. ./defs || Exit 1
-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 $(am__dist_files); do echo $$x; done \
+ | grep tests && exit 1; :
+END
+
+cat > tests/Makefile.am <<'END'
+check-local:
+ for x in $(am__dist_files); 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 = `grep tests top.txt | wc -l`
-test 1 = `grep wrapper inner.txt | wc -l`
+$MAKE check
+# Sanity check.
+test -f tests/lst
:
diff --git a/t/distdir.sh b/t/distdir.sh
index 079de24..b8e16ff 100755
--- a/t/distdir.sh
+++ b/t/distdir.sh
@@ -18,8 +18,8 @@
# sure *srcdir is properly handled. Note that using './', as in
# EXTRA_DIST = ./joe
# does not work portably: it fails with HP-UX and Tru64 make.
-# Also test DISTFILES containing a directory and a file in it,
-# and repeated directories.
+# Also test the situation when the lsit of distributed files contains
+# a directory and a file in it, and repeated directories.
. ./defs || Exit 1
diff --git a/t/extra12.sh b/t/extra12.sh
index d499ced..0745850 100755
--- a/t/extra12.sh
+++ b/t/extra12.sh
@@ -22,9 +22,8 @@
echo AC_OUTPUT >> configure.ac
-
cat > Makefile.am <<'END'
-EXTRA_DIST = *.foo $(srcdir)/*.foo $(builddir)/*.bar $(srcdir)/*.bar
+EXTRA_DIST = $(wildcard *.foo $(srcdir)/*.foo $(builddir)/*.bar
$(srcdir)/*.bar)
.PHONY: test
test: distdir
diff --git a/t/hdr-vars-defined-once.sh b/t/hdr-vars-defined-once.sh
index 1e31cd2..abd1c56 100755
--- a/t/hdr-vars-defined-once.sh
+++ b/t/hdr-vars-defined-once.sh
@@ -35,7 +35,7 @@ len=`grep '^srcdir' Makefile.in | wc -l`
test $len -eq 1
# Also make sure include file is distributed.
-sed -n -e '/^DIST_COMMON =.*\\$/ {
+sed -n -e '/^am__dist_common =.*\\$/ {
:loop
p
n
@@ -45,6 +45,6 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile
+ }' -e '/^am__dist_common =/ p' Makefile.in | grep
Will_Be_Included_In_Makefile
:
diff --git a/t/insh2.sh b/t/insh2.sh
index cd74f82..b159f02 100755
--- a/t/insh2.sh
+++ b/t/insh2.sh
@@ -25,8 +25,7 @@ pkgdata_DATA =
.PHONY: test
test: distdir
find $(distdir) ;: For debugging.
- echo ' ' $(DISTFILES) ' ' | grep '[ /]install-sh '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]install-sh '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]install-sh '
test -f $(distdir)/install-sh
END
diff --git a/t/libobj7.sh b/t/libobj7.sh
index 46f0f98..1e25229 100755
--- a/t/libobj7.sh
+++ b/t/libobj7.sh
@@ -39,10 +39,10 @@ check-local: test1 test2 test3
test1: all
$(AR) tv libtu.a
test2:
- @echo DIST_COMMON = $(DIST_COMMON)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]basename\.c '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]dirname\.c '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]am__dummy_function\.c '
+ @echo am__dist_common = $(am__dist_common)
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]basename\.c '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]dirname\.c '
+ echo ' ' $(am__dist_common) ' ' | grep '[ /]am__dummy_function\.c '
test3: distdir
test -f $(distdir)/basename.c
test -f $(distdir)/dirname.c
diff --git a/t/nodist.sh b/t/nodist.sh
index 92cc2f7..931b5c8 100755
--- a/t/nodist.sh
+++ b/t/nodist.sh
@@ -34,7 +34,7 @@ $ACLOCAL
$AUTOMAKE
grep '^am_eyeball_OBJECTS' Makefile.in
-grep '^DIST_SOURCES =' Makefile.in
-grep '^DIST_SOURCES =.*nodist' Makefile.in && Exit 1
+grep '^am__dist_sources =' Makefile.in
+grep '^am__dist_sources =.*nodist' Makefile.in && Exit 1
:
diff --git a/t/nodist3.sh b/t/nodist3.sh
index 23becc1..07e9047 100755
--- a/t/nodist3.sh
+++ b/t/nodist3.sh
@@ -32,6 +32,6 @@ $ACLOCAL
$AUTOMAKE
grep '^dist:' Makefile.in && Exit 1
-grep '^DIST_SOURCES =' Makefile.in && Exit 1
+grep 'am__dist_sources' Makefile.in && Exit 1
:
diff --git a/t/pr2.sh b/t/pr2.sh
index 9aa7bc5..a93c255 100755
--- a/t/pr2.sh
+++ b/t/pr2.sh
@@ -22,7 +22,7 @@
# like the following (among the Makefiles)
# README.foo:templ/README.foo.in
# the generated dist target in the Makefile.in fails,
-# because DIST_COMMON will contain templ/README.foo.in
+# because am__dist_common will contain templ/README.foo.in
# and the dist target will try to copy templ/README.foo.in
# to the distribution directory before it creates a templ
# subdirectory in the distribution directory.
diff --git a/t/subdir4.sh b/t/subdir4.sh
index 81528b2..8bf5823 100755
--- a/t/subdir4.sh
+++ b/t/subdir4.sh
@@ -61,10 +61,10 @@ $ACLOCAL
$AUTOMAKE --gnu
# Make sure that depcomp is *not* included in the definition
-# of DIST_COMMON in lib/Makefile.in. If you change this test
-# so that more files are included in lib's DIST_COMMON definition,
+# of am__dist_common in lib/Makefile.in. If you change this test
+# so that more files are included in lib's am__dist_common definition,
# then you must handle the case in which depcomp is listed on a
# continued line.
-grep '^DIST_COMMON.*depcomp' lib/Makefile.in && Exit 1
+grep '^am__dist_common.*depcomp' lib/Makefile.in && Exit 1
:
diff --git a/t/substref.sh b/t/substref.sh
index 7183a91..6e9bb6f 100755
--- a/t/substref.sh
+++ b/t/substref.sh
@@ -47,8 +47,8 @@ $MAKE test
# This is unrelated to the rest of this test. But while we are
# at it, make sure we don't use am__helldl_SOURCES_DIST here, since
-# it's not needed. DIST_SOURCES should contain $(helldl_SOURCES).
+# it's not needed. am__dist_sources should contain $(helldl_SOURCES).
grep am__helldl_SOURCES_DIST Makefile && Exit 1
-grep 'DIST_SOURCES.*\$(helldl_SOURCES)' Makefile
+grep 'am__dist_sources.*\$(helldl_SOURCES)' Makefile
:
diff --git a/t/test-driver-is-distributed.sh b/t/test-driver-is-distributed.sh
index fb4e540..78076cf 100755
--- a/t/test-driver-is-distributed.sh
+++ b/t/test-driver-is-distributed.sh
@@ -61,7 +61,7 @@ END
AUTOMAKE_OPTIONS = $am_opts
check-local: test-sub
test-sub:
- echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
+ echo ' ' \$(am__dist_common) ' ' | grep '[ /]$test_driver '
TESTS = foo.test
EXTRA_DIST = \$(TESTS)
END
diff --git a/t/txinfo.sh b/t/txinfo.sh
index e6667cb..66d925f 100755
--- a/t/txinfo.sh
+++ b/t/txinfo.sh
@@ -28,8 +28,8 @@ cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
.PHONY: test1 test2
test1:
- @echo DISTFILES = $(DISTFILES)
- echo ' ' $(DISTFILES) ' ' | grep '[ /]texinfo\.tex '
+ @echo am__dist_files = $(am__dist_files)
+ echo ' ' $(am__dist_files) ' ' | grep '[ /]texinfo\.tex '
test2: distdir
ls -l $(distdir)
test -f $(distdir)/texinfo.tex
diff --git a/t/txinfo2.sh b/t/txinfo2.sh
index 0daebd9..70a9e94 100755
--- a/t/txinfo2.sh
+++ b/t/txinfo2.sh
@@ -27,8 +27,8 @@ cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
.PHONY: test
test:
- @echo DISTFILES = $(DISTFILES)
- case '$(DISTFILES)' in *'~'*) exit 1;; *) exit 0;; esac
+ @echo am__dist_files = $(am__dist_files)
+ case '$(am__dist_files)' in *'~'*) exit 1;; *) exit 0;; esac
END
: > texinfo.tex
diff --git a/t/txinfo8.sh b/t/txinfo8.sh
index 4b186bc..6e5403a 100755
--- a/t/txinfo8.sh
+++ b/t/txinfo8.sh
@@ -32,8 +32,8 @@ cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
.PHONY: test1 test2
test1:
- @echo DISTFILES = $(DISTFILES)
- echo ' ' $(DISTFILES) ' ' | grep '[ /]auxdir/texinfo\.tex '
+ @echo am__dist_files = $(am__dist_files)
+ echo ' ' $(am__dist_files) ' ' | grep '[ /]auxdir/texinfo\.tex '
test2: distdir
ls -l $(distdir)/*
test -f $(distdir)/auxdir/texinfo.tex
diff --git a/t/vtexi3.sh b/t/vtexi3.sh
index 9dd3e67..c8736ea 100755
--- a/t/vtexi3.sh
+++ b/t/vtexi3.sh
@@ -41,7 +41,7 @@ cat > Makefile.am << 'END'
info_TEXINFOS = foobar.texi quux.texi zardoz.texi
.PHONY: echo-distfiles
echo-distfiles:
- @echo ' ' $(DISTFILES) ' '
+ @echo ' ' $(am__dist_files) ' '
END
cat > foobar.texi << 'END'
@@ -94,7 +94,7 @@ do_check ()
vmonth=`grep 'address@hidden UPDATED ' $srcdir/$vfile.texi | awk '{print $4,
$5}'`
grep "address@hidden UPDATED-MONTH $vmonth$" $srcdir/$vfile.texi
# Check that the vers*.texi file is distributed according
- # to $(DISTFILES).
+ # to $(am__dist_files).
$MAKE echo-distfiles # For debugging.
$MAKE -s echo-distfiles | grep "[ /]$vfile\\.texi"
}
diff --git a/t/vtexi4.sh b/t/vtexi4.sh
index 6038444..8023de2 100755
--- a/t/vtexi4.sh
+++ b/t/vtexi4.sh
@@ -62,8 +62,8 @@ test-grepinfo:
cat $(srcdir)/foo.info | grep 'GREPDATE=$(my_date_rx)='
cat $(srcdir)/foo.info | grep 'GREPMONTH=$(my_month_rx)='
test-distfiles:
- @echo DISTFILES = $(DISTFILES)
- echo ' ' $(DISTFILES) ' ' | grep '[ /]version.texi '
+ @echo am__dist_files = $(am__dist_files)
+ echo ' ' $(am__dist_files) ' ' | grep '[ /]version.texi '
test-distdir: distdir
ls -l $(distdir)
diff $(srcdir)/version.texi $(distdir)/version.texi
diff --git a/t/yacc-basic.sh b/t/yacc-basic.sh
index 8bc8c4b..7325461 100755
--- a/t/yacc-basic.sh
+++ b/t/yacc-basic.sh
@@ -34,7 +34,7 @@ bar_YFLAGS = -v
.PHONY: echo-distcom
echo-distcom:
- @echo ' ' $(DIST_COMMON) ' '
+ @echo ' ' $(am__dist_common) ' '
END
cat > parse.y << 'END'
diff --git a/t/yacc-cxx.sh b/t/yacc-cxx.sh
index 80ac2ee..246f1ad 100755
--- a/t/yacc-cxx.sh
+++ b/t/yacc-cxx.sh
@@ -38,7 +38,7 @@ foo4_YFLAGS = $(foo3_YFLAGS)
.PHONY: echo-distcom
echo-distcom:
- @echo ' ' $(DIST_COMMON) ' '
+ @echo ' ' $(am__dist_common) ' '
END
cat > parse1.yy << 'END'
diff --git a/t/yacc-d-basic.sh b/t/yacc-d-basic.sh
index e82f335..a374df0 100755
--- a/t/yacc-d-basic.sh
+++ b/t/yacc-d-basic.sh
@@ -39,7 +39,7 @@ bin_PROGRAMS = zardoz
zardoz_SOURCES = parse.y main.c
.PHONY: echo-distcom
echo-distcom:
- @echo ' ' $(DIST_COMMON) ' '
+ @echo ' ' $(am__dist_common) ' '
END
cp foo/Makefile.am bar/Makefile.am
cp foo/Makefile.am baz/Makefile.am
diff --git a/t/yacc-d-cxx.sh b/t/yacc-d-cxx.sh
index 5ec1990..f1ec2c3 100755
--- a/t/yacc-d-cxx.sh
+++ b/t/yacc-d-cxx.sh
@@ -66,7 +66,7 @@ mkdir foo bar baz qux baz/sub
cat > Makefile.am <<'END'
.PHONY: echo-distcom
echo-distcom:
- @echo ' ' $(DIST_COMMON) ' '
+ @echo ' ' $(am__dist_common) ' '
END
cp Makefile.am foo/Makefile.am
cp Makefile.am bar/Makefile.am
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-216-g2dd9d32,
Stefano Lattarini <=