Commit 69cbb85a by Richard Kenner

(installdirs): Renamed from install-dir.

Create $(prefix) and $(exec_prefix) if doesn't exist.
(install-float): Reflect new name for installdirs.
(install-{common,info,man,libgcc,multilib,libobjc}): Likewise.
(install-{include-dir,assert-h,collect2}): Likewise.

From-SVN: r12857
parent 5c6b1bd2
...@@ -2109,7 +2109,7 @@ install-cross-rest: install-float-h-cross ...@@ -2109,7 +2109,7 @@ install-cross-rest: install-float-h-cross
# Install float.h for cross compiler. # Install float.h for cross compiler.
# Run this on the target machine! # Run this on the target machine!
install-float-h-cross: install-dir install-float-h-cross: installdirs
# if [ -f enquire ] ; then true; else false; fi # if [ -f enquire ] ; then true; else false; fi
# Note: don't use -. We should fail right away if enquire was not made. # Note: don't use -. We should fail right away if enquire was not made.
./enquire -f > $(tmpdir)/float.h ./enquire -f > $(tmpdir)/float.h
...@@ -2118,8 +2118,10 @@ install-float-h-cross: install-dir ...@@ -2118,8 +2118,10 @@ install-float-h-cross: install-dir
-rm -f $(tmpdir)/float.h -rm -f $(tmpdir)/float.h
chmod a-x $(libsubdir)/include/float.h chmod a-x $(libsubdir)/include/float.h
# Create the installation directory. # Create the installation directories.
install-dir: installdirs:
-if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
-if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
-if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
-if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
# This dir isn't currently searched by cpp. # This dir isn't currently searched by cpp.
...@@ -2140,7 +2142,7 @@ install-dir: ...@@ -2140,7 +2142,7 @@ install-dir:
-if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
# Install the compiler executables built during cross compilation. # Install the compiler executables built during cross compilation.
install-common: native install-dir $(EXTRA_PARTS) lang.install-common install-common: native installdirs $(EXTRA_PARTS) lang.install-common
for file in $(COMPILERS); do \ for file in $(COMPILERS); do \
if [ -f $$file ] ; then \ if [ -f $$file ] ; then \
rm -f $(libsubdir)/$$file; \ rm -f $(libsubdir)/$$file; \
...@@ -2200,14 +2202,14 @@ install-driver: xgcc ...@@ -2200,14 +2202,14 @@ install-driver: xgcc
fi fi
# Install the info files. # Install the info files.
install-info: doc install-dir lang.install-info install-info: doc installdirs lang.install-info
-rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
cd $(srcdir); for f in cpp.info* gcc.info*; \ cd $(srcdir); for f in cpp.info* gcc.info*; \
do $(INSTALL_DATA) $$f $(infodir)/$$f; done do $(INSTALL_DATA) $$f $(infodir)/$$f; done
-chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info* -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
# Install the man pages. # Install the man pages.
install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
-if [ -f gcc-cross ] ; then \ -if [ -f gcc-cross ] ; then \
rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \ rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \ $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
...@@ -2222,7 +2224,7 @@ install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man ...@@ -2222,7 +2224,7 @@ install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
-chmod a-x $(mandir)/cccp$(manext) -chmod a-x $(mandir)/cccp$(manext)
# Install the library. # Install the library.
install-libgcc: libgcc.a install-dir install-libgcc: libgcc.a installdirs
-if [ -f libgcc.a ] ; then \ -if [ -f libgcc.a ] ; then \
rm -f $(libsubdir)/libgcc.a; \ rm -f $(libsubdir)/libgcc.a; \
$(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \ $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
...@@ -2232,7 +2234,7 @@ install-libgcc: libgcc.a install-dir ...@@ -2232,7 +2234,7 @@ install-libgcc: libgcc.a install-dir
else true; fi else true; fi
# Install multiple versions of libgcc.a. # Install multiple versions of libgcc.a.
install-multilib: stmp-multilib install-dir install-multilib: stmp-multilib installdirs
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \ for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \ dir=`echo $$i | sed -e 's/;.*$$//'`; \
if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \ if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
...@@ -2244,7 +2246,7 @@ install-multilib: stmp-multilib install-dir ...@@ -2244,7 +2246,7 @@ install-multilib: stmp-multilib install-dir
done done
# Install the objc run time library. # Install the objc run time library.
install-libobjc: install-dir install-libobjc: installdirs
-if [ -f libobjc.a ] ; then \ -if [ -f libobjc.a ] ; then \
rm -f $(libsubdir)/libobjc.a; \ rm -f $(libsubdir)/libobjc.a; \
$(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \ $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
...@@ -2270,7 +2272,7 @@ install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H) ...@@ -2270,7 +2272,7 @@ install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
fi fi
# Create or recreate the gcc private include file directory. # Create or recreate the gcc private include file directory.
install-include-dir: install-dir install-include-dir: installdirs
-rm -rf $(libsubdir)/include -rm -rf $(libsubdir)/include
mkdir $(libsubdir)/include mkdir $(libsubdir)/include
-chmod a+rx $(libsubdir)/include -chmod a+rx $(libsubdir)/include
...@@ -2294,7 +2296,7 @@ install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir ...@@ -2294,7 +2296,7 @@ install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
## Don't replace the assert.h already there if it is not from GCC. ## Don't replace the assert.h already there if it is not from GCC.
## This code would be simpler if it tested for -f ... && ! grep ... ## This code would be simpler if it tested for -f ... && ! grep ...
## but supposedly the ! operator is missing in sh on some systems. ## but supposedly the ! operator is missing in sh on some systems.
install-assert-h: assert.h install-dir install-assert-h: assert.h installdirs
if [ -f $(assertdir)/assert.h ]; \ if [ -f $(assertdir)/assert.h ]; \
then \ then \
if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \ if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
...@@ -2311,7 +2313,7 @@ install-assert-h: assert.h install-dir ...@@ -2311,7 +2313,7 @@ install-assert-h: assert.h install-dir
fi fi
# Use this target to install the program `collect2' under the name `ld'. # Use this target to install the program `collect2' under the name `ld'.
install-collect2: collect2 install-dir install-collect2: collect2 installdirs
$(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext) $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
# Install the driver program as $(libsubdir)/gcc for collect2. # Install the driver program as $(libsubdir)/gcc for collect2.
$(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext) $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment