Pass job server arguments (-jX) to make.
authorStewart Miles <smiles@google.com>
Fri, 13 Nov 2015 02:16:45 +0000 (18:16 -0800)
committerStewart Miles <smiles@google.com>
Fri, 13 Nov 2015 02:25:24 +0000 (18:25 -0800)
When $(MAKE) is expanded via a macro "make" doesn't know whether
$(MAKE) refers to an instance of the make app and therefore doesn't
pass job server arguments down.  This change adds the + prefix to the
command in the receipe in order to indicate $(MAKE) is another instance of
make.

Tested:
Verified flatc builds in parallel from Android builds.

Change-Id: I9f2f4f9680b818fdda7420a75a8bfa995b4644db

android/jni/include.mk

index cf6322d..417f667 100644 (file)
@@ -102,8 +102,11 @@ endef
 endif
 ifeq (Linux,$(PROJECT_OS))
 define build_flatc_recipe
-       mkdir -p bin && cd bin && $(CMAKE) $(FLATBUFFERS_CMAKELISTS_DIR) \
-         && $(MAKE) flatc
+       +mkdir -p bin && \
+      cd bin && \
+      $(CMAKE) \
+      $(FLATBUFFERS_CMAKELISTS_DIR) && \
+      $(MAKE) flatc
 endef
 endif
 ifeq (Darwin,$(PROJECT_OS))