+2003-07-24 Alexandre Duret-Lutz <adl@gnu.org>
+
+ Fix missing rebuilds during `make dist' with BSD make.
+ * automake.in (generate_makefile): Do not push Makefile.in, and
+ Makefile.am into DIST_COMMON here.
+ * lib/am/configure.am (DIST_COMMON): Do it here, and use
+ %MAKEFILE-AM% and %MAKEFILE-IN% so that items in DIST_COMMON
+ actually match the targets. Prefix `configure' with `$(srcdir)/'
+ to match the target.
+ * tests/remake4.test: New file.
+ * tests/Makefile.am (TESTS): Add remake4.test.
+ Report from Akim Demaille.
+
2003-07-23 Alexandre Duret-Lutz <adl@gnu.org>
* automake.in (handle_multilib): Register all-multi.
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-DIST_COMMON = README $(am__configure_deps) AUTHORS COPYING ChangeLog \
- INSTALL Makefile.am Makefile.in NEWS THANKS TODO aclocal.m4 \
- configure configure.in stamp-vti version.texi
subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL \
+ Makefile.am NEWS THANKS TODO aclocal.m4 configure configure.in \
+ stamp-vti version.texi
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__configure_deps = $(top_srcdir)/m4/init.m4 \
$(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 \
# $OUTPUT is encoded. If it contains a ":" then the first element
# is the real output file, and all remaining elements are input
- # files. We don't scan or otherwise deal with these input file,
+ # files. We don't scan or otherwise deal with these input files,
# other than to mark them as dependencies. See
# &scan_autoconf_files for details.
my (@secondary_inputs);
if $seen_canonical;
}
- # We still need Makefile.in here, because sometimes the `dist'
- # target doesn't re-run automake.
- if ($am_relative_dir eq $relative_dir)
- {
- # Only distribute the files if they are in the same subdir as
- # the generated makefile.
- push_dist_common ($in_file_name, $am_file_name);
- }
-
# Must do this after reading .am file.
define_variable ('subdir', $relative_dir, INTERNAL);
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-DIST_COMMON = $(dist_perllib_DATA) Makefile.am Makefile.in
subdir = lib/Automake
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__configure_deps = $(top_srcdir)/m4/init.m4 \
$(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 \
$(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 \
$(top_srcdir)/m4/runlog.m4
+DIST_COMMON = $(dist_perllib_DATA) $(srcdir)/Makefile.in Makefile.am
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
SOURCES =
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-DIST_COMMON = Makefile.am Makefile.in
subdir = lib/Automake/tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__configure_deps = $(top_srcdir)/m4/init.m4 \
$(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 \
$(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 \
$(top_srcdir)/m4/runlog.m4
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
SOURCES =
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-DIST_COMMON = $(dist_pkgvdata_DATA) $(dist_script_DATA) COPYING \
- INSTALL Makefile.am Makefile.in ansi2knr.1 ansi2knr.c compile \
- config.guess config.sub depcomp elisp-comp install-sh mdate-sh \
- missing mkinstalldirs py-compile texinfo.tex ylwrap
subdir = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__configure_deps = $(top_srcdir)/m4/init.m4 \
$(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 \
$(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 \
$(top_srcdir)/m4/runlog.m4
+DIST_COMMON = $(dist_pkgvdata_DATA) $(dist_script_DATA) \
+ $(srcdir)/Makefile.in COPYING INSTALL Makefile.am ansi2knr.1 \
+ ansi2knr.c compile config.guess config.sub depcomp elisp-comp \
+ install-sh mdate-sh missing mkinstalldirs py-compile \
+ texinfo.tex ylwrap
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
SOURCES =
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-DIST_COMMON = $(dist_am_DATA) Makefile.am Makefile.in
subdir = lib/am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__configure_deps = $(top_srcdir)/m4/init.m4 \
$(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 \
$(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 \
$(top_srcdir)/m4/runlog.m4
+DIST_COMMON = $(dist_am_DATA) $(srcdir)/Makefile.in Makefile.am
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
SOURCES =
@:
endif %?TOPDIR_P%
-
## --------------------- ##
## Building Makefile.*. ##
## --------------------- ##
cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \
esac;
+DIST_COMMON += %MAKEFILE-AM% %MAKEFILE-IN%
+
## --------------------------- ##
## config.status & configure. ##
## don't exist. This is especially important for configure, since it
## won't be created until autoconf is run -- which might be after
## automake is run.
-DIST_COMMON += configure %CONFIGURE-AC% $(am__configure_deps)
+DIST_COMMON += $(top_srcdir)/configure %CONFIGURE-AC% $(am__configure_deps)
endif %?TOPDIR_P%
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-DIST_COMMON = $(dist_m4data_DATA) Makefile.am Makefile.in
subdir = m4
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__configure_deps = $(top_srcdir)/m4/init.m4 \
$(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 \
$(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 \
$(top_srcdir)/m4/runlog.m4
+DIST_COMMON = $(dist_m4data_DATA) $(srcdir)/Makefile.in Makefile.am
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
SOURCES =
remake.test \
remake2.test \
remake3.test \
+remake4.test \
req.test \
reqd.test \
reqd2.test \
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-DIST_COMMON = README Makefile.am Makefile.in defs.in
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__configure_deps = $(top_srcdir)/m4/init.m4 \
$(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 \
$(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 \
$(top_srcdir)/m4/runlog.m4
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am defs.in
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES = defs
SOURCES =
remake.test \
remake2.test \
remake3.test \
+remake4.test \
req.test \
reqd.test \
reqd2.test \
--- /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.
+
+# Make sure Makefile.in are up to date after make dist.
+# This is expected to work even without GNU Make (the GNU Make
+# feature that isn't supported elsewhere is the rebuild of
+# Makefile dependencies during ordinary builds).
+#
+# If this fails, this is likely to be due to a dependency being
+# given two different name. For instance BSD Make does not know
+# that `Makefile' is the same as `./Makefile'
+#
+# Report from Akim Demaille.
+
+. ./defs || exit 1
+
+set -e
+
+cat >>configure.in <<'EOF'
+# Rebuild rule are ok until make dist, but not afterwards.
+if test ! -f rebuild_ok; then
+ ACLOCAL=false
+ AUTOMAKE=false
+ AUTOCONF=false
+fi
+AC_OUTPUT
+EOF
+
+: > rebuild_ok
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure
+$MAKE
+$sleep
+touch aclocal.m4
+$MAKE dist
+tar zxvf remake4-1.0.tar.gz
+cd remake4-1.0
+test ! -f rebuild_ok
+./configure
+$MAKE