aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-10-07 07:50:32 +0000
committerRichard Stallman <rms@gnu.org>1992-10-07 07:50:32 +0000
commitc9d929d737bddd47bd8b16ab5b87776d4c8ef5f3 (patch)
tree78bd1387dd2eb72ba9afe91f8a415dcc15c71ae7
parent84c29ce456e5b3acd527054353dfee6fcb1d64ff (diff)
downloadgcc-c9d929d737bddd47bd8b16ab5b87776d4c8ef5f3.zip
gcc-c9d929d737bddd47bd8b16ab5b87776d4c8ef5f3.tar.gz
gcc-c9d929d737bddd47bd8b16ab5b87776d4c8ef5f3.tar.bz2
(install-common-headers): Avoid ! operator, for assert.h.
From-SVN: r2347
-rw-r--r--gcc/Makefile.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 12cf789..aca0377 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1491,8 +1491,16 @@ install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h
done
# Put assert.h in /usr/local/include, so it won't override GNU libc's assert.h.
# Don't replace the assert.h already there if it is not from GCC.
- if [ -f $(assertdir)/assert.h ] && ! grep "__eprintf" $(assertdir)/assert.h; \
- then true; \
+# This code would be simpler if it tested for -f ... && ! grep ...
+# but supposedly the ! operator is missing in sh on some systems.
+ if [ -f $(assertdir)/assert.h ]; \
+ then \
+ if grep "__eprintf" $(assertdir)/assert.h; \
+ rm -f $(assertdir)/assert.h; \
+ $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
+ chmod a-x $(assertdir)/include/assert.h; \
+ else true; \
+ fi; \
else \
rm -f $(assertdir)/assert.h; \
$(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \