compiled object file that is in the same directory of a subdir
object. See automake bug#10697.
+* Silent rules support:
+
+ - A new predefined $(AM_V_P) make variable is provided; it expands
+ to a shell conditional that can be used in recipes to know whether
+ make is being run in silent or verbose mode.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.12.1:
return 'am__v_' . $name;
}
-# define_verbose_var (NAME, VAL)
-# ------------------------------
-# For silent rules, setup VAR and dispatcher, to expand to VAL if silent.
-sub define_verbose_var ($$)
-{
- my ($name, $val) = @_;
+# define_verbose_var (NAME, VAL-IF-SILENT, [VAL-IF-VERBOSE])
+# ----------------------------------------------------------
+# For silent rules, setup VAR and dispatcher, to expand to
+# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to
+# empty) if not.
+sub define_verbose_var ($$;$)
+{
+ my ($name, $silent_val, $verbose_val) = @_;
+ $verbose_val = '' unless defined $verbose_val;
my $var = verbose_var ($name);
my $pvar = verbose_private_var ($name);
my $silent_var = $pvar . '_0';
+ my $verbose_var = $pvar . '_1';
# For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
# and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
# For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)',
INTERNAL);
- Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, $val,
- '', INTERNAL, VAR_ASIS)
+ Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
+ $silent_val, '', INTERNAL, VAR_ASIS)
if (! vardef ($silent_var, TRUE));
+ Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
+ $verbose_val, '', INTERNAL, VAR_ASIS)
+ if (! vardef ($verbose_var, TRUE));
}
# Above should not be needed in the general automake code.
{
my ($name) = @_;
define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;');
- define_verbose_var ('at', '@');
}
# define_verbose_texinfo
return verbose_flag ('lt');
}
+sub handle_silent ()
+{
+ # Define "$(AM_V_P)", expanding to a shell conditional that can be
+ # used in make recipes to determine whether we are being run in
+ # silent mode or not. The choice of the name derives from the LISP
+ # convention of appending the letter 'P' to denote a predicate (see
+ # also "the '-P' convention" in the Jargon File); we do so for lack
+ # of a better convention.
+ define_verbose_var ('P', 'false', ':');
+ # *Always* provide the user with '$(AM_V_GEN)', unconditionally.
+ define_verbose_tagvar ('GEN');
+ define_verbose_var ('at', '@');
+}
+
################################################################
unless defined $done{$languages{'c'}};
define_linker_variable ($languages{'c'});
}
-
- # Always provide the user with 'AM_V_GEN' for silent rules.
- define_verbose_tagvar ('GEN');
}
handle_programs;
handle_scripts;
+ handle_silent;
+
# These must be run after all the sources are scanned. They
# use variables defined by &handle_libraries, &handle_ltlibraries,
# or &handle_programs.
it is enough to have a single @file{Makefile.am} that builds
everything in place.
-In larger projects it is common to organize files in different
-directories, in a tree. For instance one directory per program, per
-library or per module. The traditional approach is to build these
-subdirectories recursively: each directory contains its @file{Makefile}
-(generated from @file{Makefile.am}), and when @command{make} is run
-from the top level directory it enters each subdirectory in turn to
-build its contents.
+In larger projects, it is common to organize files in different
+directories, in a tree. For example, there could be a directory
+for the program's source, one for the testsuite, and one for the
+documentation; or, for very large projects, there could be one
+directory per program, per library or per module.
+
+The traditional approach is to build these subdirectories recursively,
+employing @emph{make recursion}: each directory contains its
+own @file{Makefile}, and when @command{make} is run from the top-level
+directory, it enters each subdirectory in turn, and invokes there a
+new @command{make} instance to build the directory's contents.
+
+Because this approach is very widespread, Automake offers built-in
+support for it. However, it is worth nothing that the use of make
+recursion has its own serious issues and drawbacks, and that it's
+well possible to have packages with a multi directory layout that
+make little or no use of such recursion (examples of such packages
+are GNU Bison and GNU Automake itself); see also the @ref{Alternative}
+section below.
@menu
* Subdirectories:: Building subdirectories recursively
@cindex @code{SUBDIRS}, explained
-In packages with subdirectories, the top level @file{Makefile.am} must
+In packages using make recursion, the top level @file{Makefile.am} must
tell Automake which subdirectories are to be built. This is done via
the @code{SUBDIRS} variable.
@vindex SUBDIRS
built after everything else since they are meant to test what has
been constructed.
-All @code{clean} rules are run in reverse order of build rules.
-
@node Conditional Subdirectories
@section Conditional Subdirectories
@cindex Subdirectories, building conditionally
@cindex @code{SUBDIRS} and @code{AM_CONDITIONAL}
@cindex @code{AM_CONDITIONAL} and @code{SUBDIRS}
-@c Keep in sync with subcond2.sh
+@c Keep in sync with subdir-am-cond.sh
@file{configure} should output the @file{Makefile} for each directory
and define a condition into which @file{opt/} should be built.
@cindex @code{SUBDIRS} and @code{AC_SUBST}
@cindex @code{AC_SUBST} and @code{SUBDIRS}
-@c Keep in sync with subcond3.sh
+@c Keep in sync with subdir-ac-subst.sh
Another possibility is to define @code{MAYBE_OPT} from
@file{./configure} using @code{AC_SUBST}:
If you've ever read Peter Miller's excellent paper,
@uref{http://miller.emu.id.au/pmiller/books/rmch/,
Recursive Make Considered Harmful}, the preceding sections on the use of
-subdirectories will probably come as unwelcome advice. For those who
+make recursion will probably come as unwelcome advice. For those who
haven't read the paper, Miller's main thesis is that recursive
@command{make} invocations are both slow and error-prone.
to write a single @file{Makefile.am} for a complex multi-directory
package.
-
By default an installable file specified in a subdirectory will have its
directory name stripped before installation. For instance, in this
example, the header file will be installed as
@vindex @code{AM_DEFAULT_VERBOSITY}
@vindex @code{AM_V}
@vindex @code{AM_DEFAULT_V}
-To extend the silent mode to your own rules, you have two choices:
+To extend the silent mode to your own rules, you have few choices:
@itemize @bullet
+
@item
You can use the predefined variable @code{AM_V_GEN} as a prefix to
commands that should output a status line in silent mode, and
@code{AM_V_at} as a prefix to commands that should not output anything
in silent mode. When output is to be verbose, both of these variables
will expand to the empty string.
+
+@item
+You can silence a recipe unconditionally with @code{@@}, and then use
+the predefined variable @code{AM_V_P} to know whether make is being run
+in silent or verbose mode, adjust the verbose information your recipe
+displays accordingly:
+
+@example
+generate-headers:
+ @set -e; \
+ ... [commands defining a shell variable '$headers'] ...; \
+ if $(AM_V_P); then set -x; else echo " GEN [headers]"; fi; \
+ rm -f $$headers && generate-header --flags $$headers
+@end example
+
@item
You can add your own variables, so strings of your own choice are shown.
The following snippet shows how you would define your own equivalent of
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-02-10'
+timestamp='2012-06-10'
# 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
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
#!/bin/sh
# Sign files and upload them.
-scriptversion=2012-01-15.15; # UTC
+scriptversion=2012-06-11.00; # UTC
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
#
conffile=.gnuploadrc
to=
dry_run=false
+replace=
symlink_files=
delete_files=
delete_symlinks=
--to DEST specify one destination for FILES
(multiple --to options are allowed)
--user NAME sign with key NAME
+ --replace allow replacements of existing files
--symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names
--dry-run do nothing, show what would have been done
+ (including the constructed directive file)
--version output version information and exit
If --symlink-regex is given without EXPR, then the link target name
--delete)
collect_var=delete_files
;;
+ --replace)
+ replace="replace: true"
+ ;;
--rmsymlink)
collect_var=delete_symlinks
;;
# listings with their arguments...).
# Remember this script runs with 'set -e', so if echo is not built-in
# it will exit now.
-PATH=/empty echo -n "Enter GPG passphrase: "
-stty -echo
-read -r passphrase
-stty echo
-echo
+if $dry_run; then :; else
+ PATH=/empty echo -n "Enter GPG passphrase: "
+ stty -echo
+ read -r passphrase
+ stty echo
+ echo
+fi
if test $# -ne 0; then
for file
fi
cat >${2}.directive<<EOF
-version: 1.1
+version: 1.2
directory: $1
comment: gnupload v. $scriptversion$stmt
EOF
do
echo "Uploading $file to $dest ..."
stmt=
+ #
+ # allowing file replacement is all or nothing.
+ if test -n "$replace"; then stmt="$stmt
+$replace"
+ fi
+ #
files="$file $file.sig"
destdir=`echo $dest | sed 's/[^:]*://'`
if test -n "$symlink_expr"; then
usage_error ()
{
echo "$me: $*" >&2
- echo "Try \`$me --help' for more information." >&2
+ echo "Try '$me --help' for more information." >&2
exit 1
}
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2012-05-16.16}
+\def\texinfoversion{2012-06-05.14}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
% #1 is a control sequence in which to do the replacements,
% which we \xdef.
\def\txiescapepdf#1{%
- \ifx\pdfescapestring\relax
+ \ifx\pdfescapestring\thisisundefined
% No primitive available; should we give a warning or log?
% Many times it won't matter.
\else
% Same as \defaultparindent.
\newdimen\tocindent \tocindent = 15pt
-% Now for the actual typesetting. In all of these, #1 is the text and #2 is the
+% Now for the actual typesetting. In all 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
END
: > obj/Makefile.am
-echo 'SUBDIRS = obj' >Makefile.am
+echo 'SUBDIRS = obj' > Makefile.am
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:1:.*obj.*BSD' stderr
+grep "^Makefile\.am:1:.*'obj'.*BSD make" stderr
cat >Makefile.am <<'END'
SUBDIRS = @STH@
END
AUTOMAKE_fails
-grep 'Makefile.am:2:.*obj.*BSD' stderr
+grep "^Makefile\\.am:2:.*'obj'.*BSD make" stderr
+
+rm -rf autom4te*.cache
+
+cat >configure.ac << 'END'
+AC_INIT([x], [1.0])
+AC_CONFIG_AUX_DIR([obj])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+
+rm -f obj/Makefile.am
+: > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails -a
+grep "^configure\.ac:2:.*'obj'.*BSD make" stderr
:
t/compile_f_c_cxx.sh \
t/cond-basic.sh \
t/cond.sh \
-t/cond2.sh \
t/cond3.sh \
t/cond4.sh \
t/cond5.sh \
t/confh6.sh \
t/confh7.sh \
t/confh8.sh \
+t/confh-subdir-clean.sh \
t/confincl.sh \
t/conflnk.sh \
t/conflnk2.sh \
t/depcomp2.sh \
t/depcomp8a.sh \
t/depcomp8b.sh \
+t/depcomp-implicit-auxdir.sh \
t/depdist.sh \
t/depend.sh \
t/depend3.sh \
t/depend6.sh \
t/deprecated-acinit.sh \
t/destdir.sh \
+t/dir-named-obj-is-bad.sh \
t/dirlist.sh \
t/dirlist2.sh \
t/dirlist-abspath.sh \
t/silent-lex.sh \
t/silent-yacc.sh \
t/silent-yacc-headers.sh \
-t/srcsub.sh \
-t/srcsub2.sh \
+t/src-acsubst.sh \
+t/sourcefile-in-subdir.sh \
t/space.sh \
t/specflg.sh \
t/specflg2.sh \
t/strip2.sh \
t/strip3.sh \
t/subdir.sh \
-t/subdir2.sh \
-t/subdir3.sh \
-t/subdir4.sh \
-t/subdir5.sh \
-t/subdir6.sh \
-t/subdir7.sh \
-t/subdir8.sh \
-t/subdir9.sh \
+t/subdir-ac-subst.sh \
+t/subdir-add-pr46.sh \
+t/subdir-add2-pr46.sh \
+t/subdir-am-cond.sh \
+t/subdir-cond-err.sh \
+t/subdir-cond-gettext.sh \
+t/subdir-order.sh \
+t/subdir-with-slash.sh \
+t/subdir-subsub.sh \
t/subdir10.sh \
t/subdir-distclean.sh \
t/subdirbuiltsources.sh \
-t/subcond.sh \
-t/subcond2.sh \
-t/subcond3.sh \
t/subobj.sh \
t/subobj2.sh \
t/subobj4.sh \
. ./defs || Exit 1
cat >>configure.ac <<'EOF'
+AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
EOF
-cat > Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = -Wno-portability-recursive
+# We delegate all the work to the subdir makefile. This is done
+# to ensure any command-line setting of $(V) gets correctly passed
+# down to recursive make invocations.
+echo SUBDIRS = sub > Makefile.am
+mkdir sub
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-portability-recursive
my_verbose = $(my_verbose_$(V))
my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
-my_verbose_0 = @echo GEN $@;
+my_verbose_0 = @echo " XGEN $@";
-all-local: foo
+all-local: foo gen-headers
+
+list = 0 1 2
+.PHONY: gen-headers
+gen-headers:
+ @headers=`for i in $(list); do echo sub/$$i.h; done`; \
+ if $(AM_V_P); then set -x; else \
+ echo " GEN [headers]"; \
+ fi; \
+ rm -f $$headers || exit 1; \
+## Only fake header generation.
+ : generate-header --flags $$headers
foo: foo.in
$(my_verbose)cp $(srcdir)/foo.in $@
CLEANFILES = foo
EOF
-: >foo.in
+: > sub/foo.in
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep '^ *GEN foo *$' stdout
-grep 'cp ' stdout && Exit 1
+do_check ()
+{
+ case ${1-} in
+ --silent) silent=:;;
+ --verbose) silent=false;;
+ *) fatal_ "do_check(): incorrect usage";;
+ esac
+ shift
+ $MAKE clean
+ $MAKE ${1+"$@"} >output 2>&1 || { cat output; Exit 1; }
+ sed 's/^/ /' output
+ if $silent; then
+ $FGREP 'cp ' output && Exit 1
+ $FGREP 'generate-header' output && Exit 1
+ $FGREP 'rm -f' output && Exit 1
+ grep '[012]\.h' output && Exit 1
+ grep '^ XGEN foo$' output
+ grep '^ GEN \[headers\]$' output
+ else
+ $FGREP 'GEN ' output && Exit 1
+ $FGREP 'cp ./foo.in foo' output
+ $FGREP "rm -f sub/0.h sub/1.h sub/2.h" output
+ $FGREP "generate-header --flags sub/0.h sub/1.h sub/2.h" output
+ fi
+}
-$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'GEN ' stdout && Exit 1
-grep 'cp \.*/foo\.in foo' stdout
+./configure --enable-silent-rules
+do_check --silent
+do_check --verbose V=1
$MAKE distclean
./configure --disable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'GEN ' stdout && Exit 1
-grep 'cp \.*/foo\.in foo' stdout
-
-$MAKE clean
-$MAKE V=0 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep '^ *GEN foo *$' stdout
-grep 'cp ' stdout && Exit 1
+do_check --verbose
+do_check --silent V=0
+
+$MAKE distclean
:
# 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 config sub in _SOURCES fails.
+# Test to make sure config substitution in _SOURCES fails.
. ./defs || Exit 1
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
+echo AC_PROG_CC >> configure.ac
cat > Makefile.am << 'END'
-bin_PROGRAMS = x
+bin_PROGRAMS = x y
x_SOURCES = x.c @FOO@
-EXTRA_x_SOURCES = y.c
+bar = @FOO@
+foo = $(bar)
+EXTRA_y_SOURCES = $(foo) y.c
END
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:2:.*x_SOURCES.*substitution' stderr
+
+cat > exp-err << 'END'
+Makefile.am:2: error: 'x_SOURCES' includes configure substitution '@FOO@';
+Makefile.am:2: configure substitutions are not allowed in _SOURCES variables
+Makefile.am:3: error: 'bar' includes configure substitution '@FOO@'
+Makefile.am:3: and is referred to from 'EXTRA_y_SOURCES';
+Makefile.am:3: configure substitutions are not allowed in _SOURCES variables
+END
+
+diff exp-err stderr
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2001-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/>.
-
-# Test to make sure config sub in _SOURCES fails.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = x
-bar = @FOO@
-foo = $(bar)
-x_SOURCES = x.c $(foo)
-EXTRA_x_SOURCES = y.c
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*bar.*substitution' stderr
-grep 'Makefile.am:2:.*x_SOURCES' stderr
# The for conditional SUBDIRS.
# SUBDIRS + AC_SUBST setup from the manual.
-# Lots of lines here are duplicated in subcond2.test.
+# Lots of lines here are duplicated in subcond-am-cond.test.
. ./defs || Exit 1
test -f sanity1
DISTCHECK_CONFIGURE_FLAGS=want_opt=yes $MAKE distcheck
test -f sanity2
+
+:
# The for conditional SUBDIRS.
# SUBDIRS + AM_CONDITIONAL setup from the manual.
-# Lots of lines here are duplicated in subcond3.test.
+# Lots of lines here are duplicated in subdir-ac-subst.test.
. ./defs || Exit 1
test -f sanity1
DISTCHECK_CONFIGURE_FLAGS=want_opt=yes $MAKE distcheck
test -f sanity2
+
+:
cat >> configure.ac << 'END'
AM_GNU_GETTEXT
-AM_CONDITIONAL(MAUDE, true)
+AM_CONDITIONAL([MAUDE], [true])
ALL_LINGUAS=
-AC_SUBST(ALL_LINGUAS)
+AC_SUBST([ALL_LINGUAS])
END
mkdir po intl
$ACLOCAL
# Gettext wants config.guess etc.
$AUTOMAKE --add-missing
+
+:
--- /dev/null
+#! /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/>.
+
+# The $(SUDBIRS) entries are processed in the order they are specified.
+
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([
+ sub0/Makefile
+ sub1/Makefile
+ sub2/Makefile
+ sub3/Makefile
+ sub3/a/Makefile
+ sub3/b/Makefile
+])
+AC_OUTPUT
+END
+
+mkdir sub0 sub1 sub2 sub3 sub3/a sub3/b
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub2 sub1 sub3 sub0
+all-local:
+ test -f sub0/run
+ test -f sub1/run
+ test -f sub2/run
+ test -f sub3/run
+ test -f sub3/a/run
+ test -f sub3/b/run
+ test ! -f run
+ : > run
+
+CLEANFILES = \
+ run \
+ sub0/run \
+ sub1/run \
+ sub2/run \
+ sub3/run \
+ sub3/a/run \
+ sub3/b/run
+END
+
+cat > sub0/Makefile.am << 'END'
+all-local:
+ test ! -f $(top_builddir)/run
+ test -f $(top_builddir)/sub1/run
+ test -f $(top_builddir)/sub3/run
+ test -f $(top_builddir)/sub3/a/run
+ test -f $(top_builddir)/sub3/b/run
+ test ! -f run
+ : > run
+END
+
+cat > sub1/Makefile.am << 'END'
+all-local:
+ test ! -f $(top_builddir)/run
+ test ! -f $(top_builddir)/sub0/run
+ test -f $(top_builddir)/sub2/run
+ test ! -f $(top_builddir)/sub3/run
+ test ! -f $(top_builddir)/sub3/a/run
+ test ! -f $(top_builddir)/sub3/b/run
+ test ! -f run
+ : > run
+END
+
+
+cat > sub2/Makefile.am << 'END'
+all-local:
+ test ! -f $(top_builddir)/run
+ test ! -f $(top_builddir)/sub0/run
+ test ! -f $(top_builddir)/sub1/run
+ test ! -f $(top_builddir)/sub3/run
+ test ! -f $(top_builddir)/sub3/a/run
+ test ! -f $(top_builddir)/sub3/b/run
+ test ! -f run
+ : > run
+END
+
+cat > sub3/Makefile.am << 'END'
+SUBDIRS = b . a
+all-local:
+ test ! -f $(top_builddir)/run
+ test ! -f $(top_builddir)/sub0/run
+ test -f $(top_builddir)/sub1/run
+ test ! -f $(top_builddir)/sub3/a/run
+ test -f $(top_builddir)/sub3/b/run
+ test ! -f run
+ : > run
+END
+
+cat > sub3/a/Makefile.am << 'END'
+all-local:
+ test ! -f $(top_builddir)/run
+ test ! -f $(top_builddir)/sub0/run
+ test -f $(top_builddir)/sub1/run
+ test -f $(top_builddir)/sub3/b/run
+ test -f $(top_builddir)/sub3/run
+ test ! -f run
+ : > run
+END
+
+cat > sub3/b/Makefile.am << 'END'
+all-local:
+ test ! -f $(top_builddir)/run
+ test ! -f $(top_builddir)/sub0/run
+ test -f $(top_builddir)/sub1/run
+ test ! -f $(top_builddir)/sub3/b/run
+ test ! -f $(top_builddir)/sub3/run
+ test ! -f run
+ : > run
+END
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -c --add-missing
+
+./configure
+
+for j in '' -j12; do
+ $MAKE $j
+ test -f run
+ test -f sub0/run
+ test -f sub1/run
+ test -f sub3/run
+ test -f sub3/a/run
+ test -f sub3/b/run
+ $MAKE clean
+ find . | grep 'run$' && Exit 1
+ : # For shells with busted 'set -e'
+done
+
+:
END
cat > one/two/Makefile.am << 'END'
-pkgdata_DATA =
+pkgdata_DATA = data.txt
+data.txt:
+ echo dummy >$@
END
$ACLOCAL
+$AUTOCONF
$AUTOMAKE --gnu
+./configure
+$MAKE
+test -f one/two/data.txt
+
:
# 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 SUDBIRS with /.
+# Test SUDBIRS with '/' in them.
. ./defs || Exit 1