(libgcc2.a): Handle case of separate srcdir.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 24 May 1995 20:49:36 +0000 (16:49 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 24 May 1995 20:49:36 +0000 (16:49 -0400)
From-SVN: r9810

gcc/Makefile.in

index 969e593..13cb543 100644 (file)
@@ -869,14 +869,15 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
        do \
          if [ x$${file} != x.. ]; then \
            name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
+           oname=` echo $${name} | sed -e 's,.*/,,'`; \
            echo $${name}; \
            if [ $${name}.asm = $${file} ]; then \
              cp $${file} $${name}.s || exit 1; file=$${name}.s; \
            else true; fi; \
            $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
            if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
-           rm -f $${name}.s $${name}$(objext); \
+           $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
+           rm -f $${name}.s $${oname}$(objext); \
          else true; \
          fi; \
        done