+2003-04-24 Akim Demaille <akim@epita.fr>
+ Alexandre Duret-Lutz <adl@gnu.org>
+
+ For automake PR/46:
+ * lib/am/configure.am (%MAKEFILE-IN%): If Makefile.in is rebuilt
+ because of one of configure's dependencies, run automake without
+ argument to update the whole tree at once. Depend upon
+ %CONFIGURE_DEPS%.
+ (%MAKEFILE%): If Makefile is rebuilt because config.status has
+ been updated, run config.status without arguments.
+ * automake.in (scan_autoconf_traces): Prepend $(top_srcdir)
+ before all files in @configure_deps.
+ * tests/subdir5.test: Modernize configure.in, make sure
+ maude/Makefile was actually created, and exercise %CONFIGURE_DEPS%.
+ * tests/subdir8.test: New file.
+ * tests/Makefile.am (TESTS): Add subdir8.test.
+ (XFAIL_TESTS): Replace subdir5.test by subdir8.test.
+
2003-04-23 Alexandre Duret-Lutz <adl@gnu.org>
* automake.texi (Requirements): Typo in index
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @for dep in $?; do \
+ case '$(top_srcdir)/configure.in $(ACLOCAL_M4) ' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+ exit 0;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+ @case '$?' in \
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
# m4_include's performed during Autoconf's startup.
# Obviously we don't want to distribute Autoconf's files
# so we skip absolute filenames here.
- push @configure_deps, $args[1]
+ push @configure_deps, '$(top_srcdir)/' . $args[1]
unless $here =~ m,^(?:\w:)?[\\/],;
}
}
all: all-recursive
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @for dep in $?; do \
+ case '$(top_srcdir)/configure.in $(ACLOCAL_M4) ' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+ exit 0;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Automake/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+ @case '$?' in \
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
uninstall-info-am:
dist_perllibDATA_INSTALL = $(INSTALL_DATA)
install-dist_perllibDATA: $(dist_perllib_DATA)
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @for dep in $?; do \
+ case '$(top_srcdir)/configure.in $(ACLOCAL_M4) ' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+ exit 0;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/tests/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Automake/tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+ @case '$?' in \
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
uninstall-info-am:
tags: TAGS
TAGS:
all: all-recursive
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @for dep in $?; do \
+ case '$(top_srcdir)/configure.in $(ACLOCAL_M4) ' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+ exit 0;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+ @case '$?' in \
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
uninstall-info-am:
dist_pkgvdataDATA_INSTALL = $(INSTALL_DATA)
install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @for dep in $?; do \
+ case '$(top_srcdir)/configure.in $(ACLOCAL_M4) ' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+ exit 0;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/am/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/am/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+ @case '$?' in \
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
uninstall-info-am:
dist_amDATA_INSTALL = $(INSTALL_DATA)
install-dist_amDATA: $(dist_am_DATA)
## automake - create Makefile.in from Makefile.am
-## Copyright 2001
+## Copyright (C) 2001, 2002, 2003
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## --------------------- ##
## This rule remakes the Makefile.in.
-%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
+%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %CONFIGURE_DEPS%
+## If configure.ac or one of configure's dependencies has changed, all
+## Makefile.in are to be updated; it is then more efficient to run
+## automake on all the Makefiles at once. It also allow Automake to be
+## run for newly added directories.
+ @for dep in $?; do \
+ case '$(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %CONFIGURE_DEPS%' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%'; \
+ cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%; \
+ exit 0;; \
+ esac; \
+ done; \
+## Otherwise, rebuild only this file.
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%
## This rule remakes the Makefile.
%MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status
+## If Makefile is to be updated because of config.status, then run
+## config.status without argument in order to (i) rerun all the
+## AC_CONFIG_COMMANDS including those that are not visible to
+## Automake, and (ii) to save time by running config.status all with
+## all the files, instead of once per file (iii) generate Makefiles
+## in newly added directories.
+ @case '$?' in \
+## Don't prefix $(top_builddir), because GNU make will strip it out
+## when it's `.'.
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the
## .P files. Ideally we wouldn't have to do this by hand.
- cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)
-
-
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \
+ esac;
## --------------------------- ##
## config.status & configure. ##
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @for dep in $?; do \
+ case '$(top_srcdir)/configure.in $(ACLOCAL_M4) ' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+ exit 0;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu m4/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+ @case '$?' in \
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
amversion.m4: $(top_builddir)/config.status amversion.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
uninstall-info-am:
## Process this file with automake to create Makefile.in
-XFAIL_TESTS = subdir5.test auxdir2.test cond17.test txinfo5.test
+XFAIL_TESTS = subdir8.test auxdir2.test cond17.test txinfo5.test
TESTS = \
acinclude.test \
subdir5.test \
subdir6.test \
subdir7.test \
+subdir8.test \
subdirbuiltsources.test \
subcond.test \
subcond2.test \
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-XFAIL_TESTS = subdir5.test auxdir2.test cond17.test txinfo5.test
+XFAIL_TESTS = subdir8.test auxdir2.test cond17.test txinfo5.test
TESTS = \
acinclude.test \
aclibobj.test \
subdir5.test \
subdir6.test \
subdir7.test \
+subdir8.test \
subdirbuiltsources.test \
subcond.test \
subcond2.test \
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @for dep in $?; do \
+ case '$(top_srcdir)/configure.in $(ACLOCAL_M4) ' in \
+ *$$dep*) \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+ exit 0;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+ @case '$?' in \
+ *config.status*) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
+ cd $(top_builddir) && $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
defs: $(top_builddir)/config.status defs.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
uninstall-info-am:
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# Boston, MA 02111-1307, USA.
# Test to make sure that adding a new directory works.
+# This test runs `make' from the top-level directory, subdir8.test
+# do it from a subdirectory.
# PR automake/46
# This test assumes that the `make' utility is able to start
required='GNUmake gcc'
. ./defs || exit 1
+set -e
+
cat > configure.in << 'END'
-AC_INIT(a.c)
-AM_INIT_AUTOMAKE(maude, 1.0)
+AC_INIT(maude, 1.0)
+AM_INIT_AUTOMAKE
AM_PROG_CC_C_O
AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE --include-deps --copy --add-missing
# Now add a new directory.
cat > configure.in << 'END'
-AC_INIT(a.c)
-AM_INIT_AUTOMAKE(maude, 1.0)
+AC_INIT(maude, 1.0)
+AM_INIT_AUTOMAKE
AM_PROG_CC_C_O
AC_PROG_CC
-AC_OUTPUT(Makefile maude/Makefile)
+AC_CONFIG_FILES(Makefile maude/Makefile)
+m4_include([confile.m4])
+AC_OUTPUT
END
+: > confile.m4
+
mkdir maude
cat > maude/Makefile.am << 'END'
include_HEADERS = foo.h
# We want a simple rebuild to create maude/Makefile automatically.
$MAKE
+test -f maude/Makefile
+
+# Add yet another directory
+mkdir maude2
+echo 'AC_CONFIG_FILES([maude2/Makefile])AC_SUBST([GREPME])' > confile.m4
+: > maude2/Makefile.am
+echo 'SUBDIRS += maude2' >> Makefile.am
+
+# We want a simple rebuild to create maude2/Makefile and update
+# all other Makefiles automatically.
+$MAKE
+grep GREPME Makefile
+grep GREPME maude/Makefile
+grep GREPME maude2/Makefile
--- /dev/null
+#! /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.
+
+# Test to make sure that adding a new directory works, even from
+# subdirectories. (subdir5.test makes sure it works when make
+# is run from the top-level directory.)
+# PR automake/46
+
+# This test assumes that the `make' utility is able to start
+# over and reload Makefiles which have been remade (a non-POSIX feature).
+required='GNUmake gcc'
+. ./defs || exit 1
+
+set -e
+
+echo 'AC_CONFIG_FILES([sub/Makefile])' >confiles.m4
+
+cat >> configure.in << 'END'
+AM_PROG_CC_C_O
+AC_PROG_CC
+m4_include([confiles.m4])
+AC_OUTPUT
+END
+
+echo 'SUBDIRS = sub' > Makefile.am
+
+mkdir sub
+
+cat > sub/Makefile.am << 'END'
+bin_PROGRAMS = wish
+wish_SOURCES = a.c
+END
+
+cat > sub/a.c << 'END'
+#include <stdio.h>
+int main ()
+{
+ printf ("hi liver!\n");
+ return 0;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+./configure
+$MAKE
+
+# Now add a new directory.
+
+mkdir sub/maude
+cat > sub/maude/Makefile.am << 'END'
+include_HEADERS = foo.h
+END
+
+: > sub/maude/foo.h
+
+echo 'SUBDIRS = maude' >> sub/Makefile.am
+
+mkdir maude
+: > maude/Makefile.am
+
+# Update confile.m4 *after* updating sub/Makefile.am.
+# (subdir5.test do it in the other way: it updates configure.in
+# before Makefile.am)
+echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' >> confiles.m4
+
+# We want a simple rebuild from sub/ to create sub/maude/Makefile
+# and maude/Makefile automatically.
+cd sub
+$MAKE
+cd ..
+test -f maude/Makefile
+test -f sub/maude/Makefile