* lib/am/install.am (install, install-exec, install-data, uninstall):
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 17 May 2003 11:31:57 +0000 (11:31 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 17 May 2003 11:31:57 +0000 (11:31 +0000)
Declare conditionally using a if/else/endif block instead of
using ?SUBDIRS?-style conditions.  The latter fail when
%maybe_BUILT_SOURCES% is replaced by several lines.
This fixes a bug introduced on 2003-04-06.
* tests/bsource.test: New file.
* tests/Makefile.am (TESTS): Add bsource.test.
Reported by Bruno Haible.

ChangeLog
lib/Automake/tests/Makefile.in
lib/am/Makefile.in
lib/am/install.am
m4/Makefile.in
stamp-vti
tests/Makefile.am
tests/Makefile.in
tests/bsource.test [new file with mode: 0755]
version.texi

index 9b1a176..5a26b93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-05-17  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * lib/am/install.am (install, install-exec, install-data, uninstall):
+       Declare conditionally using a if/else/endif block instead of
+       using ?SUBDIRS?-style conditions.  The latter fail when
+       %maybe_BUILT_SOURCES% is replaced by several lines.
+       This fixes a bug introduced on 2003-04-06.
+       * tests/bsource.test: New file.
+       * tests/Makefile.am (TESTS): Add bsource.test.
+       Reported by Bruno Haible.
+
 2003-05-11  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * automake.texi (renamed objects): New node.
index 1a19815..0fcfa07 100644 (file)
@@ -265,7 +265,6 @@ check: check-am
 all-am: Makefile
 
 installdirs:
-
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
index 5fa673e..dec4947 100644 (file)
@@ -216,7 +216,6 @@ all-am: Makefile $(DATA)
 
 installdirs:
        $(mkinstalldirs) $(DESTDIR)$(amdir)
-
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
index 7216af3..e178c2a 100644 (file)
 ## ----------------- ##
 
 .PHONY: install install-exec install-data uninstall
-
-?SUBDIRS?.PHONY: install-recursive install-exec-recursive install-data-recursive uninstall-recursive
-?SUBDIRS?install:%maybe_BUILT_SOURCES% install-recursive
-?SUBDIRS?install-exec: install-exec-recursive
-?SUBDIRS?install-data: install-data-recursive
-?SUBDIRS?uninstall: uninstall-recursive
-
 .PHONY: install-exec-am install-data-am uninstall-am
-?!SUBDIRS?install:%maybe_BUILT_SOURCES% install-am
-?!SUBDIRS?install-exec: install-exec-am
-?!SUBDIRS?install-data: install-data-am
-?!SUBDIRS?uninstall: uninstall-am
+
+if %?SUBDIRS%
+.PHONY: install-recursive install-exec-recursive install-data-recursive uninstall-recursive
+install:%maybe_BUILT_SOURCES% install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+else !%?SUBDIRS%
+install:%maybe_BUILT_SOURCES% install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+endif !%?SUBDIRS%
 
 .PHONY: install-am
 install-am: all-am
index 9d9e0b9..49459c6 100644 (file)
@@ -264,7 +264,6 @@ all-am: Makefile $(DATA)
 
 installdirs:
        $(mkinstalldirs) $(DESTDIR)$(m4datadir) $(DESTDIR)$(m4datadir)
-
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
index 193293f..b1db8c4 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 11 May 2003
+@set UPDATED 17 May 2003
 @set UPDATED-MONTH May 2003
 @set EDITION 1.7a
 @set VERSION 1.7a
index 74ed8d9..4ce2e5c 100644 (file)
@@ -45,6 +45,7 @@ backsl4.test \
 badline.test \
 badprog.test \
 block.test \
+bsource.test \
 canon.test \
 canon2.test \
 canon3.test \
index 5600352..934fbb0 100644 (file)
@@ -156,6 +156,7 @@ backsl4.test \
 badline.test \
 badprog.test \
 block.test \
+bsource.test \
 canon.test \
 canon2.test \
 canon3.test \
@@ -733,7 +734,6 @@ check: check-am
 all-am: Makefile
 
 installdirs:
-
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
diff --git a/tests/bsource.test b/tests/bsource.test
new file mode 100755 (executable)
index 0000000..282ea57
--- /dev/null
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# 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.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Regression test for install-recursive appearing in a non recursive Makefile.
+# Report from Bruno Haible.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+noinst_SCRIPTS = hostname
+include_HEADERS = gettext-po.h
+BUILT_SOURCES = po-hash-gen.c
+END
+
+$ACLOCAL
+$AUTOMAKE
+grep 'install-recursive' Makefile.in && exit 1
+:
index 193293f..b1db8c4 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 11 May 2003
+@set UPDATED 17 May 2003
 @set UPDATED-MONTH May 2003
 @set EDITION 1.7a
 @set VERSION 1.7a