]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in (cpp_install_dir, [...]): New variables.
authorH.J. Lu <hjl@gnu.org>
Tue, 2 Mar 1999 00:30:57 +0000 (00:30 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 2 Mar 1999 00:30:57 +0000 (17:30 -0700)
        * 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: r25525

gcc/ChangeLog
gcc/Makefile.in
gcc/config/t-install-cpp [new file with mode: 0644]
gcc/configure
gcc/configure.in
gcc/cpp.sh [new file with mode: 0755]

index ab90b9ff4aa60668085f5ec356cd3e861334c4d3..d47199ac659e77fc1d763e52f55a3b4394f78ff3 100644 (file)
@@ -1,3 +1,16 @@
+Tue Mar  2 01:27:52 1999  H.J. Lu  (hjl@gnu.org)
+
+       * 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.
+
 Mon Mar  1 23:38:20 1999  Jeffrey A Law  (law@cygnus.com)
 
        Tue Feb  2 23:38:35 1999  David O'Brien <obrien@FreeBSD.org>
index 3963b204dd2aa3cc5441251af775e14a0720f771..724906239eb97262ab513a3d90ac8db406cf4f40 100644 (file)
@@ -280,6 +280,8 @@ includedir = $(local_prefix)/include
 assertdir = $(tooldir)/include
 # where the info files go
 infodir = @infodir@
+# Where cpp should go besides $prefix/bin if necessary
+cpp_install_dir = @cpp_install_dir@
 # Extension (if any) to put in installed man-page filename.
 manext = .1
 objext = .o
@@ -383,6 +385,10 @@ LIB1FUNCS_EXTRA =
 # Assembler files should have names ending in `.asm'.
 LIB2FUNCS_EXTRA = 
 
+# Handle cpp installation.
+INSTALL_CPP=
+UNINSTALL_CPP=
+
 # Default float.h source to use for cross-compiler.
 # This is overridden by configure.
 CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
@@ -2259,7 +2265,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 lang.install-normal install-driver
+    $(INSTALL_CPP) install-man install-info 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
@@ -2271,6 +2278,21 @@ install-build: force
 # to finish installation of cross compiler.
 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!
 install-float-h-cross: installdirs
@@ -2501,7 +2523,7 @@ install-collect2: collect2 installdirs
        $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
 
 # Cancel installation by deleting the installed files.
-uninstall: lang.uninstall
+uninstall: lang.uninstall $(UNINSTALL_CPP)
        -rm -rf $(libsubdir)
        -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
        -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
diff --git a/gcc/config/t-install-cpp b/gcc/config/t-install-cpp
new file mode 100644 (file)
index 0000000..9f88754
--- /dev/null
@@ -0,0 +1,3 @@
+# Handle cpp installation.
+INSTALL_CPP=install-cpp
+UNINSTALL_CPP=uninstall-cpp
index 25875cd8fe6e3a4f93eee9165cba7eb4bfa8faa3..7f0ba2ab2e616edc65b3177a5512153b4a687a45 100755 (executable)
@@ -2222,6 +2222,9 @@ host_xmake_file=
 host_truncate_target=
 host_exeext=
 
+# It is relative to $prefix.
+cpp_install_dir=
+
 # Decode the host machine, then the target machine.
 # For the host machine, we save the xm_file variable as host_xm_file;
 # then we decode the target machine and forget everything else
@@ -5095,6 +5098,24 @@ then
   esac
 fi
 
+# Handle cpp installation.
+if [ x$enable_cpp != x ]
+then
+  if [ x$cpp_install_dir = x ]
+  then
+    case $target in
+    *-*-linux-gnu*)
+      if [ x$prefix = x/usr ]
+      then
+       cpp_install_dir=../lib
+      fi
+      ;;
+    esac
+  fi
+
+  tmake_file="$tmake_file t-install-cpp"
+fi
+
 # Say what files are being used for the output code and MD file.
 echo "Using \`$srcdir/config/$out_file' to output insns."
 echo "Using \`$srcdir/config/$md_file' as machine description file."
@@ -5395,7 +5416,7 @@ fi
 
 # Figure out what assembler alignment features are present.
 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:5399: checking assembler alignment features" >&5
+echo "configure:5420: checking assembler alignment features" >&5
 gcc_cv_as=
 gcc_cv_as_alignment_features=
 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,gcc$,gas,'`
@@ -5707,6 +5728,8 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
 
 
 
+
+
 
 
 
@@ -5963,6 +5986,7 @@ s%@cc_set_by_configure@%$cc_set_by_configure%g
 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
 s%@install@%$install%g
 s%@symbolic_link@%$symbolic_link%g
+s%@cpp_install_dir@%$cpp_install_dir%g
 /@target_overrides@/r $target_overrides
 s%@target_overrides@%%g
 /@host_overrides@/r $host_overrides
@@ -6211,6 +6235,7 @@ host_overrides='${host_overrides}'
 cross_defines='${cross_defines}'
 cross_overrides='${cross_overrides}'
 build_overrides='${build_overrides}'
+cpp_install_dir='${cpp_install_dir}'
 
 EOF
 cat >> $CONFIG_STATUS <<\EOF
index 713039f04ee716c8f72a36a901159d2a5d59cb9b..752a0c353c06e365f0801f6656a80235286154ad 100644 (file)
@@ -243,6 +243,9 @@ host_xmake_file=
 host_truncate_target=
 host_exeext=
 
+# It is relative to $prefix.
+cpp_install_dir=
+
 # Decode the host machine, then the target machine.
 # For the host machine, we save the xm_file variable as host_xm_file;
 # then we decode the target machine and forget everything else
@@ -3116,6 +3119,12 @@ then
   esac
 fi
 
+# Handle cpp installation.
+if [[ x$enable_cpp != x ]]
+then
+  tmake_file="$tmake_file t-install-cpp"
+fi
+
 # Say what files are being used for the output code and MD file.
 echo "Using \`$srcdir/config/$out_file' to output insns."
 echo "Using \`$srcdir/config/$md_file' as machine description file."
@@ -3709,6 +3718,8 @@ AC_SUBST(cc_set_by_configure)
 AC_SUBST(stage_prefix_set_by_configure)
 AC_SUBST(install)
 AC_SUBST(symbolic_link)
+AC_SUBST(cpp_install_dir)
+
 
 AC_SUBST_FILE(target_overrides)
 AC_SUBST_FILE(host_overrides)
@@ -3813,4 +3824,5 @@ host_overrides='${host_overrides}'
 cross_defines='${cross_defines}'
 cross_overrides='${cross_overrides}'
 build_overrides='${build_overrides}'
+cpp_install_dir='${cpp_install_dir}'
 ])
diff --git a/gcc/cpp.sh b/gcc/cpp.sh
new file mode 100755 (executable)
index 0000000..b9b6b43
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+exec `gcc -print-prog-name=cpp` ${1+"$@"}