]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix parallel compilation of Android port
authorPo Lu <luangruo@yahoo.com>
Sun, 19 Feb 2023 12:45:32 +0000 (20:45 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 19 Feb 2023 12:45:32 +0000 (20:45 +0800)
* cross/Makefile.in ($(top_builddir)/lib/libgnu.a):
* java/Makefile.in (CROSS_LIBS): Explicitly depend on gnulib
to prevent it from being built at the same time from different
jobs.

cross/Makefile.in
java/Makefile.in

index fc047fd57bd99b72cc16ee24c4531c7c5537b576..c059fda1e3c130243f69dd9ee6aa5b60986e2af6 100644 (file)
@@ -80,11 +80,11 @@ $(top_builddir)/lib/libgnu.a:
        $(MAKE) -C $(top_builddir)/lib libgnu.a
 
 .PHONY: $(top_builddir)/lib-src/make-fingerprint
-$(top_builddir)/lib-src/make-fingerprint:
+$(top_builddir)/lib-src/make-fingerprint: $(top_builddir)/lib/libgnu.a
        $(MAKE) -C $(top_builddir)/lib-src make-fingerprint
 
 .PHONY: $(top_builddir)/lib-src/make-docfile
-$(top_builddir)/lib-src/make-docfile:
+$(top_builddir)/lib-src/make-docfile: $(top_builddir)/lib/libgnu.a
        $(MAKE) -C $(top_builddir)/lib-src make-docfile
 
 PRE_BUILD_DEPS=$(top_builddir)/lib/libgnu.a            \
index f732c9211ee47e8b8aae32451c634cf8323f0aa3..91feb53e96b4a0f9f75a0be52bc11446ceac0bb7 100644 (file)
@@ -121,17 +121,25 @@ CROSS_BINS = ../cross/src/android-emacs ../cross/lib-src/ctags    \
 # Libraries to cross-compile.
 CROSS_LIBS = ../cross/src/libemacs.so
 
+# Make sure gnulib is built first!
+# If not, then the recursive invocations of make below will try to
+# build gnulib at the same time.
+CROSS_ARCHIVES = ../cross/lib/libgnu.a
+
 # Third party libraries to compile.
 include $(top_builddir)/cross/ndk-build/ndk-build.mk
 
-.PHONY: $(CROSS_BINS) $(CROSS_LIBS)
+.PHONY: $(CROSS_BINS) $(CROSS_LIBS) $(CROSS_ARCHIVES)
 
-../cross/src/android-emacs ../cross/src/libemacs.so:
-       make -C ../cross src/$(notdir $@)
+../cross/src/android-emacs ../cross/src/libemacs.so: $(CROSS_ARCHIVES)
+       $(MAKE) -C ../cross src/$(notdir $@)
 
 ../cross/lib-src/hexl ../cross/lib-src/movemail \
-../cross/lib-src/ctags ../cross/lib-src/ebrowse &:
-       make -C ../cross lib-src/$(notdir $@)
+../cross/lib-src/ctags ../cross/lib-src/ebrowse &: $(CROSS_ARCHIVES)
+       $(MAKE) -C ../cross lib-src/$(notdir $@)
+
+../cross/lib/libgnu.a:
+       $(MAKE) -C ../cross lib/libgnu.a
 
 # This is needed to generate the ``.directory-tree'' file used by the
 # Android emulations of readdir and faccessat.