[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add license to link-warning.h
From: |
Eric Blake |
Subject: |
Re: add license to link-warning.h |
Date: |
Wed, 09 Dec 2009 21:08:53 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 12/9/2009 10:56 AM:
> Plus a useless use of cat, for a total of 3 processes? Come on, we can do
> better than that. A single sed process is sufficient, by rephrasing the
> problem (rather than what do we want to exclude, it should be what we want to
> include).
>
> sed -n '/GL_LINK_WARNING/,$$ p' $(top_srcdir)/build-aux/link-warning.h >
> address@hidden
>
> (with the address range terminator $ already escaped for Makefile.am)
Tested this, then pushed:
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksgdFUACgkQ84KuGfSFAYDDYQCgqtL7KiplHcpdjDkU0zNmOtOE
gLEAoIn3KE1qGZC0HDgMN0PuHXfMBniM
=MZ6a
-----END PGP SIGNATURE-----
>From a7f94464817dcc9bf86761b6480149c9230128b2 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Wed, 9 Dec 2009 16:11:27 -0700
Subject: [PATCH] link-warning: optimize generation
Avoid a useless use of cat.
* modules/link-warning (Makefile.am): Reduce process usage.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 9 +++++++--
modules/link-warning | 5 ++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 01b91e4..6b592e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-09 Eric Blake <address@hidden>
+
+ link-warning: optimize generation
+ * modules/link-warning (Makefile.am): Reduce process usage.
+
2009-12-09 Bruno Haible <address@hidden>
* doc/posix-functions/unsetenv.texi: Mention Solaris 10 bug for which a
diff --git a/modules/link-warning b/modules/link-warning
index 970ad55..daf3d47 100644
--- a/modules/link-warning
+++ b/modules/link-warning
@@ -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 address@hidden $@ && \
- cat $(top_srcdir)/build-aux/link-warning.h \
- | sed -e '1,/www\.gnu\.org\/licenses/d' | sed -e '1d' \
- > address@hidden && \
+ sed -n '/GL_LINK_WARNING/,$$p' \
+ $(top_srcdir)/build-aux/link-warning.h > address@hidden && \
mv address@hidden $@
MOSTLYCLEANFILES += link-warning.h link-warning.h-t
--
1.6.5.rc1
Re: add license to link-warning.h, Simon Josefsson, 2009/12/09