From ea727bbf208db48adbb0f31bb98394a7815e17e6 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Fri, 16 Oct 1992 04:23:33 +0000 Subject: [PATCH] (libobjc.a): Get directories right, using shell vars thisdir1, srcdir1. Put quotes around $(GCC_CFLAGS). Use $(MAKE). From-SVN: r2485 --- gcc/Makefile.in | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 6f1f3b4992f..205bedae9c4 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -435,8 +435,8 @@ native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_C # Define the names for selecting languages in LANGUAGES. C c: cc1 C++ c++: cc1plus -OBJC objc: cc1obj -OBJECTIVE-C objective-c: cc1obj +OBJC objc: cc1obj objc-runtime +OBJECTIVE-C objective-c: cc1obj objc-runtime PROTO: proto # Really, really stupid make features, such as SUN's KEEP_STATE, may force @@ -659,6 +659,25 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2) # so that libgcc.a itself remains nonexistent if compilation is aborted. mv tmplibgcc.a libgcc.a +objc-runtime: libobjc.a + +# Build the Objective C runtime library. Build the Objc compiler first! +libobjc.a: cc1obj libgcc2.ready + thisdir1=`pwd`; \ + cd $(srcdir); srcdir1=`pwd`; \ + cd objc; \ + $(MAKE) $(MAKEFLAGS) -f $(srcdir)/objc/Makefile libobjc.a \ + srcdir=$$srcdir1 tooldir=$(tooldir) AR=$(AR) AR_FLAGS=$(AR_FLAGS) \ + GCC_FOR_TARGET=$$thisdir1/$(GCC_FOR_TARGET) \ + GCC_CFLAGS="$(GCC_CFLAGS)" + ln objc/libobjc.a . + -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi + +# This is used by objc/Makefile if the user runs that directly. +sublibobjc.a: cc1obj libgcc2.ready + cd objc; make $(MAKEFLAGS) -f $(srcdir)/objc/Makefile libobjc.a \ + srcdir=$(srcdir) tooldir=$(tooldir) AR=$(AR) AR_FLAGS=$(AR_FLAGS) \ + GCC_FOR_TARGET=$(GCC_FOR_TARGET) GCC_CFLAGS=$(GCC_CFLAGS) # Compile two additional files that are linked with every program # linked using GCC on system V, for the sake of C++ constructors. @@ -1236,6 +1255,8 @@ $(srcdir)/INSTALL: install1.texi install.texi mostlyclean: -rm -f $(STAGESTUFF) +# Clean the objc subdir. + cd objc; make $(MAKEFLAGS) -f $(srcdir)/objc/Makefile mostlyclean # 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)alloca.c $(HOST_PREFIX_1)malloc.c @@ -1619,6 +1640,7 @@ gcc.xtar: doc c-parse.y objc-parse.y # which has the name that we want to have in the tar file. mkdir tmp mkdir tmp/config + mkdir tmp/objc for file in *[0-9a-zA-Z+]; do \ ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \ done @@ -1626,6 +1648,10 @@ gcc.xtar: doc c-parse.y objc-parse.y for file in *[0-9a-zA-Z+]; do \ ln $$file ../tmp/config >/dev/null 2>&1 || cp $$file ../tmp/config; \ done + cd objc; \ + for file in *[0-9a-zA-Z+]; do \ + ln $$file ../tmp/config >/dev/null 2>&1 || cp $$file ../tmp/config; \ + done ln .gdbinit tmp mv tmp gcc-$(version) # Get rid of everything we don't want in the distribution. -- 2.30.2