summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gnu.org>1999-03-02 00:30:57 +0000
committerJeff Law <law@gcc.gnu.org>1999-03-01 17:30:57 -0700
commit9de98ef0eac5ed21247cb52dc3a4e44234d84893 (patch)
treeb2e02387c2686f973d958e7824e48666f2f8f1f2
parente4b2ca3109ee197efc085d609f5b1cf73c6c18d3 (diff)
downloadgcc-9de98ef0eac5ed21247cb52dc3a4e44234d84893.tar.gz
Makefile.in (cpp_install_dir, [...]): New variables.
* 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
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/Makefile.in26
-rw-r--r--gcc/config/t-install-cpp3
-rwxr-xr-xgcc/configure27
-rw-r--r--gcc/configure.in12
-rwxr-xr-xgcc/cpp.sh2
6 files changed, 80 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ab90b9ff4aa..d47199ac659 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 3963b204dd2..724906239eb 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -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
index 00000000000..9f887543d03
--- /dev/null
+++ b/gcc/config/t-install-cpp
@@ -0,0 +1,3 @@
+# Handle cpp installation.
+INSTALL_CPP=install-cpp
+UNINSTALL_CPP=uninstall-cpp
diff --git a/gcc/configure b/gcc/configure
index 25875cd8fe6..7f0ba2ab2e6 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -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,'`
@@ -5710,6 +5731,8 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
+
+
# Echo that links are built
if [ x$host = x$target ]
then
@@ -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
diff --git a/gcc/configure.in b/gcc/configure.in
index 713039f04ee..752a0c353c0 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -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
index 00000000000..b9b6b431711
--- /dev/null
+++ b/gcc/cpp.sh
@@ -0,0 +1,2 @@
+#! /bin/sh
+exec `gcc -print-prog-name=cpp` ${1+"$@"}