link-warning: Allow extra lines at the top of build-aux/link-warning.h.
authorJim Meyering <meyering@redhat.com>
Wed, 9 Dec 2009 16:34:02 +0000 (17:34 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 9 Dec 2009 16:34:02 +0000 (17:34 +0100)
ChangeLog
modules/link-warning

index 4009854..d5997c7 100644 (file)
--- 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
index 33085b7..970ad55 100644 (file)
@@ -10,9 +10,13 @@ configure.ac:
 
 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