diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-06-17 12:02:01 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-06-17 12:06:06 -0700 |
commit | 824e15341240f3e2bff4e0cf9789edef9f80bacb (patch) | |
tree | 594bada6592e5b3754df629591ac4c3699e111db /src | |
parent | 66c0c3174e0626f6f58285f118fc6845ebc3c807 (diff) | |
download | grep-824e15341240f3e2bff4e0cf9789edef9f80bacb.tar.gz |
build: don't make output files read-only
This led to problems, such as the prompt "mv: try to overwrite
'egrep', overriding mode 0555 (r-xr-xr-x)? " during a build.
It can be worked around, but the cure is worse than the disease;
making output files read-only is more trouble than it's worth.
* doc/Makefile.am (grep.1, egrep.1, fgrep.1):
* lib/Makefile.am (colorize.c):
* src/Makefile.am (egrep fgrep):
Don't make output files read-only. Prefer separate commands to
'&&' when either will do.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 0697c636..11acdb1b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,8 +45,7 @@ AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib EXTRA_DIST = dosbuf.c egrep.sh egrep fgrep: egrep.sh Makefile - $(AM_V_GEN)rm -f $@-t - $(AM_V_at)grep=`echo grep | sed -e '$(transform)'` && \ + $(AM_V_GEN)grep=`echo grep | sed -e '$(transform)'` && \ case $@ in egrep) option=-E;; fgrep) option=-F;; esac && \ shell_does_substrings='set x/y && d=$${1%/*} && test "$$d" = x' && \ if $(SHELL) -c "$$shell_does_substrings" 2>/dev/null; then \ @@ -58,7 +57,7 @@ egrep fgrep: egrep.sh Makefile -e "$$edit_substring" \ -e "s|[@]grep@|$$grep|g" \ -e "s|[@]option@|$$option|g" <$(srcdir)/egrep.sh >$@-t - $(AM_V_at)chmod a=rx $@-t + $(AM_V_at)chmod +x $@-t $(AM_V_at)mv $@-t $@ CLEANFILES = egrep fgrep *-t |