link-warning: optimize generation
authorEric Blake <ebb9@byu.net>
Wed, 9 Dec 2009 23:11:27 +0000 (16:11 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 10 Dec 2009 03:47:51 +0000 (20:47 -0700)
Avoid a useless use of cat.

* modules/link-warning (Makefile.am): Reduce process usage.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
modules/link-warning

index 01b91e489e49dd19f761c021d389d2e97fc50559..6b592e49b927c51742c9b6447e9ed76817a4201d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,15 @@
+2009-12-09  Eric Blake  <ebb9@byu.net>
+
+       link-warning: optimize generation
+       * modules/link-warning (Makefile.am): Reduce process usage.
+
 2009-12-09  Bruno Haible  <bruno@clisp.org>
 
        * doc/posix-functions/unsetenv.texi: Mention Solaris 10 bug for which a
        workaround was added on 2009-11-17.
 
 2009-12-09  Jim Meyering  <meyering@redhat.com>
-            Bruno Haible  <bruno@clisp.org>
+           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
@@ -16,7 +21,7 @@
        most one group.
 
 2009-12-09  Simon Josefsson <simon@josefsson.org>
-            Bruno Haible  <bruno@clisp.org>
+           Bruno Haible  <bruno@clisp.org>
 
        * build-aux/link-warning.h: Add copyright notice.
        * modules/link-warning (Makefile.am): Generate link-warning.h from
index 970ad55362d40bd2aa3398561f66ddb8938e55a9..daf3d477bfdc01e63dfab310154ea40679dfdaea 100644 (file)
@@ -14,9 +14,8 @@ BUILT_SOURCES += link-warning.h
 # 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 && \
+       sed -n '/GL_LINK_WARNING/,$$p' \
+         $(top_srcdir)/build-aux/link-warning.h > $@-t && \
        mv $@-t $@
 MOSTLYCLEANFILES += link-warning.h link-warning.h-t