Commit 265ce9f8 by Tom Wood

(libobjc.a): Compute srcdir1 without changing directories.

(libobjc.a):  Compute srcdir1 without changing
	directories.  Use srcdir1 to locate objc/Makefile.  Put quotes
	around all potential multi-word values.  Recompute GCC_FOR_TARGET.
	(sublibobjc.a): Use same text as libobjc.a.
	(mostlyclean): Use $(MAKE) and srcdir1 for objc action.

From-SVN: r2491
parent 2740a678
...@@ -664,20 +664,24 @@ objc-runtime: libobjc.a ...@@ -664,20 +664,24 @@ objc-runtime: libobjc.a
# Build the Objective C runtime library. Build the Objc compiler first! # Build the Objective C runtime library. Build the Objc compiler first!
libobjc.a: cc1obj libgcc2.ready libobjc.a: cc1obj libgcc2.ready
thisdir1=`pwd`; \ thisdir1=`pwd`; \
cd $(srcdir); srcdir1=`pwd`; \ srcdir1=`cd $(srcdir); pwd`; \
cd objc; \ cd objc; \
$(MAKE) $(MAKEFLAGS) -f $(srcdir)/objc/Makefile libobjc.a \ $(MAKE) $(MAKEFLAGS) -f $$srcdir1/objc/Makefile libobjc.a \
srcdir=$$srcdir1 tooldir=$(tooldir) AR=$(AR) AR_FLAGS=$(AR_FLAGS) \ srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
GCC_FOR_TARGET=$$thisdir1/$(GCC_FOR_TARGET) \ GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
GCC_CFLAGS="$(GCC_CFLAGS)" GCC_CFLAGS="$(GCC_CFLAGS)"
ln objc/libobjc.a . ln objc/libobjc.a .
-if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
# This is used by objc/Makefile if the user runs that directly. # This is used by objc/Makefile if the user runs that directly.
sublibobjc.a: cc1obj libgcc2.ready sublibobjc.a: cc1obj libgcc2.ready
cd objc; make $(MAKEFLAGS) -f $(srcdir)/objc/Makefile libobjc.a \ thisdir1=`pwd`; \
srcdir=$(srcdir) tooldir=$(tooldir) AR=$(AR) AR_FLAGS=$(AR_FLAGS) \ srcdir1=`cd $(srcdir); pwd`; \
GCC_FOR_TARGET=$(GCC_FOR_TARGET) GCC_CFLAGS=$(GCC_CFLAGS) cd objc; \
$(MAKE) $(MAKEFLAGS) -f $$srcdir1/objc/Makefile libobjc.a \
srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
GCC_CFLAGS="$(GCC_CFLAGS)"
# Compile two additional files that are linked with every program # Compile two additional files that are linked with every program
# linked using GCC on system V, for the sake of C++ constructors. # linked using GCC on system V, for the sake of C++ constructors.
...@@ -1256,7 +1260,8 @@ $(srcdir)/INSTALL: install1.texi install.texi ...@@ -1256,7 +1260,8 @@ $(srcdir)/INSTALL: install1.texi install.texi
mostlyclean: mostlyclean:
-rm -f $(STAGESTUFF) -rm -f $(STAGESTUFF)
# Clean the objc subdir. # Clean the objc subdir.
cd objc; make $(MAKEFLAGS) -f $(srcdir)/objc/Makefile mostlyclean srcdir1=`cd $(srcdir); pwd`; \
cd objc; $(MAKE) $(MAKEFLAGS) -f $$srcdir1/objc/Makefile mostlyclean
# Delete the temporary source copies for cross compilation. # Delete the temporary source copies for cross compilation.
-rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
-rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
......
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