[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "files left in build directory after distclean"
From: |
Alexandre Duret-Lutz |
Subject: |
Re: "files left in build directory after distclean" |
Date: |
Mon, 29 Sep 2003 22:20:40 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
>>> "Braden" == Braden McDaniel <address@hidden> writes:
Braden> When running "make distcheck", I get:
Braden> ERROR: files left in build directory after distclean:
Braden> ./lib/antlr/GNUmakefile
Braden> ./lib/antlr/antlr/GNUmakefile
Braden> ./lib/antlr/src/GNUmakefile
Braden> What's going on here? Aren't these files that automake should "know"
Braden> about and deal with appropriately? I'm using automake 1.7.7.
Yes, Automake should know about them. I think cleaning was the
last place where Automake was assuming that make files are
called Makefile.
I'm installing this on HEAD, so that will be in Automake 1.8. By
the meantime you'll have to supply DISTCLEANFILES variables
to help Automake.
2003-09-29 Alexandre Duret-Lutz <address@hidden>
* automake.in (handle_clean): Take $makefile as argument, and
define %MAKEFILE% while processing clean.am.
(generate_makefile): Pass $makefile to handle_clean.
* lib/am/clean.am (distclean, maintainer-clean): Erase
%MAKEFILE%, not Makefile.
* tests/gnumake.test: New file.
* tests/Makefile.am (TESTS): Add gnumake.test.
Report from Braden N. McDaniel.
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.229
diff -u -r1.229 NEWS
--- NEWS 24 Sep 2003 22:02:06 -0000 1.229
+++ NEWS 29 Sep 2003 20:17:45 -0000
@@ -166,6 +166,8 @@
- The --no-force option now correctly checks the Makefile.in's
dependencies before deciding not to update it.
+ - Do not assume that make files are called Makefile in cleaning rules.
+
* Miscellaneous
- The Automake manual is now distributed under the terms of the GNU FDL.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1505
diff -u -r1.1505 automake.in
--- automake.in 23 Sep 2003 08:14:34 -0000 1.1505
+++ automake.in 29 Sep 2003 20:17:50 -0000
@@ -3879,9 +3879,13 @@
. "\n");
}
+# handle_clean ($MAKEFILE)
+# ------------------------
# Handle all 'clean' targets.
-sub handle_clean
+sub handle_clean ($)
{
+ my ($makefile) = @_;
+
# Clean the files listed in user variables if they exist.
$clean_files{'$(MOSTLYCLEANFILES)'} = MOSTLY_CLEAN
if var ('MOSTLYCLEANFILES');
@@ -3922,7 +3926,9 @@
MOSTLYCLEAN_RMS => join ('', @{$rms{&MOSTLY_CLEAN}}),
CLEAN_RMS => join ('', @{$rms{&CLEAN}}),
DISTCLEAN_RMS => join ('', @{$rms{&DIST_CLEAN}}),
- MAINTAINER_CLEAN_RMS => join ('', @{$rms{&MAINTAINER_CLEAN}}));
+ MAINTAINER_CLEAN_RMS => join ('', @{$rms{&MAINTAINER_CLEAN}}),
+ MAKEFILE => basename $makefile,
+ );
}
@@ -6638,7 +6644,7 @@
}
handle_install;
- handle_clean;
+ handle_clean ($makefile);
handle_factored_dependencies;
# Comes last, because all the above procedures may have
Index: lib/am/clean.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/clean.am,v
retrieving revision 1.44
diff -u -r1.44 clean.am
--- lib/am/clean.am 23 Jul 2003 21:04:16 -0000 1.44
+++ lib/am/clean.am 29 Sep 2003 20:17:51 -0000
@@ -41,7 +41,7 @@
## If you change distclean here, you probably also want to change
## maintainer-clean below.
distclean:
- -rm -f Makefile
+ -rm -f %MAKEFILE%
maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean-generic:
@@ -53,7 +53,7 @@
## See comment for distclean.
maintainer-clean:
- -rm -f Makefile
+ -rm -f %MAKEFILE%
.PHONY: clean mostlyclean distclean maintainer-clean \
clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.517
diff -u -r1.517 Makefile.am
--- tests/Makefile.am 23 Sep 2003 08:14:35 -0000 1.517
+++ tests/Makefile.am 29 Sep 2003 20:17:51 -0000
@@ -216,6 +216,7 @@
getopt.test \
gettext.test \
gettext2.test \
+gnumake.test \
gnuwarn.test \
gnuwarn2.test \
gnits.test \
Index: tests/gnumake.test
===================================================================
RCS file: tests/gnumake.test
diff -N tests/gnumake.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/gnumake.test 29 Sep 2003 20:17:51 -0000
@@ -0,0 +1,49 @@
+#! /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.
+
+# Automake should not assume that makefiles are called Makefile.
+# Report from Braden McDaniel.
+
+required=GNUmake
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/GNUmakefile])
+AC_OUTPUT
+END
+
+mkdir sub
+
+echo SUBDIRS = sub > Makefile.am
+
+cat > sub/GNUmakefile.am <<'EOF'
+# In this project, the Makefile is an installed data file.
+dist_data_DATA = Makefile
+EOF
+
+echo 'this should not cause any problem' > sub/Makefile
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE distcheck
--
Alexandre Duret-Lutz