diff options
-rw-r--r-- | doc/automake.texi | 4 | ||||
-rwxr-xr-x | t/subdir-ac-subst.sh (renamed from t/subcond3.sh) | 4 | ||||
-rwxr-xr-x | t/subdir-add-pr46.sh (renamed from t/subdir5.sh) | 0 | ||||
-rwxr-xr-x | t/subdir-add2-pr46.sh (renamed from t/subdir8.sh) | 0 | ||||
-rwxr-xr-x | t/subdir-am-cond.sh (renamed from t/subcond2.sh) | 4 | ||||
-rwxr-xr-x | t/subdir-cond-err.sh (renamed from t/cond2.sh) | 0 | ||||
-rwxr-xr-x | t/subdir-cond-gettext.sh (renamed from t/subcond.sh) | 6 | ||||
-rw-r--r-- | t/subdir-order.sh | 147 | ||||
-rwxr-xr-x | t/subdir-subsub.sh (renamed from t/subdir2.sh) | 9 | ||||
-rwxr-xr-x | t/subdir-with-slash.sh (renamed from t/subdir9.sh) | 2 |
10 files changed, 168 insertions, 8 deletions
diff --git a/doc/automake.texi b/doc/automake.texi index 222f9ec54..1f4d7dbfb 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -4338,7 +4338,7 @@ does not know the possible values of these variables. In this case @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. @@ -4378,7 +4378,7 @@ automatically because it knows that @code{MAYBE_OPT} can contain @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}: diff --git a/t/subcond3.sh b/t/subdir-ac-subst.sh index e84aa4114..0ef238bf1 100755 --- a/t/subcond3.sh +++ b/t/subdir-ac-subst.sh @@ -16,7 +16,7 @@ # 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 @@ -88,3 +88,5 @@ $MAKE distcheck test -f sanity1 DISTCHECK_CONFIGURE_FLAGS=want_opt=yes $MAKE distcheck test -f sanity2 + +: diff --git a/t/subdir5.sh b/t/subdir-add-pr46.sh index a74c746d0..a74c746d0 100755 --- a/t/subdir5.sh +++ b/t/subdir-add-pr46.sh diff --git a/t/subdir8.sh b/t/subdir-add2-pr46.sh index ee9e0b0d5..ee9e0b0d5 100755 --- a/t/subdir8.sh +++ b/t/subdir-add2-pr46.sh diff --git a/t/subcond2.sh b/t/subdir-am-cond.sh index 0e9f45137..7f5e34a62 100755 --- a/t/subcond2.sh +++ b/t/subdir-am-cond.sh @@ -16,7 +16,7 @@ # 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 @@ -87,3 +87,5 @@ $MAKE distcheck test -f sanity1 DISTCHECK_CONFIGURE_FLAGS=want_opt=yes $MAKE distcheck test -f sanity2 + +: diff --git a/t/cond2.sh b/t/subdir-cond-err.sh index 1b5fceaee..1b5fceaee 100755 --- a/t/cond2.sh +++ b/t/subdir-cond-err.sh diff --git a/t/subcond.sh b/t/subdir-cond-gettext.sh index c09e5ad4f..459f6395a 100755 --- a/t/subcond.sh +++ b/t/subdir-cond-gettext.sh @@ -21,9 +21,9 @@ required=gettext 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 @@ -40,3 +40,5 @@ END $ACLOCAL # Gettext wants config.guess etc. $AUTOMAKE --add-missing + +: diff --git a/t/subdir-order.sh b/t/subdir-order.sh new file mode 100644 index 000000000..0321c25c6 --- /dev/null +++ b/t/subdir-order.sh @@ -0,0 +1,147 @@ +#! /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 + +: diff --git a/t/subdir2.sh b/t/subdir-subsub.sh index 31e3c61f2..15f2f933a 100755 --- a/t/subdir2.sh +++ b/t/subdir-subsub.sh @@ -43,10 +43,17 @@ SUBDIRS = two 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 + : diff --git a/t/subdir9.sh b/t/subdir-with-slash.sh index 116e1c306..eb9f4fe65 100755 --- a/t/subdir9.sh +++ b/t/subdir-with-slash.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 SUDBIRS with /. +# Test SUDBIRS with '/' in them. . ./defs || Exit 1 |