Hi Jim, > the bootstrap script, > which prepends lines like these to build-aux/link-warning.h: > > /* -*- buffer-read-only: t -*- vi: set ro: */ > /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ > > In that case, the hard-coded "17" is incorrect
Oops, sure. I wasn't aware of these extra lines. > diff --git a/modules/link-warning b/modules/link-warning > index 33085b7..dcbc76a 100644 > --- a/modules/link-warning > +++ b/modules/link-warning > @@ -12,7 +12,8 @@ Makefile.am: > BUILT_SOURCES += link-warning.h > 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 && \ > + sed 1,/see <http:..www.gnu.org.licenses/d \ > + < $(top_srcdir)/build-aux/link-warning.h > $...@-t && \ > mv $...@-t $@ > MOSTLYCLEANFILES += link-warning.h link-warning.h-t The empty line after the copyright header was intended to be removed as well. This appears to require two sed pipes in a row. Committed as follows: 2009-12-09 Jim Meyering <meyer...@redhat.com> Bruno Haible <br...@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. *** modules/link-warning.orig 2009-12-09 17:32:54.000000000 +0100 --- modules/link-warning 2009-12-09 17:29:02.000000000 +0100 *************** *** 10,18 **** Makefile.am: BUILT_SOURCES += link-warning.h 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 && \ mv $...@-t $@ MOSTLYCLEANFILES += link-warning.h link-warning.h-t --- 10,22 ---- 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 $@ && \ ! 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