diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog index 0eada83ec29..c430be55569 100644 --- a/libstdc++/ChangeLog +++ b/libstdc++/ChangeLog @@ -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) * Makefile.in (INTERFACE): New, set to 2. diff --git a/libstdc++/Makefile.in b/libstdc++/Makefile.in index 6736c2c9699..3696501b9d6 100644 --- a/libstdc++/Makefile.in +++ b/libstdc++/Makefile.in @@ -285,21 +285,37 @@ install: INSTALLDIR=$(libsubdir); \ fi; \ 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)/$(ARLINK) ; \ for FILE in $(LIBS) ; do \ rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ if [ $$FILE = $(SHLINK) ] ; then \ if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \ - ln -f -s $${INSTALLDIR}/$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + ln -f -s $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ else \ - ln -f -s $${INSTALLDIR}/$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + ln -f -s $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ fi; \ elif [ $$FILE = $(ARLINK) ] ; then \ if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \ - ln -f -s $${INSTALLDIR}/$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + ln -f -s $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ else \ - ln -f -s $${INSTALLDIR}/$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + ln -f -s $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ fi; \ elif [ $$FILE = mshlink ]; then \ for FILE in $(MSHLINK) ; do \ diff --git a/libstdc++/configure.in b/libstdc++/configure.in index 6e614907b56..09f645fd170 100644 --- a/libstdc++/configure.in +++ b/libstdc++/configure.in @@ -107,7 +107,7 @@ LIBC_INTERFACE=${libc_interface} if [ -n "${with_cross_host}" ] ; then rm -f Makefile.tem sed \ - -e 's|\(INSTALLDIR[ ]*=[ ]*\)[^ ;]*|\1$(tooldir)/lib|' \ + -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)[^ ;]*|\1$(tooldir)/lib|' \ Makefile >Makefile.tem mv -f Makefile.tem Makefile fi