summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-05-31 09:52:51 +0200
committerJim Meyering <meyering@redhat.com>2009-06-02 16:35:14 +0200
commit0818c52874ba19ed3eaacf52056fd1b53fd517cb (patch)
treecf456e6c1a77fa5518033fc5d6345ce477179e7d /man
parenta5c627f9c6d7919da34a9f535e86a69e00754850 (diff)
downloadcoreutils-0818c52874ba19ed3eaacf52056fd1b53fd517cb.tar.xz
build: make generated man/*.1 files read-only
This should help people notice that they are generated. Note: each file already has a comment to that effect from help2man. * man/Makefile.am (.x.1): Make generated files read-only. Also, don't redirect directly to the target, $@.
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.am9
1 files changed, 6 insertions, 3 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index 906e80479..ee16a3ff2 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -154,7 +154,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
'or inadequate' 1>&2 \
;; \
*) \
- rm -f $@ \
+ rm -f $@ $@-t \
&& { \
rm -rf $t; \
mkdir $t; \
@@ -164,8 +164,11 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
--include=$(srcdir)/$*.x \
--output=$t/$@ $t/$*; \
} \
- && sed 's|$*\.td/||g' $t/$@ > $@ \
- && rm -rf $t ;; \
+ && sed 's|$*\.td/||g' $t/$@ > $@-t \
+ && rm -rf $t \
+ && chmod -w $@-t \
+ && mv $@-t $@ \
+ ;; \
esac
distcheck-hook: check-x-vs-1 check-programs-vs-x