Makefile.in (cpp_install_dir, [...]): New variables.
authorH.J. Lu <hjl@gnu.org>
Tue, 2 Mar 1999 00:59:28 +0000 (17:59 -0700)
committerJeff Law <law@gcc.gnu.org>
Tue, 2 Mar 1999 00:59:28 +0000 (17:59 -0700)
p
        * Makefile.in (cpp_install_dir, INSTALL_CPP, UNINSTALL_CPP): New
        variables.
        (install-cpp, uninstall-cpp): New targets.
        (install-normal): Depend on $(INSTALL_CPP).
        (uninstall): Depend on $(UNINSTALL_CPP).
        * configure.in (cpp_install_dir): New, substitute.
        (tmake_file): Added t-install-cpp for --enable-cpp.
        * configure: Rebuilt.
        * cpp.sh: New cpp script.
        * config/t-install-cpp: New target fragment.

From-SVN: r25529

gcc/Makefile.in

index 8bc986f1913c7cb9e7da27b4e558bfb1a55098c7..9a96eb3475724310dd7b827ad97734fac5bf46d1 100644 (file)
@@ -280,6 +280,8 @@ includedir = $(local_prefix)/include
 assertdir = $(gcc_tooldir)/include
 # where the info files go
 infodir = @infodir@
+# Where cpp should go besides $prefix/bin if necessary
+cpp_install_dir = @cpp_install_dir@
 # where the locale files go
 datadir = $(prefix)/@DATADIRNAME@
 localedir = $(datadir)/locale
@@ -397,6 +399,10 @@ LIB1FUNCS_EXTRA =
 # Assembler files should have names ending in `.asm'.
 LIB2FUNCS_EXTRA = 
 
+# Handle cpp installation.
+INSTALL_CPP=
+UNINSTALL_CPP=
+
 # We do not try to build float.h anymore.  Let configure select the
 # appropriate pre-built float.h file for the target.
 FLOAT_H=@float_h_file@
@@ -2389,7 +2395,8 @@ install: $(INSTALL_TARGET) ; @true
 # Install the driver last so that the window when things are
 # broken is small.
 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
-    install-man install-info intl.install lang.install-normal install-driver
+    $(INSTALL_CPP) install-man install-info intl.install lang.install-normal \
+    install-driver
 
 # Do nothing while making gcc with a cross-compiler. The person who
 # makes gcc for the target machine has to know how to put a complete
@@ -2402,6 +2409,21 @@ install-build: force
 # This is not used anymore now that float.h does not depend on enquire.
 install-cross-rest: install-float-h-cross
 
+# Handle cpp installation.
+install-cpp: cpp.sh
+       -rm -f $(bindir)/cpp
+       $(INSTALL_PROGRAM) -m 755 cpp.sh $(bindir)/cpp
+       if [ x$(cpp_install_dir) != x ]; then \
+         rm -f $(prefix)/$(cpp_install_dir)/cpp; \
+         $(INSTALL_PROGRAM) -m 755 cpp.sh $(prefix)/$(cpp_install_dir)/cpp; \
+       else true; fi
+
+uninstall-cpp:
+       -rm -f $(bindir)/cpp
+       -if [ x$(cpp_install_dir) != x ]; then \
+         rm -f $(prefix)/$(cpp_install_dir)/cpp; \
+       else true; fi
+
 # Install float.h for cross compiler.
 # Run this on the target machine!
 # This is not used anymore now that float.h does not depend on enquire.
@@ -2633,7 +2655,7 @@ install-collect2: collect2 installdirs
        $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
 
 # Cancel installation by deleting the installed files.
-uninstall: intl.uninstall lang.uninstall
+uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP)
        -rm -rf $(libsubdir)
        -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
        -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)