OSDN Git Service

(install-common-headers): Avoid ! operator, for assert.h.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 1992 07:50:32 +0000 (07:50 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 1992 07:50:32 +0000 (07:50 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2347 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/Makefile.in

index 12cf789..aca0377 100644 (file)
@@ -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; \