diff options
author | Jim Meyering <meyering@fb.com> | 2014-10-31 18:40:50 -0500 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-10-31 18:40:50 -0500 |
commit | 8ea1c520a237586f2c1909c7b9cd3223414a5d1c (patch) | |
tree | d21fbbcce42397bb65d5b0311e746e7d89f89c96 | |
parent | c9bd271bb60c6e4d5ad553a3b31cc83b393bf054 (diff) | |
download | grep-8ea1c520a237586f2c1909c7b9cd3223414a5d1c.tar.gz |
build: generate man pages even when existing targets are read-only
* doc/Makefile.am (grep.1): Use mv -f to move temporary to target,
in case the target is read-only. Also, always make the generated
files read-only.
(egrep.1 fgrep.1): Likewise.
This avoids a build failure reported by Eric Blake in
http://lists.gnu.org/archive/html/bug-grep/2014-10/msg00112.html
-rw-r--r-- | doc/Makefile.am | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 9a504340..684c1db2 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -25,10 +25,14 @@ EXTRA_DIST = grep.in.1 CLEANFILES = grep.1 egrep.1 fgrep.1 grep.1: grep.in.1 - $(AM_V_GEN)sed 's/@''VERSION@/$(VERSION)/' < $(srcdir)/grep.in.1 > $@-t - $(AM_V_at)mv $@-t $@ + $(AM_V_GEN)rm -f $@-t $@ + $(AM_V_at)sed 's/@''VERSION@/$(VERSION)/' $(srcdir)/grep.in.1 > $@-t + $(AM_V_at)chmod a=r $@-t + $(AM_V_at)mv -f $@-t $@ egrep.1 fgrep.1: Makefile.am - $(AM_V_GEN)inst=`echo grep | sed '$(transform)'`.1 \ + $(AM_V_GEN)rm -f $@-t $@ + $(AM_V_at)inst=`echo grep | sed '$(transform)'`.1 \ && echo ".so man1/$$inst" > $@-t - $(AM_V_at)mv $@-t $@ + $(AM_V_at)chmod a=r $@-t + $(AM_V_at)mv -f $@-t $@ |