[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: fix rebuild rules for make dist on NetBSD.
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: fix rebuild rules for make dist on NetBSD. |
Date: |
Thu, 24 Jul 2003 23:25:45 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
I'm checking this in on HEAD and branch-1-7.
Automake had rules for $(srcdir)/Makefile.in and
$(srcdir)/configure but was listing Makefile.in and configure in
dependencies. This confuse BSD make (even in non-VPATH builds).
Apparently many students of Akim have run across this issue
where `make dist' generates an archive with out-of-date files.
(They work on NetBSD.)
2003-07-24 Alexandre Duret-Lutz <address@hidden>
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.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1365.2.49
diff -u -r1.1365.2.49 automake.in
--- automake.in 23 Jul 2003 21:04:38 -0000 1.1365.2.49
+++ automake.in 24 Jul 2003 21:16:08 -0000
@@ -1598,7 +1598,7 @@
# $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);
@@ -1644,15 +1644,6 @@
require_conf_file ($canonical_location, FOREIGN,
'config.guess', 'config.sub')
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);
}
push (@sources, '$(SOURCES)')
Index: lib/am/configure.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/configure.am,v
retrieving revision 1.14.2.1
diff -u -r1.14.2.1 configure.am
--- lib/am/configure.am 27 Jun 2003 18:35:46 -0000 1.14.2.1
+++ lib/am/configure.am 24 Jul 2003 21:16:08 -0000
@@ -1,6 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright 2001
-## Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003 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
@@ -32,6 +31,7 @@
## .P files. Ideally we wouldn't have to do this by hand.
cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE%
$(am__depfiles_maybe)
+DIST_COMMON += %MAKEFILE-AM% %MAKEFILE-IN%
## --------------------------- ##
@@ -51,7 +51,7 @@
## 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%
+DIST_COMMON += $(srcdir)/configure %CONFIGURE-AC%
## Explicitly look in srcdir for benefit of non-GNU makes.
$(srcdir)/configure: %MAINTAINER-MODE% $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
$(CONFIGURE_DEPENDENCIES)
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.443.2.34
diff -u -r1.443.2.34 Makefile.am
--- tests/Makefile.am 23 Jul 2003 21:04:39 -0000 1.443.2.34
+++ tests/Makefile.am 24 Jul 2003 21:16:09 -0000
@@ -348,6 +348,7 @@
remake.test \
remake2.test \
remake3.test \
+remake4.test \
req.test \
reqd.test \
reqd2.test \
Index: tests/remake4.test
===================================================================
RCS file: tests/remake4.test
diff -N tests/remake4.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/remake4.test 24 Jul 2003 21:16:09 -0000
@@ -0,0 +1,61 @@
+#! /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
--
Alexandre Duret-Lutz
- FYI: fix rebuild rules for make dist on NetBSD.,
Alexandre Duret-Lutz <=