changeset 12412:1718a15bc893

link-warning: Allow extra lines at the top of build-aux/link-warning.h.
author Jim Meyering <meyering@redhat.com>
date Wed, 09 Dec 2009 17:34:02 +0100
parents bff2e832acad
children ad699b96bf6b
files ChangeLog modules/link-warning
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-09  Jim Meyering  <meyering@redhat.com>
+            Bruno Haible  <bruno@clisp.org>
+
+	link-warning: Allow extra lines at the top of build-aux/link-warning.h.
+	* modules/link-warning (Makefile.am): Make the comment-removing sed
+	command more robust in the face of bootstrap-prepended comment lines.
+
 2009-12-09  Bruno Haible  <bruno@clisp.org>
 
 	* lib/mgetgroups.c (mgetgroups): Don't remove duplicates if there is at
--- a/modules/link-warning
+++ b/modules/link-warning
@@ -10,9 +10,13 @@
 
 Makefile.am:
 BUILT_SOURCES += link-warning.h
+# The link-warning.h that gets inserted into generated .h files is the same as
+# build-aux/link-warning.h, except that it has the copyright header cut off.
 link-warning.h: $(top_srcdir)/build-aux/link-warning.h
 	$(AM_V_GEN)rm -f $@-t $@ && \
-	sed 1,17d < $(top_srcdir)/build-aux/link-warning.h > $@-t && \
+	cat $(top_srcdir)/build-aux/link-warning.h \
+	  | sed -e '1,/www\.gnu\.org\/licenses/d' | sed -e '1d' \
+	  > $@-t && \
 	mv $@-t $@
 MOSTLYCLEANFILES += link-warning.h link-warning.h-t