Bug 603214: Build NSPR in parallel. The patch is contributed by Kyle Huey NSPR_HEAD_20101013
authorwtc%google.com
Wed, 13 Oct 2010 00:52:53 +0000
changeset 4278 922b6c2fff9f84e07023bfafff51502b6fa9b02c
parent 4277 70bd678ab93026a41ba276c11bc90a6773be0da7
child 4279 628205c3f0b208d51085c0f5e8dc71d7cfb75085
push idunknown
push userunknown
push dateunknown
bugs603214
Bug 603214: Build NSPR in parallel. The patch is contributed by Kyle Huey <khuey@kylehuey.com>. r=wtc. Modified Files: Makefile.in pr/src/Makefile.in
Makefile.in
pr/src/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,18 +40,16 @@
 
 MOD_DEPTH	= .
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(MOD_DEPTH)/config/autoconf.mk
 
-MAKE := $(patsubst -j%,,$(MAKE)) -j1
-
 DIRS = config pr lib
 
 ifdef MOZILLA_CLIENT
 # Make nsinstall use absolute symlinks by default for Mozilla OSX builds
 # http://bugzilla.mozilla.org/show_bug.cgi?id=193164
 ifeq ($(OS_ARCH),Darwin)
 ifndef NSDISTMODE
 NSDISTMODE=absolute_symlink
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -375,22 +375,29 @@ ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
 else
 	$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
 endif
 #
 # Version information generation (end)
 #
 
 
+# We use a 'build' target here to ensure that we build $(TARGETS) after
+# looping over $(DIRS) to create the object files in a parallel build.
+# Recipe commands are executed sequentially in a parallel build while
+# target dependencies are executed in parallel.
+export::
+	$(MAKE) build
+
 #
 # The Client build wants the shared libraries in $(dist_bindir)
 # so we also install them there.
 #
 
-export:: $(TARGETS)
+build:: $(TARGETS)
 	$(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
 ifdef SHARED_LIBRARY
 ifeq ($(OS_ARCH),HP-UX)
 	$(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
 	$(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir)
 else
 	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)
 endif