[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-72
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-72-g2ef0a2d |
Date: |
Mon, 11 Jun 2012 19:53:34 +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=2ef0a2d367b4db6ca77ff5b8e5f504bdbdbd18de
The branch, master has been updated
via 2ef0a2d367b4db6ca77ff5b8e5f504bdbdbd18de (commit)
via c8ec1527547db12de96d7e67e2980e29ebb4ba57 (commit)
via 511b6896793aa4b6b76e9c220c7c7cab58ed7ae7 (commit)
via c45604a7135b5301f8777b006f668f996aaac1a2 (commit)
via 2f67c25fec563f03e6f0ac588c8642bd60f32b93 (commit)
via c5e9dac8217de5d7191a3ae8a5043609144bf767 (commit)
via c39549d0ddf3c1dfa998765559f99213e5aa155c (commit)
via 620362cdebb4bbc855fd58e3d0a525110257a7bf (commit)
via ec6a135799b9aa5da33130abeabad6fc8cd324b1 (commit)
via af5d52b7862e2e49ae38b8060b6aa778f709d537 (commit)
via 066c8cadf20ada22b922a1f0a8ba49c2f0d20f0b (commit)
via dbbcd360554c39a5192ea5a68f9b784cbd9a1a11 (commit)
via fa0cd34b38729a59a40fa946fc621df3ef0924cd (commit)
via 06dfdbe38e78c5eedb03f688f0264ec0097a4e21 (commit)
from c8d13b6142410d2641a13f1f4a38293b1b26cd05 (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 2ef0a2d367b4db6ca77ff5b8e5f504bdbdbd18de
Merge: c8d13b6 c8ec152
Author: Stefano Lattarini <address@hidden>
Date: Mon Jun 11 21:39:46 2012 +0200
Merge branch 'maint'
* maint:
maintcheck: fix failures, both real and spurious
subdir tests: avoid an use of "make -j4", for portability
tests: avoid failure due to libtool quirks in C++ demo test
tests: fix spurious failures due to missing '$sleep'
subdirs: unify rules for "cleaning" and "normal" recursive targets
tests: add a "demo" test on C support
tests: look for '.lo' rather than '.o' object when using Libtool with C++
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
maint: grammar fixes: s/all these/all of these/
subdir-objects: improve "make mostlyclean" efficiency and flexibility
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
NEWS | 18 ++++-
automake.in | 28 ++++---
doc/automake-history.texi | 6 +-
doc/automake.texi | 24 +++---
doc/fdl.texi | 2 +-
lib/am/subdirs.am | 54 ++---------
lib/texinfo.tex | 2 +-
old/ChangeLog.01 | 2 +-
old/ChangeLog.11 | 2 +-
syntax-checks.mk | 2 +-
t/c-demo.sh | 179 +++++++++++++++++++++++++++++++++++++
t/cxx-lt-demo.sh | 2 +-
t/list-of-tests.mk | 4 +
t/subdir-distclean.sh | 103 +++++++++++++++++++++
t/subobj-clean-lt-pr10697.sh | 171 +++++++++++++++++++++++++++++++++++
t/subobj-clean-pr10697.sh | 166 ++++++++++++++++++++++++++++++++++
t/tap-whitespace-normalization.sh | 2 +-
17 files changed, 687 insertions(+), 80 deletions(-)
create mode 100755 t/c-demo.sh
create mode 100755 t/subdir-distclean.sh
create mode 100755 t/subobj-clean-lt-pr10697.sh
create mode 100755 t/subobj-clean-pr10697.sh
diff --git a/NEWS b/NEWS
index 282fde2..8a9d69d 100644
--- a/NEWS
+++ b/NEWS
@@ -93,6 +93,22 @@ New in 1.12.2:
input file. Such a warning will also be present in the next
Autoconf version (2.70).
+* Cleaning rules:
+
+ - Recursive cleaning rules descends into the $(SUBDIRS) in the natural
+ order (as done by the other recursive rules), rather than in the
+ inverse order. They used to do that in order to work a round a
+ limitation in an older implementation of the automatic dependency
+ tracking support, but that limitation had been lifted years ago
+ already, when the automatic dependency tracking based on side-effects
+ of compilation had been introduced.
+
+ - Cleaning rules for compiled objects (both "plain" and libtool) work
+ better when subdir objects are involved, not triggering a distinct
+ 'rm' invocation for each such object. They do so by removing *any*
+ compiled object file that is in the same directory of a subdir
+ object. See automake bug#10697.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.12.1:
@@ -1665,7 +1681,7 @@ New in 1.8:
rule for this target. Running `automake -Woverride' will diagnose
all such overriding definitions.
- It should be noted that almost all these targets support a *-local
+ It should be noted that almost all of these targets support a *-local
variant that is meant to supplement the automake-defined rule
(See node `Extending' in the manual). The above rule should
be rewritten as
diff --git a/automake.in b/automake.in
index f88d94d..e5f95ee 100644
--- a/automake.in
+++ b/automake.in
@@ -1950,18 +1950,22 @@ sub handle_single_transform ($$$$$%)
err_am "'$full' should not contain a '..' component";
}
- # Make sure object is removed by 'make mostlyclean'.
- $compile_clean_files{$object} = MOSTLY_CLEAN;
- # If we have a libtool object then we also must remove
- # the ordinary .o.
- if ($object =~ /\.lo$/)
- {
- (my $xobj = $object) =~ s,lo$,\$(OBJEXT),;
- $compile_clean_files{$xobj} = MOSTLY_CLEAN;
-
- # Remove any libtool object in this directory.
- $libtool_clean_directories{$directory} = 1;
- }
+ # Make sure *all* objects files in the subdirectory are
+ # removed by "make mostlyclean". Not only this is more
+ # efficient than listing the object files to be removed
+ # individually (which would cause an 'rm' invocation for
+ # each of them -- very inefficient, see bug#10697), it
+ # would also leave stale object files in the subdirectory
+ # whenever a source file there is removed or renamed.
+ $compile_clean_files{"$directory/*.\$(OBJEXT)"} = MOSTLY_CLEAN;
+ if ($object =~ /\.lo$/)
+ {
+ # If we have a libtool object, then we also must remove
+ # any '.lo' objects in its same subdirectory.
+ $compile_clean_files{"$directory/*.lo"} = MOSTLY_CLEAN;
+ # Remember to cleanup .libs/ in this directory.
+ $libtool_clean_directories{$directory} = 1;
+ }
push (@dep_list, require_build_directory ($directory));
diff --git a/doc/automake-history.texi b/doc/automake-history.texi
index 5cb3685..7bbdeb4 100644
--- a/doc/automake-history.texi
+++ b/doc/automake-history.texi
@@ -560,7 +560,7 @@ sights on address@hidden and now it has arrived! -- Tom
Tromey
It's only the beginning: in two months he will send 192 patches. Then
he would slow down so Tom can catch up and review all this. Initially
-Tom actually read all these patches, then he probably trustingly
+Tom actually read all of these patches, then he probably trustingly
answered OK to most of them, and finally gave up and let Akim apply
whatever he wanted. There was no way to keep up with that patch rate.
@@ -570,7 +570,7 @@ sourcequake; I have yet to figure where the relevant
passage has
been moved :) -- Alexandre Duret-Lutz
@end quotation
-All these patches were sent to and discussed on
+All of these patches were sent to and discussed on
@email{automake@@gnu.org}, so subscribed users were literally drowning in
technical mails. Eventually, the @email{automake-patches@@gnu.org}
mailing list was created in May.
@@ -581,7 +581,7 @@ fragments. In 1.4, lots of @file{Makefile} rules are being
emitted at
various places in the @command{automake} script itself; this does not
help ensuring a consistent treatment of these rules (for instance
making sure that user-defined rules override Automake's own rules).
-One of Akim's goal was moving all these hard-coded rules to separate
+One of Akim's goal was moving all of these hard-coded rules to separate
@file{Makefile} fragments, so the logic could be centralized in a
@file{Makefile} fragment processor.
diff --git a/doc/automake.texi b/doc/automake.texi
index 8f23211..02d1bb4 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -538,7 +538,7 @@ illustration of the GNU Build System in action.
@cindex @file{amhello-1.0.tar.gz}, use cases
In this section we explore several use cases for the GNU Build System.
-You can replay all these examples on the @file{amhello-1.0.tar.gz}
+You can replay all of these examples on the @file{amhello-1.0.tar.gz}
package distributed with Automake. If Automake is installed on your
system, you should find a copy of this file in
@address@hidden/share/doc/automake/amhello-1.0.tar.gz}, where
@@ -1565,7 +1565,7 @@ when you execute @command{make}.
@command{autoreconf} is a script that calls @command{autoconf},
@command{automake}, and a bunch of other commands in the right order.
If you are beginning with these tools, it is not important to figure
-out in which order all these tools should be invoked and why. However,
+out in which order all of these tools should be invoked and why. However,
because Autoconf and Automake have separate manuals, the important
point to understand is that @command{autoconf} is in charge of
creating @file{configure} from @file{configure.ac}, while
@@ -2849,7 +2849,7 @@ make reference to @samp{$file} as @address@hidden@}}
(i.e., in a way
that is compatible with @command{make}'s syntax) and furthermore use
@code{AC_SUBST} to ensure that @address@hidden@}} is meaningful in a
@file{Makefile}, then @command{automake} will be able to use
address@hidden@address@hidden to generate all these rules. For instance, here
is
address@hidden@address@hidden to generate all of these rules. For instance,
here is
how the Automake package itself generates versioned scripts for its
test suite:
@@ -3541,7 +3541,7 @@ lot of people, because @command{aclocal} was not so
strict in the past
and many third party macros are underquoted; and we have to apologize
for this temporary inconvenience. The reason we have to be stricter
is that a future implementation of @command{aclocal} (@pxref{Future of
-aclocal}) will have to temporarily include all these third party
+aclocal}) will have to temporarily include all of these third party
@file{.m4} files, maybe several times, including even files that are
not actually needed. Doing so should alleviate many problems of the
current implementation, however it requires a stricter style from the
@@ -3607,7 +3607,7 @@ will be almost impossible to share macros between
packages.
@vindex ACLOCAL_AMFLAGS
The second possibility, which we do recommend, is to write each macro
-in its own file and gather all these files in a directory. This
+in its own file and gather all of these files in a directory. This
directory is usually called @file{m4/}. To build @file{aclocal.m4},
one should therefore instruct @command{aclocal} to scan @file{m4/}.
From the command line, this is done with @samp{aclocal -I m4}. The
@@ -7710,7 +7710,7 @@ This is a convenience variable that is defined as
@samp{$(pyexecdir)/$(PACKAGE)}.
@end vtable
-All these directory variables have values that start with either
+All of these directory variables have values that start with either
@address@hidden@}} or @address@hidden@}} unexpanded. This works
fine in @file{Makefiles}, but it makes these variables hard to use in
@file{configure}. This is mandated by the GNU coding standards, so
@@ -7776,7 +7776,7 @@ can be installed with @samp{make install-dvi}, @samp{make
install-ps},
documentation installed by default as well as all the above optional
formats.
-All these targets can be extended using @samp{-local} rules
+All of these targets can be extended using @samp{-local} rules
(@pxref{Extending}).
@cindex Texinfo flag, @code{VERSION}
@@ -11204,7 +11204,7 @@ If you have ever used Gettext in a project, this is a
good example of
how third-party @file{Makefile}s can be used with Automake. The
@file{Makefile}s @command{gettextize} puts in the @file{po/} and
@file{intl/} directories are handwritten @file{Makefile}s that
-implement all these targets. That way they can be added to
+implement all of these targets. That way they can be added to
@code{SUBDIRS} in Automake packages.
Directories that are only listed in @code{DIST_SUBDIRS} but not in
@@ -11405,7 +11405,7 @@ built from @file{Makefile.am} by @command{automake},
and rely on the
definitions of the M4 macros put in @file{aclocal.m4} as well as the
behavior of the auxiliary tools installed.
-Because all these files are closely related, it is important to
+Because all of these files are closely related, it is important to
regenerate all of them when upgrading to a newer Automake release.
The usual way to do that is
@@ -11425,7 +11425,7 @@ autoreconf -vfi
The use of @option{--force-missing} ensures that auxiliary tools will be
overridden by new versions (@pxref{automake Invocation}).
-It is important to regenerate all these files each time Automake is
+It is important to regenerate all of these files each time Automake is
upgraded, even between bug fixes releases. For instance, it is not
unusual for a bug fix to involve changes to both the rules generated
in @file{Makefile.in} and the supporting M4 macros copied to
@@ -11562,7 +11562,7 @@ Or people use a script to fix the timestamp after a
checkout (the GCC
folks have such a script).
@item
Or @file{configure.ac} uses @code{AM_MAINTAINER_MODE}, which will
-disable all these rebuild rules by default. This is further discussed
+disable all of these rebuild rules by default. This is further discussed
in @ref{maintainer-mode}.
@end itemize
@@ -12192,7 +12192,7 @@ every target in a @file{Makefile.in}.
Using variables like this gives you full control over the ordering of
the flags. For instance, if there is a flag in $(WARNINGCFLAGS) that
you want to negate for a particular target, you can use something like
address@hidden = $(AM_CFLAGS) -no-flag}. If all these flags had
address@hidden = $(AM_CFLAGS) -no-flag}. If all of these flags had
been forcefully appended to @code{CFLAGS}, there would be no way to
disable one flag. Yet another reason to leave user variables to
users.
diff --git a/doc/fdl.texi b/doc/fdl.texi
index 38bfdd2..d9d28ea 100644
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -151,7 +151,7 @@ COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
+copies in covers that carry, clearly and legibly, all of these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am
index 1d1295e..3fc2888 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.am
@@ -32,7 +32,7 @@ AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS):
+$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
## Using $failcom allows "-k" to keep its natural meaning when running a
## recursive rule.
@fail= failcom='exit 1'; \
@@ -44,7 +44,14 @@ $(RECURSIVE_TARGETS):
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+## For distclean and maintainer-clean we make sure to use the full
+## list of subdirectories. We do this so that 'configure; make
+## distclean' really is a no-op, even if SUBDIRS is conditional.
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -65,46 +72,3 @@ clean: clean-recursive
distclean: distclean-recursive
maintainer-clean: maintainer-clean-recursive
-## We run all 'clean' targets in reverse order. Why? It's an attempt
-## to alleviate a problem that can happen when dependencies are
-## enabled. In this case, the .P file in one directory can depend on
-## some automatically generated header in an earlier directory. Since
-## the dependencies are required before any target is examined, make
-## bombs.
-$(RECURSIVE_CLEAN_TARGETS):
-## Using $failcom allows "-k" to keep its natural meaning when running a
-## recursive rule.
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
-## For distclean and maintainer-clean we make sure to use the full
-## list of subdirectories. We do this so that 'configure; make
-## distclean' really is a no-op, even if SUBDIRS is conditional. For
-## other clean targets this doesn't matter.
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
-## Always do '.' last.
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index 0f3a096..c2901b9 100644
--- a/lib/texinfo.tex
+++ b/lib/texinfo.tex
@@ -6150,7 +6150,7 @@ end
% Same as \defaultparindent.
\newdimen\tocindent \tocindent = 15pt
-% Now for the actual typesetting. In all these, #1 is the text and #2 is the
+% Now for the actual typesetting. In all of these, #1 is the text and #2 is the
% page number.
%
% If the toc has to be broken over pages, we want it to be at chapters
diff --git a/old/ChangeLog.01 b/old/ChangeLog.01
index 5e75ff2..f4882f7 100644
--- a/old/ChangeLog.01
+++ b/old/ChangeLog.01
@@ -4558,7 +4558,7 @@
contents.
(dist-all, dist-bzip2, dist-zip, dist-tarZ): New conditional
targets.
- And BTW, all these guys are phony.
+ And BTW, all of these guys are phony.
* automake.in (&handle_dist_worker): As its name doesn't indicate,
output distributions.
(&handle_dist): As its name doesn't indicate, don't.
diff --git a/old/ChangeLog.11 b/old/ChangeLog.11
index ce9d2b8..f6a1454 100644
--- a/old/ChangeLog.11
+++ b/old/ChangeLog.11
@@ -9096,7 +9096,7 @@
tests: optimize `instspc-*.test' for speed
After the split of `instspc.test' into various generated tests,
the running time of the testsuite has noticeably increased, since
- all these new generated tests must run aclocal, autoconf and
+ all of these new generated tests must run aclocal, autoconf and
automake, whereas previously they were run only once (at the
beginning of `instspc.test'). But luckily, since the new tests
share the same input files for the autotools, this situation can
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 2359612..bd16063 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -105,7 +105,7 @@ sc_no_brace_variable_expansions:
## Make sure 'rm' is called with '-f'.
sc_rm_minus_f:
@if grep -v '^#' $(ams) $(xtests) \
- | grep -v '/spy-rm\.tap:' \
+ | grep -vE '/(spy-rm\.tap|subobj-clean.*-pr10697\.sh):' \
| grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
then \
echo "Suspicious 'rm' invocation." 1>&2; \
diff --git a/t/c-demo.sh b/t/c-demo.sh
new file mode 100755
index 0000000..ed2a109
--- /dev/null
+++ b/t/c-demo.sh
@@ -0,0 +1,179 @@
+#! /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/>.
+
+# Demo on C support, also testing automatic dependency tracking,
+# conditional SUBDIRS and convenience libraries.
+
+required=cc
+am_create_testdir=empty
+. ./defs || Exit 1
+
+cat > configure.ac << 'END'
+AC_INIT([GNU C Demo], [22.3.2], address@hidden)
+AC_CONFIG_SRCDIR([tests/test.test])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AR
+AC_PROG_RANLIB
+AM_CONDITIONAL([RUN_TESTS], [test x"$run_tests" != x"no"])
+AC_CONFIG_FILES([Makefile src/Makefile lib/Makefile tests/Makefile])
+AC_OUTPUT
+END
+
+if cross_compiling; then
+ run_tests=no
+else
+ run_tests=yes
+fi
+export run_tests
+
+mkdir build-aux lib src tests
+
+cat > Makefile.am <<'END'
+SUBDIRS = lib src
+
+if RUN_TESTS
+SUBDIRS += tests
+endif
+
+.PHONY: test-objs
+check-local: test-objs
+test-objs:
+ test -f src/zardoz-main.$(OBJEXT)
+ test -f lib/foo.$(OBJEXT)
+ test -f lib/bar.$(OBJEXT)
+END
+
+cat > src/Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = main.c
+zardoz_LDADD = $(top_builddir)/lib/lib-convenience.a
+zardoz_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
+END
+
+cat > lib/Makefile.am << 'END'
+noinst_LIBRARIES = lib-convenience.a
+lib_convenience_a_SOURCES = foo.c
+lib_convenience_a_SOURCES += bar.c
+dist_lib_convenience_a_SOURCES = bar.h
+nodist_lib_convenience_a_SOURCES = foo.h
+
+# We want this to be auto-generated an removed by "make clean", to
+# ensure that cleaning rules work correctly; an older implementation
+# of automatic dependency tracking support suffered of weaknesses in
+# this situation, see the "historical comments" reported in:
+# http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00033.html
+foo.h: $(srcdir)/foo.c
+ sed -n 's/.*foo *(.*/&;/p' "$(srcdir)/foo.c" >address@hidden
+ test 1 -eq `wc -l <address@hidden
+ chmod a-w address@hidden && mv -f address@hidden $@
+BUILT_SOURCES = foo.h
+CLEANFILES = $(BUILT_SOURCES)
+
+check-local:
+ test -f ${top_srcdir}/tests/test.test
+END
+
+cat > tests/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = parallel-tests
+TEST_LOG_COMPILER = $(SHELL)
+TESTS = test.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > tests/test.test << 'END'
+#!/bin/sh
+set -x; set -e;
+../src/zardoz
+test "`../src/zardoz`" = 'Foo, Bar!'
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+test -f build-aux/depcomp
+test -f build-aux/compile # We have per-target flags on C sources.
+
+# Don't reject slow dependency extractors.
+./configure --enable-dependency-tracking
+
+cat > src/main.c << 'END'
+#include "foo.h"
+#include "bar.h"
+int main (void)
+{
+ printf ("%s, %s!\n", foo (), bar ());
+ return 0;
+}
+END
+
+cat > lib/foo.c << 'END'
+#include "foo.h"
+static char s[4];
+volatile char *foo (void)
+{
+ s[0] = 'F';
+ s[1] = s[2] = 'o';
+ s[3] = '\0';
+ return s;
+}
+END
+
+cat > lib/bar.c << 'END'
+#include "bar.h"
+const char *bar (void)
+{
+ return BARBAR;
+}
+END
+
+cat > lib/bar.h << 'END'
+#define BARBAR "Bar"
+const char *bar (void);
+END
+
+$MAKE
+ls -l . src lib # For debugging.
+$MAKE test-objs
+
+VERBOSE=x $MAKE check
+if cross_compiling; then
+ test ! -f tests/test-suite.log
+ test ! -f tests/test.log
+else
+ test -f tests/test-suite.log
+ grep 'Foo, Bar!' tests/test.log
+fi
+
+$MAKE distcheck
+
+if ! cross_compiling && ! grep "[ $tab]depmode=none" Makefile; then
+ # Let's check automatic dependency tracking.
+ sed 's/^\(#define BARBAR \).*/\1 "Zap"/' lib/bar.h > t
+ mv -f t lib/bar.h
+ $MAKE
+ ./src/zardoz
+ test "`./src/zardoz`" = 'Foo, Zap!'
+fi
+
+$MAKE clean
+test ! -f lib/foo.h
+test -f lib/bar.h
+
+:
diff --git a/t/cxx-lt-demo.sh b/t/cxx-lt-demo.sh
index 3c931e0..c110435 100755
--- a/t/cxx-lt-demo.sh
+++ b/t/cxx-lt-demo.sh
@@ -128,6 +128,6 @@ $MAKE test-objs
VERBOSE=yes $MAKE check-TESTS
grep 'Howdy.*Testsuite' try.log || grep 'Skip:.*cross-compiled' try.log
-$MAKE -e CC=false distcheck
+$MAKE distcheck
:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index a79f8cb..ab35162 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -322,6 +322,7 @@ t/copy.sh \
t/cscope.tap \
t/cscope2.sh \
t/cscope3.sh \
+t/c-demo.sh \
t/cxx.sh \
t/cxx2.sh \
t/cxxcpp.sh \
@@ -1008,6 +1009,7 @@ t/subdir7.sh \
t/subdir8.sh \
t/subdir9.sh \
t/subdir10.sh \
+t/subdir-distclean.sh \
t/subdirbuiltsources.sh \
t/subcond.sh \
t/subcond2.sh \
@@ -1025,6 +1027,8 @@ t/subobj11a.sh \
t/subobj11b.sh \
t/subobj11c.sh \
t/subobjname.sh \
+t/subobj-clean-pr10697.sh \
+t/subobj-clean-lt-pr10697.sh \
t/subpkg.sh \
t/subpkg2.sh \
t/subpkg3.sh \
diff --git a/t/subdir-distclean.sh b/t/subdir-distclean.sh
new file mode 100755
index 0000000..191c018
--- /dev/null
+++ b/t/subdir-distclean.sh
@@ -0,0 +1,103 @@
+#! /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/>.
+
+# Check that "./configure && make && make distclean" is actually a
+# no-op, even when conditional SUBDIRS are involved.
+
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile sub1/subsub/Makefile])
+AM_CONDITIONAL([COND], [false])
+AC_SUBST([extra_subdirs], [''])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub1/subsub
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub1
+if COND
+SUBDIRS += sub2
+endif
+END
+
+cat > sub1/Makefile.am << 'END'
+all-local:
+ : > run
+CLEANFILES = run
+SUBDIRS = @extra_subdirs@
+DIST_SUBDIRS = subsub
+END
+
+cat > sub2/Makefile.am << 'END'
+all-local:
+ @echo "Should not run in `pwd`!"
+ exit 1
+DISTCLEANFILES = oops
+END
+cp sub2/Makefile.am sub1/subsub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -c --add-missing
+
+./configure
+
+test -f sub1/Makefile
+test -f sub2/Makefile
+test -f sub1/subsub/Makefile
+
+$MAKE
+test -f sub1/run
+touch sub2/oops sub1/subsub/oops
+
+$MAKE distclean
+test ! -f sub1/run
+test ! -f sub2/oops
+test ! -f sub1/subsub/oops
+test ! -f sub1/Makefile
+test ! -f sub2/Makefile
+test ! -f sub1/subsub/Makefile
+
+mkdir build
+cd build
+
+../configure
+
+$MAKE
+
+test -f sub1/Makefile
+test -f sub2/Makefile
+test -f sub1/subsub/Makefile
+
+test -f sub1/run
+touch sub2/oops sub1/subsub/oops
+
+$MAKE maintainer-clean
+test ! -f sub1/run
+test ! -f sub2/oops
+test ! -f sub1/subsub/oops
+test ! -f sub1/Makefile
+test ! -f sub2/Makefile
+test ! -f sub1/subsub/Makefile
+
+cd ..
+
+./configure
+$MAKE distclean
+
+:
diff --git a/t/subobj-clean-lt-pr10697.sh b/t/subobj-clean-lt-pr10697.sh
new file mode 100755
index 0000000..cfebc99
--- /dev/null
+++ b/t/subobj-clean-lt-pr10697.sh
@@ -0,0 +1,171 @@
+#! /bin/sh
+# Copyright (C) 1998-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/>.
+
+# Removing subdir objects does not cause too much 'rm' invocations.
+# Also, if we rename a source file in a subdirectory, the stale
+# compiled object corresponding to the old name still gets removed
+# by "make mostlyclean". See automake bug#10697.
+# This is the libtool case. Keep this test in sync with sister test
+# 'subobj-clean-pr10697.sh', which deals with the non-libtool case.
+
+required='cc libtoolize'
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AM_PROG_AR
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+END
+
+oPATH=$PATH
+ocwd=`pwd` || fatal_ "getting current working directory"
+
+# An rm(1) wrapper that fails when invoked too many times.
+mkdir rm-wrap
+max_rm_invocations=6
+count_file=$ocwd/rm-wrap/count
+cat > rm-wrap/rm <<END
+#!/bin/sh
+set -e
+count=\`cat '$count_file'\`
+count=\`expr \$count + 1\`
+if test \$count -le $max_rm_invocations; then :; else
+ echo "rm invoked more than $max_rm_invocations times" >&2
+ exit 1
+fi
+echo "\$count" > '$count_file'
+PATH='$oPATH'; export PATH
+exec rm "\$@"
+END
+chmod a+x rm-wrap/rm
+echo "0" > rm-wrap/count
+
+cat > Makefile.am <<'END'
+.PHONY: sanity-check-rm
+sanity-check-rm:
+ rm -f 1
+ rm -f 2
+ rm -f 3
+ rm -f 4
+ rm -f 5
+ rm -f 6
+ rm -f x && exit 1; :
+ echo "0" > rm-wrap/count
+
+AUTOMAKE_OPTIONS = subdir-objects
+lib_LTLIBRARIES = libfoo.la
+libfoo_la_SOURCES = \
+ sub1/a.c \
+ sub1/b.c \
+ sub1/c.c \
+ sub1/d.c \
+ sub1/e.c \
+ sub1/f.c \
+ sub2/a.c \
+ sub2/b.c \
+ sub2/c.c \
+ sub2/d.c \
+ sub2/e.c \
+ sub2/f.c \
+ main.c
+END
+
+mkdir sub1 sub2
+echo 'int libmain (void)' > main.c
+echo '{' >> main.c
+for i in 1 2; do
+ for j in a b c d e f; do
+ echo "void $j$i (void) { }" > sub$i/$j.c
+ echo " $j$i ();" >> main.c
+ done
+done
+echo ' return 0;' >> main.c
+echo '}' >> main.c
+cat main.c # For debugging.
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# The use of this variable is only meant to keep us better in sync
+# with the sister test 'subobj-clean-pr10697.sh'.
+OBJEXT=lo
+
+$MAKE
+
+# This must go after configure, since that will invoke rm many times.
+PATH=$ocwd/rm-wrap$PATH_SEPARATOR$PATH; export PATH
+$MAKE sanity-check-rm || fatal_ "rm wrapper doesn't work as expected"
+
+$MAKE mostlyclean
+ls -l . sub1 sub2
+for i in 1 2; do
+ for j in a b c d e f; do
+ test ! -f sub$i/$j.o
+ test ! -f sub$i/$j.obj
+ test ! -f sub$i/$j.lo
+ test -f sub$i/$j.c || Exit 99 # Sanity check
+ done
+done
+
+PATH=$oPATH; export PATH
+rm -rf rm-wrap
+
+$MAKE clean
+$MAKE
+test -f sub1/a.$OBJEXT
+test -f sub2/d.$OBJEXT
+
+$sleep
+
+mv -f sub2/d.c sub2/x.c
+rm -f sub1/a.c
+
+sed -e '/ a1 ()/d' main.c > t
+mv -f t main.c
+
+sed -e '/sub1\/a\.c/d' -e 's|sub2/d\.c|sub2/x.c|' Makefile.am > t
+mv -f t Makefile.am
+
+using_gmake || $MAKE Makefile
+$MAKE
+test -f sub2/x.$OBJEXT
+
+# The stale objects are still there after a mere "make all" ...
+test -f sub1/a.$OBJEXT
+test -f sub2/a.$OBJEXT
+
+# ... but they get removed by "make mostlyclean" ...
+$MAKE mostlyclean
+test ! -f sub1/a.$OBJEXT
+test ! -f sub2/d.$OBJEXT
+
+# ... and do not get rebuilt ...
+$MAKE clean
+$MAKE all
+test ! -f sub1/a.$OBJEXT
+test ! -f sub2/d.$OBJEXT
+
+# ... while the non-stale files do.
+test -f sub1/b.$OBJEXT
+test -f sub2/x.$OBJEXT
+
+:
diff --git a/t/subobj-clean-pr10697.sh b/t/subobj-clean-pr10697.sh
new file mode 100755
index 0000000..69abc10
--- /dev/null
+++ b/t/subobj-clean-pr10697.sh
@@ -0,0 +1,166 @@
+#! /bin/sh
+# Copyright (C) 1998-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/>.
+
+# Removing subdir objects does not cause too much 'rm' invocations.
+# Also, if we rename a source file in a subdirectory, the stale
+# compiled object corresponding to the old name still gets removed by
+# "make mostlyclean". See automake bug#10697.
+# This is the non-libtool case. Keep this test in sync with sister test
+# 'subobj-clean-lt-pr10697.sh', which deals with the libtool case.
+
+required=cc
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([get-objext.sh:get-objext.in])
+AC_OUTPUT
+END
+
+echo "OBJEXT='@OBJEXT@'" > get-objext.in
+
+oPATH=$PATH
+ocwd=`pwd` || fatal_ "getting current working directory"
+
+# An rm(1) wrapper that fails when invoked too many times.
+mkdir rm-wrap
+max_rm_invocations=3
+count_file=$ocwd/rm-wrap/count
+cat > rm-wrap/rm <<END
+#!/bin/sh
+set -e
+count=\`cat '$count_file'\`
+count=\`expr \$count + 1\`
+if test \$count -le $max_rm_invocations; then :; else
+ echo "rm invoked more than $max_rm_invocations times" >&2
+ exit 1
+fi
+echo "\$count" > '$count_file'
+PATH='$oPATH'; export PATH
+exec rm "\$@"
+END
+chmod a+x rm-wrap/rm
+echo "0" > rm-wrap/count
+
+cat > Makefile.am <<'END'
+.PHONY: sanity-check-rm
+sanity-check-rm:
+ rm -f 1
+ rm -f 2
+ rm -f 3
+ rm -f x && exit 1; :
+ echo "0" > rm-wrap/count
+
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+foo_SOURCES = \
+ sub1/a.c \
+ sub1/b.c \
+ sub1/c.c \
+ sub1/d.c \
+ sub1/e.c \
+ sub1/f.c \
+ sub2/a.c \
+ sub2/b.c \
+ sub2/c.c \
+ sub2/d.c \
+ sub2/e.c \
+ sub2/f.c \
+ main.c
+END
+
+mkdir sub1 sub2
+echo 'int main (void)' > main.c
+echo '{' >> main.c
+for i in 1 2; do
+ for j in a b c d e f; do
+ echo "void $j$i (void) { }" > sub$i/$j.c
+ echo " $j$i ();" >> main.c
+ done
+done
+echo ' return 0;' >> main.c
+echo '}' >> main.c
+cat main.c # For debugging.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+test -f get-objext.sh
+. ./get-objext.sh
+
+$MAKE
+
+# This must go after configure, since that will invoke rm many times.
+PATH=$ocwd/rm-wrap$PATH_SEPARATOR$PATH; export PATH
+$MAKE sanity-check-rm || fatal_ "rm wrapper doesn't work as expected"
+
+$MAKE mostlyclean
+ls -l . sub1 sub2
+for i in 1 2; do
+ for j in a b c d e f; do
+ test ! -f sub$i/$j.o
+ test ! -f sub$i/$j.obj
+ test -f sub$i/$j.c || Exit 99 # Sanity check
+ done
+done
+
+PATH=$oPATH; export PATH
+rm -rf rm-wrap
+
+$MAKE clean
+$MAKE
+test -f sub1/a.$OBJEXT
+test -f sub2/d.$OBJEXT
+
+$sleep
+
+mv -f sub2/d.c sub2/x.c
+rm -f sub1/a.c
+
+sed -e '/ a1 ()/d' main.c > t
+mv -f t main.c
+
+sed -e '/sub1\/a\.c/d' -e 's|sub2/d\.c|sub2/x.c|' Makefile.am > t
+mv -f t Makefile.am
+
+using_gmake || $MAKE Makefile
+$MAKE
+test -f sub2/x.$OBJEXT
+
+# The stale objects are still there after a mere "make all" ...
+test -f sub1/a.$OBJEXT
+test -f sub2/a.$OBJEXT
+
+# ... but they get removed by "make mostlyclean" ...
+$MAKE mostlyclean
+test ! -f sub1/a.$OBJEXT
+test ! -f sub2/d.$OBJEXT
+
+# ... and do not get rebuilt ...
+$MAKE clean
+$MAKE all
+test ! -f sub1/a.$OBJEXT
+test ! -f sub2/d.$OBJEXT
+
+# ... while the non-stale files do.
+test -f sub1/b.$OBJEXT
+test -f sub2/x.$OBJEXT
+
+:
diff --git a/t/tap-whitespace-normalization.sh
b/t/tap-whitespace-normalization.sh
index a43d29a..3108fc6 100755
--- a/t/tap-whitespace-normalization.sh
+++ b/t/tap-whitespace-normalization.sh
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# TAP support: whitespace normalization (or lack thereof) in the testsuite
-# progress output on console. We keep all these checks here in a single
+# progress output on console. We keep all of these checks here in a single
# script so that a potential cosmetic change in the output format won't
# force us to tweak dozens of other tests (hopefully).
# See also related test 'tap-todo-skip-whitespace.test'.
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-72-g2ef0a2d,
Stefano Lattarini <=