bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add license to link-warning.h


From: Bruno Haible
Subject: Re: add license to link-warning.h
Date: Wed, 9 Dec 2009 17:38:45 +0100
User-agent: KMail/1.9.9

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 address@hidden $@ && \
> -     sed 1,17d < $(top_srcdir)/build-aux/link-warning.h > address@hidden && \
> +     sed 1,/see <http:..www.gnu.org.licenses/d \
> +         < $(top_srcdir)/build-aux/link-warning.h > address@hidden && \
>       mv address@hidden $@
>  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  <address@hidden>
            Bruno Haible  <address@hidden>

        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 address@hidden $@ && \
!       sed 1,17d < $(top_srcdir)/build-aux/link-warning.h > address@hidden && \
        mv address@hidden $@
  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 address@hidden $@ && \
!       cat $(top_srcdir)/build-aux/link-warning.h \
!         | sed -e '1,/www\.gnu\.org\/licenses/d' | sed -e '1d' \
!         > address@hidden && \
        mv address@hidden $@
  MOSTLYCLEANFILES += link-warning.h link-warning.h-t
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]