Makefile.in (RELINSTALLDIR): New.

* Makefile.in (RELINSTALLDIR): New. Use it to make symlinks.
        * configure.in: Fix INSTALLDIR replacement for cross-compile.

From-SVN: r22197
This commit is contained in:
H.J. Lu 1998-09-02 20:12:35 +00:00 committed by Jeff Law
parent 72ae5d03a1
commit 7b5070d680
3 changed files with 27 additions and 5 deletions

View File

@ -1,3 +1,9 @@
Wed Sep 2 21:11:15 1998 H.J. Lu (hjl@gnu.org)
* Makefile.in (RELINSTALLDIR): New. Use it to make symlinks.
* configure.in: Fix INSTALLDIR replacement for cross-compile.
Sun Aug 30 22:17:41 1998 H.J. Lu (hjl@gnu.org) Sun Aug 30 22:17:41 1998 H.J. Lu (hjl@gnu.org)
* Makefile.in (INTERFACE): New, set to 2. * Makefile.in (INTERFACE): New, set to 2.

View File

@ -285,21 +285,37 @@ install:
INSTALLDIR=$(libsubdir); \ INSTALLDIR=$(libsubdir); \
fi; \ fi; \
INSTALLLINKDIR=$(libsubdir); \ INSTALLLINKDIR=$(libsubdir); \
if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR} ]; \
then \
RELINSTALLDIR=; \
elif [ x$(MULTISUBDIR) = x ]; then \
RELINSTALLDIR=../../../; \
elif [ "x`echo $(MULTISUBDIR) | sed s,[a-z],,g`" = "x/" ]; then \
RELINSTALLDIR=../../../../; \
else \
RELINSTALLDIR=$${INSTALLDIR}/; \
fi; \
if [ $(build_alias) != $(target_alias) ]; then \
case $$RELINSTALLDIR in \
../../../|../../../../) \
RELINSTALLDIR=../$${RELINSTALLDIR}$(target_alias)/lib/;; \
esac; \
fi; \
rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \ rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \
rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(ARLINK) ; \ rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(ARLINK) ; \
for FILE in $(LIBS) ; do \ for FILE in $(LIBS) ; do \
rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
if [ $$FILE = $(SHLINK) ] ; then \ if [ $$FILE = $(SHLINK) ] ; then \
if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \ if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \
ln -f -s $${INSTALLDIR}/$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ ln -f -s $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
else \ else \
ln -f -s $${INSTALLDIR}/$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ ln -f -s $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
fi; \ fi; \
elif [ $$FILE = $(ARLINK) ] ; then \ elif [ $$FILE = $(ARLINK) ] ; then \
if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \ if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \
ln -f -s $${INSTALLDIR}/$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ ln -f -s $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
else \ else \
ln -f -s $${INSTALLDIR}/$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ ln -f -s $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
fi; \ fi; \
elif [ $$FILE = mshlink ]; then \ elif [ $$FILE = mshlink ]; then \
for FILE in $(MSHLINK) ; do \ for FILE in $(MSHLINK) ; do \

View File

@ -107,7 +107,7 @@ LIBC_INTERFACE=${libc_interface}
if [ -n "${with_cross_host}" ] ; then if [ -n "${with_cross_host}" ] ; then
rm -f Makefile.tem rm -f Makefile.tem
sed \ sed \
-e 's|\(INSTALLDIR[ ]*=[ ]*\)[^ ;]*|\1$(tooldir)/lib|' \ -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)[^ ;]*|\1$(tooldir)/lib|' \
Makefile >Makefile.tem Makefile >Makefile.tem
mv -f Makefile.tem Makefile mv -f Makefile.tem Makefile
fi fi