From 9b10e230aa5a68eb3e5e82ba40243fdaab918076 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 11 Aug 1996 18:13:35 +0000 Subject: [PATCH] Remove generated files at clean time --- ChangeLog | 6 ++++++ Makefile.am | 2 -- NEWS | 1 + THANKS | 1 + automake.in | 5 +++++ clean.am | 1 + lib/am/Makefile.am | 2 -- lib/am/clean.am | 1 + 8 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b57e862b..9d74c950 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ Sun Aug 11 00:20:16 1996 Tom Tromey + * Makefile.am (CLEANFILES): Removed. + + * automake.in (handle_configure): Define CONFIG_CLEAN_FILES. + + * clean.am (clean-generic): Remove $(CONFIG_CLEAN_FILES). + * compile-vars.am (CC, CFLAGS, COMPILE, LINK): Removed. * automake.in (handle_yacc_lex_cxx): Require ylwrap in diff --git a/Makefile.am b/Makefile.am index 3231fb43..7bfaa1e2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,8 +24,6 @@ ansi2knr.1 aclocal.m4 lisp.am lisp-clean.am pkgdata_SCRIPTS = config.guess config.sub install-sh interlock mdate-sh \ mkinstalldirs elisp-comp ylwrap -CLEANFILES = automake aclocal - # The following requires a fixed version of the Emacs 19.30 etags. ETAGS_ARGS = automake.in aclocal.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi diff --git a/NEWS b/NEWS index ccc4c608..32ebed30 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ New in 1.1b: * Now uses `AM_' macro names everywhere * ansi2knr option can have directory prefix (eg `../lib/ansi2knr') * Better C++, yacc, lex support +* Random files listed in AC_OUTPUT now removed by "make clean" New in 1.0: * Bug fixes diff --git a/THANKS b/THANKS index 77ad91b3..888c4c5f 100644 --- a/THANKS +++ b/THANKS @@ -16,6 +16,7 @@ Jason Molenda Jerome Santini Jim Meyering Joerg-Martin Schwarz +Josh MacDonald Joshua Cowan Karl Berry Mark Galassi diff --git a/automake.in b/automake.in index 27b245d2..10101e83 100755 --- a/automake.in +++ b/automake.in @@ -1834,6 +1834,7 @@ sub handle_configure # Now look for other files in this directory which must be remade # by config.status, and generate rules for them. + local (@actual_other_files) = (); local ($file, $local, $input); foreach $file (@other_input_files) { @@ -1864,10 +1865,14 @@ sub handle_configure . ($relative_dir eq '.' ? '' : '$(subdir)/') . '$@ CONFIG_HEADERS= ./config.status' . "\n"); + push (@actual_other_files, $local); &require_file_with_conf_line ($ac_output_line, $FOREIGN, $input); } + + # These files get removed by "make clean". + @pretty_print ('CONFIG_CLEAN_FILES = ', '', @actual_other_files); } # Handle C headers. diff --git a/clean.am b/clean.am index f716d28e..79c310a1 100644 --- a/clean.am +++ b/clean.am @@ -24,6 +24,7 @@ mostlyclean-generic: clean-generic: test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) distclean-generic: rm -f Makefile $(DISTCLEANFILES) diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 3231fb43..7bfaa1e2 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -24,8 +24,6 @@ ansi2knr.1 aclocal.m4 lisp.am lisp-clean.am pkgdata_SCRIPTS = config.guess config.sub install-sh interlock mdate-sh \ mkinstalldirs elisp-comp ylwrap -CLEANFILES = automake aclocal - # The following requires a fixed version of the Emacs 19.30 etags. ETAGS_ARGS = automake.in aclocal.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi diff --git a/lib/am/clean.am b/lib/am/clean.am index f716d28e..79c310a1 100644 --- a/lib/am/clean.am +++ b/lib/am/clean.am @@ -24,6 +24,7 @@ mostlyclean-generic: clean-generic: test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) distclean-generic: rm -f Makefile $(DISTCLEANFILES) -- 2.43.5