From 9bb77d617a2fb499a6d133d4f2a4c33dc0df8a8a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 15 Nov 2017 08:49:01 -0800 Subject: build: make each generated script unwritable * Makefile.am (.in): Ensure that each generated script is unwritable. This makes it less likely that someone (even me) will mistakenly modify one of those generated files. --- Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6e5bb0f..f342808 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,12 +80,13 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS) SUFFIXES = .in .in: - $(AM_V_GEN)sed \ + $(AM_V_GEN)rm -f address@hidden $@ \ + && sed \ -e 's|/bin/sh|$(SHELL)|g' \ -e 's|address@hidden@|$(GREP)|g' \ -e 's|address@hidden@|$(VERSION)|g' \ $(srcdir)/address@hidden >address@hidden \ - && chmod a+x address@hidden \ + && chmod a=rx address@hidden \ && mv address@hidden $@ # Arrange so that .tarball-version appears only in the distribution -- 2.13.5