From f3196052070999ef9f9c822a676443b14df6a0e6 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 19 Feb 2023 21:25:37 +0800 Subject: [PATCH] More parallel build fixes * cross/Makefile.in: (.PHONY): * java/Makefile.in: (.PHONY): * src/Makefile.in: (libemacs.so): Avoid calling ndk-build from two places at once. Build android-emacs separately from libemacs.so. --- cross/Makefile.in | 10 +++++++--- java/Makefile.in | 5 +++-- src/Makefile.in | 9 +++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cross/Makefile.in b/cross/Makefile.in index c059fda1e3c..ac23b2e23f5 100644 --- a/cross/Makefile.in +++ b/cross/Makefile.in @@ -149,9 +149,13 @@ src/Makefile src/config.h &: $(top_builddir)/src/config.h.android \ sed -i 's/-I\$$(top_srcdir)\/lib//g' src/Makefile .PHONY: src/android-emacs src/libemacs.so -src/android-emacs src/libemacs.so &: src/Makefile src/config.h \ - src/verbose.mk lib/libgnu.a $(PRE_BUILD_DEPS) - $(MAKE) -C src android-emacs libemacs.so + +src/libemacs.so: src/Makefile src/config.h src/verbose.mk \ + lib/libgnu.a $(PRE_BUILD_DEPS) + $(MAKE) -C src libemacs.so + +src/android-emacs: src/Makefile src/config.h $(PRE_BUILD_DEPS) + $(MAKE) -C src android-emacs lib-src/Makefile: $(top_builddir)/lib-src/Makefile.android $(AM_V_GEN) mkdir -p src lib-src diff --git a/java/Makefile.in b/java/Makefile.in index 91feb53e96b..52e0a7a75f1 100644 --- a/java/Makefile.in +++ b/java/Makefile.in @@ -149,10 +149,11 @@ $(libsrc)/asset-directory-tool: # install_tmp is a directory used to generate emacs.apk-in. # That is then packaged into $(APK_NAME). +# There is no need to depend on NDK_BUILD_SHARED as libemacs.so +# does already. .PHONY: install_temp install_temp/assets/directory-tree -install_temp: $(CROSS_BINS) $(CROSS_LIBS) $(NDK_BUILD_SHARED) \ - $(RESOURCE_FILES) +install_temp: $(CROSS_BINS) $(CROSS_LIBS) $(RESOURCE_FILES) $(AM_V_GEN) # Make the working directory for this stuff $(AM_V_SILENT) rm -rf install_temp diff --git a/src/Makefile.in b/src/Makefile.in index d5d979a9bd3..da348812eb7 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -770,12 +770,13 @@ libemacs.so: $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \ $(AM_V_at)$(MAKE_PDUMPER_FINGERPRINT) $@ # There is also a binary named `android-emacs' which simply calls -# emacs.so. +# emacs.so. It need not link against libemacs because app_process +# will do that instead. -android-emacs: libemacs.so android-emacs.c +android-emacs: android-emacs.c $(AM_V_CCLD)$(CC) $(lastword $^) -o $@ \ - $(ALL_CFLAGS) $(LDFLAGS) \ - $(LIBEGNU_ARCHIVE) -L. "-l:libemacs.so" + $(ALL_CFLAGS) $(LDFLAGS) \ + $(LIBEGNU_ARCHIVE) endif ## The following oldxmenu-related rules are only (possibly) used if -- 2.39.5