(install): Add semicolon to make an empty command.
authorRichard Stallman <rms@gnu.org>
Fri, 4 Sep 1992 04:40:25 +0000 (04:40 +0000)
committerRichard Stallman <rms@gnu.org>
Fri, 4 Sep 1992 04:40:25 +0000 (04:40 +0000)
(SYSTEM_HEADER_DIR): New variable.
(xlimits.h): New target, broken out from install-limits-h.
Look in SYSTEM_HEADER_DIR for system's limits.h.
(start.encap): Dep on xlimits.h.
(install-limits-h): Install xlimits.h already made.

From-SVN: r2050

gcc/Makefile.in

index 7bc4a54..47cfff5 100644 (file)
@@ -113,6 +113,9 @@ RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
 CROSS_TOOLS =
 
+# Dir to search for system headers.  Overridden by cross-make.
+SYSTEM_HEADER_DIR = /usr/include
+
 # There may be a premade insn-attrtab.c for this machine.
 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
 # PREMADE_ATTRTAB is the file name of the file to use.
@@ -416,7 +419,7 @@ all.internal: start.encap rest.encap
 # This is what to compile if making a cross-compiler.
 all.cross: native gcc-cross libgcc.a cross-test $(EXTRA_PARTS)
 # This is what must be made before installing GCC and converting libraries.
-start.encap: native xgcc specs $(LIBGCC1)
+start.encap: native xgcc specs $(LIBGCC1) xlimits.h
 # Use this to make a GCC that will be used only to recompile GCC.
 for-bootstrap: start.encap libgcc.a
 # These can't be made, with COFF encapsulation, until after GCC can run.
@@ -496,6 +499,14 @@ enquire.o: $(srcdir)/enquire.c $(GCC_PASSES)
 #      -cp $(srcdir)/enquire.c . > /dev/null 2>&1
 # Breaking this line caused a problem with one version of GNU make.
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
+
+# Build the version of limits.h that we will install.
+xlimits.h: glimits.h limitx.h limity.h
+       if [ -f $(SYSTEM_HEADER_DIR)/limits.h ] ; then \
+         cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > xlimits.h; \
+       else \
+         cat $(srcdir)/glimits.h > xlimits.h; \
+       fi
 \f
 # Build libgcc.a.
 # This is done in two parts because some functions, in libgcc1.c,
@@ -878,6 +889,13 @@ alloca.o:  alloca.c
 
 # Each of the other insn-* files is handled by a similar pair of rules.
 
+# This causes an anomaly in the results of make -n
+# because insn-* is older than stamp-*
+# and thus make -n thinks that insn-* will be updated
+# and force recompilation of things that depend on it.
+# We use move-if-changed precisely to avoid such recompilation.
+# But there is no way to teach make -n that it will be avoided.
+
 # Each of the insn-*.[ch] rules has a semicolon at the end,
 # for otherwise the system Make on SunOS 4.1 never tries
 # to recompile insn-*.o.
@@ -1273,7 +1291,9 @@ realclean: distclean
 # Also temporarily `install-fixincludes' could replace `install-headers'.
 # Also use `install-collect2' to install collect2 when the config files don't.
 
-install: $(INSTALL_TARGET)
+# The semicolon is to prevent the install.sh -> install default rule
+# from doing anything.
+install: $(INSTALL_TARGET) ;
 
 # Copy the files of native compiler into directories where they will be run.
 install-native: install-common install-libgcc $(INSTALL_HEADERS) \
@@ -1442,16 +1462,10 @@ install-float-h: float.h install-dir
        chmod a-x $(libsubdir)/include/float.h
 
 # Install limits.h, optionally inheriting from the standard system version.
-install-limits-h: glimits.h limitx.h install-dir
-       -rm -f $(libsubdir)/include/limits.h tmp-limits.h
-       if [ -f /usr/include/limits.h ] ; then \
-         cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-limits.h; \
-       else \
-         cat $(srcdir)/glimits.h > tmp-limits.h; \
-       fi
-       $(INSTALL_DATA) tmp-limits.h $(libsubdir)/include/limits.h
+install-limits-h: xlimits.h install-dir
+       -rm -f $(libsubdir)/include/limits.h
+       $(INSTALL_DATA) xlimits.h $(libsubdir)/include/limits.h
        chmod a-x $(libsubdir)/include/limits.h
-       rm tmp-limits.h
 
 # Install the fixed headers that are the same for all machines.
 install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h