From ca572e02821856cf2e39c38cfaa37d1f06e41cf8 Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Thu, 15 Sep 1994 00:58:48 +0000 Subject: [PATCH] put back Makefile comment --- Makefile.in | 5 ++--- NEWS | 6 +++--- acgeneral.m4 | 11 +++++++++-- autoconf.texi | 9 ++++++--- doc/Makefile.in | 5 ++--- doc/autoconf.texi | 9 ++++++--- lib/autoconf/general.m4 | 11 +++++++++-- testsuite/Makefile.in | 1 - 8 files changed, 37 insertions(+), 20 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1016795a..69a9c6e0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,3 @@ -# @configure_input@ # Makefile for Autoconf. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. @@ -131,8 +130,8 @@ installdirs: install: all $(M4FILES) acconfig.h installdirs install-info @case `$(M4) --help < /dev/null 2>&1` in \ *reload-state*) echo installing frozen m4 files; \ - $(M4) -F $(acdatadir)/autoconf.m4f autoconf.m4 ; \ - $(M4) -F $(acdatadir)/autoheader.m4f autoheader.m4 ;; \ + $(M4) -F $(acdatadir)/autoconf.m4f -I${srcdir} ${srcdir}/autoconf.m4 ; \ + $(M4) -F $(acdatadir)/autoheader.m4f -I${srcdir} ${srcdir}/autoheader.m4 ;; \ *traditional*) ;; \ *) echo Error: Autoconf requires GNU m4 1.1 or later; exit 1 ;; \ esac diff --git a/NEWS b/NEWS index a0c55093..0c43e60d 100644 --- a/NEWS +++ b/NEWS @@ -26,9 +26,9 @@ Major changes in release 2.0: ** Changed macros: * Many macros renamed systematically, but old names are accepted for backward compatibility. -* AC_OUTPUT adds the "automatically generated" comment only where it - find @configure_input@ in an input file, to support files with - various comment syntaxes. +* AC_OUTPUT adds the "automatically generated" comment to + non-Makefiles where it finds @configure_input@ in an input file, to + support files with various comment syntaxes. * AC_OUTPUT does not replace "prefix" and "exec_prefix" in generated files when they are not enclosed in @ signs. * AC_OUTPUT allows the optional environment variable CONFIG_STATUS to diff --git a/acgeneral.m4 b/acgeneral.m4 index 805085e5..ee5da544 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1455,7 +1455,9 @@ dnl The big finish. dnl Produce config.status, config.h, and links, and configure subdirs. dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS]) define(AC_OUTPUT, -[AC_CACHE_SAVE +[trap '' 1 2 15 +AC_CACHE_SAVE +trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=/usr/local # Let make expand exec_prefix. @@ -1631,7 +1633,12 @@ changequote([, ])dnl echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - sed -e " + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g diff --git a/autoconf.texi b/autoconf.texi index c59f8ea2..2f8cc3ec 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -794,11 +794,14 @@ contains. @defvar configure_input @ovindex configure_input A comment saying that the file was generated automatically by configure -and giving the name of the input file. You should reference this -variable in a comment at the top of each input file. For example, a -@file{Makefile.in} should begin like this: +and giving the name of the input file. @code{AC_OUTPUT} adds a comment +line containing this variable to the top of every @file{Makefile} it +creates. For other files, you should reference this variable in a +comment at the top of each input file. For example, an input +shell script should begin like this: @example +#!/bin/sh # @@configure_input@@ @end example diff --git a/doc/Makefile.in b/doc/Makefile.in index 1016795a..69a9c6e0 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,4 +1,3 @@ -# @configure_input@ # Makefile for Autoconf. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. @@ -131,8 +130,8 @@ installdirs: install: all $(M4FILES) acconfig.h installdirs install-info @case `$(M4) --help < /dev/null 2>&1` in \ *reload-state*) echo installing frozen m4 files; \ - $(M4) -F $(acdatadir)/autoconf.m4f autoconf.m4 ; \ - $(M4) -F $(acdatadir)/autoheader.m4f autoheader.m4 ;; \ + $(M4) -F $(acdatadir)/autoconf.m4f -I${srcdir} ${srcdir}/autoconf.m4 ; \ + $(M4) -F $(acdatadir)/autoheader.m4f -I${srcdir} ${srcdir}/autoheader.m4 ;; \ *traditional*) ;; \ *) echo Error: Autoconf requires GNU m4 1.1 or later; exit 1 ;; \ esac diff --git a/doc/autoconf.texi b/doc/autoconf.texi index c59f8ea2..2f8cc3ec 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -794,11 +794,14 @@ contains. @defvar configure_input @ovindex configure_input A comment saying that the file was generated automatically by configure -and giving the name of the input file. You should reference this -variable in a comment at the top of each input file. For example, a -@file{Makefile.in} should begin like this: +and giving the name of the input file. @code{AC_OUTPUT} adds a comment +line containing this variable to the top of every @file{Makefile} it +creates. For other files, you should reference this variable in a +comment at the top of each input file. For example, an input +shell script should begin like this: @example +#!/bin/sh # @@configure_input@@ @end example diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 805085e5..ee5da544 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1455,7 +1455,9 @@ dnl The big finish. dnl Produce config.status, config.h, and links, and configure subdirs. dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS]) define(AC_OUTPUT, -[AC_CACHE_SAVE +[trap '' 1 2 15 +AC_CACHE_SAVE +trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=/usr/local # Let make expand exec_prefix. @@ -1631,7 +1633,12 @@ changequote([, ])dnl echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - sed -e " + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index a5d1ee46..c0b8ff4c 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -1,4 +1,3 @@ -# @configure_input@ # Makefile for Autoconf test suite. # Copyright (C) 1994 Free Software Foundation, Inc.