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: Jim Meyering
Subject: Re: add license to link-warning.h
Date: Wed, 09 Dec 2009 16:36:13 +0100

Bruno Haible wrote:
>> Bruno, what do you think?  For rationale, I got a comment in
>> https://savannah.gnu.org/task/?9954 that link-warning.h lacked licensing
>> information.
>
> With the coding guideline that every file should have a copyright statement,
> and the license audits that they do in Debian, I nearly saw this coming ;-)
>
>> +2009-12-08  Simon Josefsson  <address@hidden>
>> +
>> +    * build-aux/link-warning.h: Add license header.
>> +
>
> It takes a bit more than this, because we don't want the generated unistd.h
> etc. files to contain two - possibly contradicting - copyright notices. So
> the copyright notice of link-warning.h has to be removed at the moment the
> contents is included in unistd.h etc.
>
> I'm applying this:

Hi Bruno,

Thanks, but that would break coreutils builds,
and any others that use 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 and would
leave "code" like this in generated files like stdlib.h:

-----------------------
/* The definition of GL_LINK_WARNING is copied here.  */
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
-----------------------

I've adjusted the sed command to use a substring of the
final copyright line to determine how much to remove.

Here's one way to fix it:


>From 468d31d385cdb5ad968d4d06007a06fdf63853fd Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 9 Dec 2009 16:29:05 +0100
Subject: [PATCH] link-warning: avoid syntax error in derived files

* modules/link-warning (Makefile.am): Make the comment-removing sed
command more robust in the face of bootstrap-prepended comment lines.
---
 ChangeLog            |    6 ++++++
 modules/link-warning |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4009854..b28dad1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-09  Jim Meyering  <address@hidden>
+
+       link-warning: avoid syntax error in derived files
+       * 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  <address@hidden>

        * lib/mgetgroups.c (mgetgroups): Don't remove duplicates if there is at
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

--
1.6.6.rc1.319.g9b57d




reply via email to

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