diff options
author | Ulrich Drepper <drepper@cygnus.com> | 1999-01-13 16:04:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@gcc.gnu.org> | 1999-01-13 16:04:01 +0000 |
commit | 39268973a6bade5db1cc14e6034c96f0584292c9 (patch) | |
tree | 9654284a6bbde139a2f62eeaa02b048a6709b8fc | |
parent | 3bd380b1fc20c668c692679fdec30c980070bf3e (diff) | |
download | gcc-39268973a6bade5db1cc14e6034c96f0584292c9.zip gcc-39268973a6bade5db1cc14e6034c96f0584292c9.tar.gz gcc-39268973a6bade5db1cc14e6034c96f0584292c9.tar.bz2 |
configure.in: Test for "ln -s" and set LN_S in generated Makefile.
* configure.in: Test for "ln -s" and set LN_S in generated Makefile.
* Makefile.in: Use $(LN_S) instead of explicitly ln -s.
From-SVN: r24655
-rw-r--r-- | libstdc++/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++/Makefile.in | 24 | ||||
-rw-r--r-- | libstdc++/configure.in | 13 |
3 files changed, 33 insertions, 9 deletions
diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog index b4a153b..6b47507 100644 --- a/libstdc++/ChangeLog +++ b/libstdc++/ChangeLog @@ -1,3 +1,8 @@ +1999-01-13 Ulrich Drepper <drepper@cygnus.com> + + * configure.in: Test for "ln -s" and set LN_S in generated Makefile. + * Makefile.in: Use $(LN_S) instead of explicitly ln -s. + Sun Jan 03 03:16:02 1999 Robert Lipe <robertlipe@usa.net> * configure.in: (*-*-sysv5, *-*-*udk*): Treat like sysv4. diff --git a/libstdc++/Makefile.in b/libstdc++/Makefile.in index bb60455..bb19202 100644 --- a/libstdc++/Makefile.in +++ b/libstdc++/Makefile.in @@ -35,7 +35,7 @@ SHLIB = libstdc++.so.$(VERSION) SHARLIB = libstdc++-sh.a SHLINK = libstdc++.so MSHLINK = libstdc++.so.`echo $(VERSION) | sed 's/\([0-9][.][0-9]\).*/\1/'` -SHFLAGS = +SHFLAGS = SHDEPS = STAMP = bigstmp @@ -90,7 +90,7 @@ $(ARLIB): stdlist $(ARLINK): -rm -f $(ARLINK) - ln -s $(ARLIB) $(ARLINK) + $(LN_S) $(ARLIB) $(ARLINK) || cp $(ARLIB) $(ARLINK) marlink: @$(MAKE) $(MARLINK) "ARLINK=$(MARLINK)" @@ -106,7 +106,7 @@ $(SHARLIB): $(SHLIB) $(SHLINK): -rm -f $(SHLINK) - ln -s $(SHLIB) $(SHLINK) + $(LN_S) $(SHLIB) $(SHLINK) || cp $(ARLIB) $(ARLINK) mshlink: @$(MAKE) $(MSHLINK) "SHLINK=$(MSHLINK)" @@ -315,28 +315,34 @@ install: if [ $$FILE = $(SHLINK) ] ; then \ if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \ rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ - ln -s $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + $(LN_S) $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \ + || cp $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ else \ rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ - ln -s $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + $(LN_S) $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \ + || cp $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ fi; \ elif [ $$FILE = $(ARLINK) ] ; then \ if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \ rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ - ln -s $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + $(LN_S) $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \ + || cp $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ else \ rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ - ln -s $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ + $(LN_S) $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \ + || cp $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \ fi; \ elif [ $$FILE = mshlink ]; then \ for FILE in $(MSHLINK) ; do \ rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ - ln -s $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ + $(LN_S) $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \ + || cp $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ done; \ elif [ $$FILE = marlink ]; then \ for FILE in $(MARLINK) ; do \ rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ - ln -s $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ + $(LN_S) $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \ + || cp $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ done; \ elif [ $$FILE = $(SHLIB) ]; then \ $(INSTALL_PROGRAM) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \ diff --git a/libstdc++/configure.in b/libstdc++/configure.in index 48b00d6..6c2e13a 100644 --- a/libstdc++/configure.in +++ b/libstdc++/configure.in @@ -115,6 +115,19 @@ CXX_INTERFACE=${cxx_interface} LIBC_INTERFACE=${libc_interface} " >> ${package_makefile_frag} +# This duplicated the AC_PROG_LN_S macro in GNU autoconf. +rm -f conttestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + LN_S="ln -s" +else + LN_S=ln +fi +echo " +LN_S=$LN_S +" >> ${package_makefile_frag} + # post-target: # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir) |