Bruno Haible <bruno <at> clisp.org> writes:

> 
> The empty line after the copyright header was intended to be removed as well.
> This appears to require two sed pipes in a row.

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).

>   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 $@

sed -n '/GL_LINK_WARNING/,$$ p' $(top_srcdir)/build-aux/link-warning.h > $...@-t

(with the address range terminator $ already escaped for Makefile.am)

-- 
Eric Blake





Reply via email to