automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-74-g


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-74-g9339323
Date: Sun, 15 Nov 2009 19:34:28 +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=9339323e4bda63b091055ef8dd3ab9d6f34250a9

The branch, master has been updated
       via  9339323e4bda63b091055ef8dd3ab9d6f34250a9 (commit)
       via  5ce2fb20bbc9297bd7233ba924aa350b7b388be8 (commit)
       via  da66c40c6a67bef52cf4d22fd860c538cdbb61f4 (commit)
       via  ef7869eb56c9ab716dd55788d0efb32a621f32d0 (commit)
       via  b0b4caccba63b9b7b5d5516f2b23e66ac5215847 (commit)
       via  acfd42286515cc0d03df9cf947e7488891dfc2e3 (commit)
       via  9974fc21eb60f211887c7a86e03c6ffab5e8727b (commit)
       via  6893788d4797796817e7f90a6479fecd1ddebcac (commit)
       via  798a232eb5161d88bc4220fff6463f9c935bc587 (commit)
       via  e58e5b453ad7b3cbda6c6f0968a63c001203c082 (commit)
      from  2111d1d663e6a0cc70ae7fa1f95f638fb7bf0c3e (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 9339323e4bda63b091055ef8dd3ab9d6f34250a9
Merge: 798a232eb5161d88bc4220fff6463f9c935bc587 
5ce2fb20bbc9297bd7233ba924aa350b7b388be8
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Nov 15 20:32:29 2009 +0100

    Merge branch 'perl-coverage'
    
    * perl-coverage:
      Coverage for corner cases in derive_suffix.
      Coverage for user-provided _LINK variables.
      Coverage: warn about substitutions that need EXTRA_PRIMARY.
      Coverage: warn about configure substitution in EXTRA_PRIMARY.
      Coverage for syntax errors with conditionals in included fragments.
      Coverage: diagnose variables with forbidden dist_ prefix.
      Coverage for conditional `else' and `endif' arguments.

commit 5ce2fb20bbc9297bd7233ba924aa350b7b388be8
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Nov 14 21:58:34 2009 +0100

    Coverage for corner cases in derive_suffix.
    
    Ensure unrelatex SUFFIXES entries and unrelated inference rules
    are ignored silently.
    
    * tests/ext3.test: New test.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit da66c40c6a67bef52cf4d22fd860c538cdbb61f4
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Nov 14 21:58:01 2009 +0100

    Coverage for user-provided _LINK variables.
    
    * tests/link_override.test: New test.
    * tests/Makefile.am: Adjust.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit ef7869eb56c9ab716dd55788d0efb32a621f32d0
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Nov 14 21:57:37 2009 +0100

    Coverage: warn about substitutions that need EXTRA_PRIMARY.
    
    * tests/extra9.test: New test.
    * tests/Makefile.am: Adjust.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit b0b4caccba63b9b7b5d5516f2b23e66ac5215847
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Nov 14 21:57:11 2009 +0100

    Coverage: warn about configure substitution in EXTRA_PRIMARY.
    
    * tests/subst5.test: New test.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit acfd42286515cc0d03df9cf947e7488891dfc2e3
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Nov 14 21:56:49 2009 +0100

    Coverage for syntax errors with conditionals in included fragments.
    
    * tests/condinc2.test: Amend test.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 9974fc21eb60f211887c7a86e03c6ffab5e8727b
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Nov 14 21:56:15 2009 +0100

    Coverage: diagnose variables with forbidden dist_ prefix.
    
    * tests/candist.test: New test.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 6893788d4797796817e7f90a6479fecd1ddebcac
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Nov 14 21:52:34 2009 +0100

    Coverage for conditional `else' and `endif' arguments.
    
    * tests/cond46.test: New test.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 798a232eb5161d88bc4220fff6463f9c935bc587
Merge: 2111d1d663e6a0cc70ae7fa1f95f638fb7bf0c3e 
e58e5b453ad7b3cbda6c6f0968a63c001203c082
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Nov 1 14:39:21 2009 +0100

    Merge branch 'maint'

commit e58e5b453ad7b3cbda6c6f0968a63c001203c082
Author: Jim Meyering <address@hidden>
Date:   Sat Oct 31 17:47:58 2009 +0100

    Don't let an envvar setting of "$fail" cause build failure.
    
    Without this change, in a project using an automake-generated
    Makefile, "make fail=anything" would fail inappropriately,
    due to the `test -z "$$fail"' at the end of this emitted rule:
    
    * lib/am/subdirs.am ($(RECURSIVE_TARGETS)): Initialize "fail=" to keep
    an envvar setting of that variable from causing unwarranted failure.
    ($(RECURSIVE_CLEAN_TARGETS)): Likewise.
    * tests/subdir10.test: New test.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                             |   44 +++++++++++++
 Makefile.in                           |    4 +-
 lib/Automake/Makefile.in              |    4 +-
 lib/Makefile.in                       |    4 +-
 lib/am/subdirs.am                     |    4 +-
 tests/Makefile.am                     |    7 ++
 tests/Makefile.in                     |    7 ++
 tests/{cscope2.test => candist.test}  |   26 ++++----
 tests/cond46.test                     |  110 +++++++++++++++++++++++++++++++++
 tests/condinc2.test                   |   23 +++++++-
 tests/ext3.test                       |   41 ++++++++++++
 tests/{extra8.test => extra9.test}    |   24 ++++---
 tests/link_override.test              |   46 ++++++++++++++
 tests/{cscope2.test => subdir10.test} |   17 +++--
 tests/subst5.test                     |   42 +++++++++++++
 15 files changed, 363 insertions(+), 40 deletions(-)
 copy tests/{cscope2.test => candist.test} (58%)
 create mode 100755 tests/cond46.test
 create mode 100755 tests/ext3.test
 copy tests/{extra8.test => extra9.test} (62%)
 create mode 100755 tests/link_override.test
 copy tests/{cscope2.test => subdir10.test} (79%)
 create mode 100755 tests/subst5.test

diff --git a/ChangeLog b/ChangeLog
index 2fe0566..d48efd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,47 @@
+2009-11-14  Ralf Wildenhues  <address@hidden>
+
+       Coverage for corner cases in derive_suffix.
+       Ensure unrelatex SUFFIXES entries and unrelated inference rules
+       are ignored silently.
+       * tests/ext3.test: New test.
+       * tests/Makefile.am: Update.
+
+       Coverage for user-provided _LINK variables.
+       * tests/link_override.test: New test.
+       * tests/Makefile.am: Adjust.
+
+       Coverage: warn about substitutions that need EXTRA_PRIMARY.
+       * tests/extra9.test: New test.
+       * tests/Makefile.am: Adjust.
+
+       Coverage: warn about configure substitution in EXTRA_PRIMARY.
+       * tests/subst5.test: New test.
+       * tests/Makefile.am: Update.
+
+       Coverage for syntax errors with conditionals in included fragments.
+       * tests/condinc2.test: Amend test.
+
+       Coverage: diagnose variables with forbidden dist_ prefix.
+       * tests/candist.test: New test.
+       * tests/Makefile.am: Update.
+
+       Coverage for conditional `else' and `endif' arguments.
+       * tests/cond46.test: New test.
+       * tests/Makefile.am: Update.
+
+2009-10-31  Jim Meyering  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Don't let an envvar setting of "$fail" cause build failure.
+       Without this change, in a project using an automake-generated
+       Makefile, "make fail=anything" would fail inappropriately,
+       due to the `test -z "$$fail"' at the end of this emitted rule:
+       * lib/am/subdirs.am ($(RECURSIVE_TARGETS)): Initialize "fail=" to keep
+       an envvar setting of that variable from causing unwarranted failure.
+       ($(RECURSIVE_CLEAN_TARGETS)): Likewise.
+       * tests/subdir10.test: New test.
+       * tests/Makefile.am: Update.
+
 2009-10-18  Ralf Wildenhues  <address@hidden>
 
        Simplify Variable::_check_ambiguous_condition.
diff --git a/Makefile.in b/Makefile.in
index 100b192..606c9ac 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -393,7 +393,7 @@ uninstall-binSCRIPTS:
 #     (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):
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
@@ -418,7 +418,7 @@ $(RECURSIVE_TARGETS):
        fi; test -z "$$fail"
 
 $(RECURSIVE_CLEAN_TARGETS):
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 8f4ec8a..225680d 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -334,7 +334,7 @@ uninstall-nodist_perllibDATA:
 #     (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):
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
@@ -359,7 +359,7 @@ $(RECURSIVE_TARGETS):
        fi; test -z "$$fail"
 
 $(RECURSIVE_CLEAN_TARGETS):
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 1d5d4cd..3a7338a 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -307,7 +307,7 @@ uninstall-dist_scriptDATA:
 #     (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):
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
@@ -332,7 +332,7 @@ $(RECURSIVE_TARGETS):
        fi; test -z "$$fail"
 
 $(RECURSIVE_CLEAN_TARGETS):
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am
index b86e674..9c01a8c 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.am
@@ -36,7 +36,7 @@ AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
 $(RECURSIVE_TARGETS):
 ## Using $failcom allows "-k" to keep its natural meaning when running a
 ## recursive rule.
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
@@ -75,7 +75,7 @@ maintainer-clean: maintainer-clean-recursive
 $(RECURSIVE_CLEAN_TARGETS):
 ## Using $failcom allows "-k" to keep its natural meaning when running a
 ## recursive rule.
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 200f1a5..8936ff1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -95,6 +95,7 @@ badline.test \
 badprog.test \
 block.test \
 bsource.test \
+candist.test \
 canon.test \
 canon2.test \
 canon3.test \
@@ -187,6 +188,7 @@ cond42.test \
 cond43.test \
 cond44.test \
 cond45.test \
+cond46.test \
 condd.test \
 condhook.test \
 condinc.test \
@@ -283,6 +285,7 @@ exeext4.test \
 exsource.test \
 ext.test \
 ext2.test \
+ext3.test \
 extra.test \
 extra3.test \
 extra4.test \
@@ -290,6 +293,7 @@ extra5.test \
 extra6.test \
 extra7.test \
 extra8.test \
+extra9.test \
 f90only.test \
 flavor.test \
 flibs.test \
@@ -407,6 +411,7 @@ link_fc.test \
 link_fccxx.test \
 link_fcxx.test \
 link_f_only.test \
+link_override.test \
 lisp2.test \
 lisp3.test \
 lisp4.test \
@@ -621,6 +626,7 @@ subdir6.test \
 subdir7.test \
 subdir8.test \
 subdir9.test \
+subdir10.test \
 subdirbuiltsources.test \
 subcond.test \
 subcond2.test \
@@ -644,6 +650,7 @@ subst.test \
 subst2.test \
 subst3.test \
 subst4.test \
+subst5.test \
 substref.test \
 substre2.test \
 substtarg.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 8a3eff2..248493b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -336,6 +336,7 @@ badline.test \
 badprog.test \
 block.test \
 bsource.test \
+candist.test \
 canon.test \
 canon2.test \
 canon3.test \
@@ -428,6 +429,7 @@ cond42.test \
 cond43.test \
 cond44.test \
 cond45.test \
+cond46.test \
 condd.test \
 condhook.test \
 condinc.test \
@@ -524,6 +526,7 @@ exeext4.test \
 exsource.test \
 ext.test \
 ext2.test \
+ext3.test \
 extra.test \
 extra3.test \
 extra4.test \
@@ -531,6 +534,7 @@ extra5.test \
 extra6.test \
 extra7.test \
 extra8.test \
+extra9.test \
 f90only.test \
 flavor.test \
 flibs.test \
@@ -648,6 +652,7 @@ link_fc.test \
 link_fccxx.test \
 link_fcxx.test \
 link_f_only.test \
+link_override.test \
 lisp2.test \
 lisp3.test \
 lisp4.test \
@@ -862,6 +867,7 @@ subdir6.test \
 subdir7.test \
 subdir8.test \
 subdir9.test \
+subdir10.test \
 subdirbuiltsources.test \
 subcond.test \
 subcond2.test \
@@ -885,6 +891,7 @@ subst.test \
 subst2.test \
 subst3.test \
 subst4.test \
+subst5.test \
 substref.test \
 substre2.test \
 substtarg.test \
diff --git a/tests/cscope2.test b/tests/candist.test
similarity index 58%
copy from tests/cscope2.test
copy to tests/candist.test
index 106b801..0a859dd 100755
--- a/tests/cscope2.test
+++ b/tests/candist.test
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Copyright (C) 2009  Free Software Foundation, Inc.
 #
-# This program is free software; you can redistribute it and/or modify
+# 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.
+# the Free Software Foundation; either version 3 of the License, 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
@@ -14,23 +14,21 @@
 # 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 `cscope' target should not fail if there are no sources.
+# Test to make sure things that cannot be dist_'ed are diagnosed.
 
-required=
 . ./defs || Exit 1
 
 set -e
 
-cat >> configure.in << 'END'
-AC_OUTPUT
+echo AC_OUTPUT >>configure.in
+
+cat > Makefile.am << 'END'
+dist_bin_PROGRAMS = foo
+dist_lib_LIBRARIES = libfoo.a
 END
-: >Makefile.am
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-$MAKE cscope
+AUTOMAKE_fails
+test 2 -eq `grep -c 'dist.*forbidden' stderr`
 
-:
+Exit 0
diff --git a/tests/cond46.test b/tests/cond46.test
new file mode 100755
index 0000000..73b6e94
--- /dev/null
+++ b/tests/cond46.test
@@ -0,0 +1,110 @@
+#! /bin/sh
+# Copyright (C) 2009 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 3 of the License, 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/>.
+
+# Ensure the right condition is listed after `else' and `endif'.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([USE_A],[test x = y])
+AM_CONDITIONAL([USE_B],[test x = z])
+AC_OUTPUT
+END
+
+$ACLOCAL
+
+cat > Makefile.am << 'END'
+if USE_A
+endif !USE_A
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+endif USE_B
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else
+endif USE_A
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else
+endif !USE_A
+END
+
+$AUTOMAKE
+
+cat > Makefile.am << 'END'
+if USE_A
+if USE_B
+else
+endif !USE_A
+endif
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else USE_A
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else USE_B
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+if USE_B
+else USE_A
+endif
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else !USE_A
+endif
+END
+
+$AUTOMAKE
+
+Exit 0
diff --git a/tests/condinc2.test b/tests/condinc2.test
index 088fb55..69eff59 100755
--- a/tests/condinc2.test
+++ b/tests/condinc2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2009  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
@@ -39,3 +40,23 @@ END
 $ACLOCAL
 AUTOMAKE_fails
 grep 'adjunct:3: too many conditionals closed' stderr
+
+cat > adjunct << 'END'
+if TOBE
+target: dependency
+       rule
+END
+
+AUTOMAKE_fails
+grep 'unterminated conditionals' stderr
+
+cat > adjunct << 'END'
+if TOBE
+target: dependency
+       rule
+endif
+END
+
+$AUTOMAKE
+
+Exit 0
diff --git a/tests/ext3.test b/tests/ext3.test
new file mode 100755
index 0000000..0a691c5
--- /dev/null
+++ b/tests/ext3.test
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2009 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 3 of the License, 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/>.
+
+# Cover corner cases of derive_suffix wrt. file extensions:
+# - extension declared with SUFFIXES but with no suffix rule for it
+# - extension with a suffix rule but none that leads us to $(OBJEXT)
+# In both cases, we don't try to create a rule; but we shouldn't
+# fail either, because magic might be happening behind our back.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = foo.goo
+SUFFIXES = .goo
+bar_SOURCES = bar.woo
+.woo.zoo: ; making a zoo $@ from a woo $<
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+Exit 0
diff --git a/tests/extra8.test b/tests/extra9.test
similarity index 62%
copy from tests/extra8.test
copy to tests/extra9.test
index eb9f9a1..fefd385 100755
--- a/tests/extra8.test
+++ b/tests/extra9.test
@@ -5,8 +5,8 @@
 #
 # GNU Automake 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.
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
 # GNU Automake is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,9 +18,9 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Ensure defining bin_PROGRAMS in terms of EXTRA_PROGRAMS works,
-# and that referring to the same program with inconsistent addition
-# of $(EXEEXT) works, too.
+# Ensure we warn about substitutions in bin_PROGRAMS if EXTRA_PROGRAMS
+# are missing; but only if the former is not AC_SUBSTed itself
+# (lib_LIBRARIES is in the same boat here).
 
 . ./defs || Exit 1
 
@@ -28,15 +28,19 @@ set -e
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AC_PROG_RANLIB
+AC_SUBST([lib_LIBRARIES])
+AC_SUBST([bins])
 AC_OUTPUT
 END
+
 cat >Makefile.am <<'END'
-EXTRA_PROGRAMS = foo bar
-bin_PROGRAMS = $(EXTRA_PROGRAMS) baz
-noinst_PROGRAMS = baz$(EXEEXT)
+bin_PROGRAMS = @bins@
 END
 
 $ACLOCAL
-$AUTOMAKE
+AUTOMAKE_fails
+grep 'bin_PROGRAMS.*contains configure substitution' stderr
+grep 'lib_LIBRARIES.*contains configure substitution' stderr && Exit 1
 
-:
+Exit 0
diff --git a/tests/link_override.test b/tests/link_override.test
new file mode 100755
index 0000000..41788a1
--- /dev/null
+++ b/tests/link_override.test
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Copyright (C) 2009 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 3 of the License, 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 _LINK variables are detected and used as documented.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz boo
+foo_LINK = $(LINK)
+bar_LINK = $(LINK)
+bar_LDFLAGS = $(AM_LDFLAGS)
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+# We should use foo_LINK not LINK.
+grep '.\$(foo_LINK)' Makefile.in
+grep '.\$(LINK).*foo' Makefile.in && Exit 1
+
+# We should not override the user definition of bar_LINK.
+# IOW, bar_LDFLAGS is useless unless bar_LINK refers to it.
+grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && Exit 1
+grep '.\$(bar_LINK).*bar' Makefile.in
+
+Exit 0
diff --git a/tests/cscope2.test b/tests/subdir10.test
similarity index 79%
copy from tests/cscope2.test
copy to tests/subdir10.test
index 106b801..c71216b 100755
--- a/tests/cscope2.test
+++ b/tests/subdir10.test
@@ -14,23 +14,26 @@
 # 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 `cscope' target should not fail if there are no sources.
+# SUDBIRS with $fail set in the environment.
 
-required=
 . ./defs || Exit 1
 
 set -e
 
-cat >> configure.in << 'END'
+mkdir sub
+
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
-: >Makefile.am
+
+echo SUBDIRS = sub >Makefile.am
+: > sub/Makefile.am
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-
 ./configure
-$MAKE cscope
+env fail=1 $MAKE all clean
 
-:
+Exit 0
diff --git a/tests/subst5.test b/tests/subst5.test
new file mode 100755
index 0000000..7ffa1ad
--- /dev/null
+++ b/tests/subst5.test
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2009 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 3 of the License, 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/>.
+
+# Complain about configure substitutions in EXTRA_PRIMARY variables.
+# Rationale: we need to know the literal values of, say, PROGRAMS.
+# Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS
+# needs to list possible values of that substitution, literally.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_SUBST([substed1])
+AC_SUBST([substed2])
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = @substed1@
+EXTRA_PROGRAMS = @substed2@
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bin_PROGRAMS.*contains configure substitution' stderr && Exit 1
+grep 'EXTRA_PROGRAMS.*contains configure substitution' stderr
+
+Exit 0


hooks/post-receive
-- 
GNU Automake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]