diff options
author | Po Lu <luangruo@yahoo.com> | 2023-02-19 21:52:21 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-02-19 21:52:21 +0800 |
commit | 585ee91b21fb6f1889226b5861333410275dc017 (patch) | |
tree | 309abc8ce39ff119a353d6ef1f903428d12ad1c1 /cross | |
parent | f3196052070999ef9f9c822a676443b14df6a0e6 (diff) | |
download | emacs-585ee91b21fb6f1889226b5861333410275dc017.tar.gz |
More fixes to parallel Make
* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_MODULES)
(NDK_BUILD_SHARED, NDK_BUILD_STATIC): Define group rule to build
all files so that they are built within one make process.
* java/Makefile.in: Reorganize cross compilation and make sure
there is only one make subprocess for each subdirectory of
cross.
Diffstat (limited to 'cross')
-rw-r--r-- | cross/ndk-build/ndk-build.mk.in | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/cross/ndk-build/ndk-build.mk.in b/cross/ndk-build/ndk-build.mk.in index 5b0aa82856d..57006901721 100644 --- a/cross/ndk-build/ndk-build.mk.in +++ b/cross/ndk-build/ndk-build.mk.in @@ -17,7 +17,8 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -# This file is included all over the place to build prerequisites. +# This file is included all over the place to get and build +# prerequisites. NDK_BUILD_MODULES = @NDK_BUILD_MODULES@ NDK_BUILD_CXX_SHARED = @NDK_BUILD_CXX_SHARED@ @@ -33,6 +34,10 @@ endef # imports a module and also declares it in LOCAL_SHARED_LIBRARIES. NDK_BUILD_MODULES := $(call uniqify,$(NDK_BUILD_MODULES)) +# Here are all of the files to build. +NDK_BUILD_ALL_FILES := $(foreach file,$(NDK_BUILD_MODULES), \ + $(top_builddir)/cross/ndk-build/$(file)) + # The C++ standard library must be extracted from the Android NDK # directories and included in the application package, if any module # requires the C++ standard library. @@ -42,10 +47,6 @@ NDK_BUILD_SHARED += $(NDK_BUILD_CXX_SHARED) endif define subr-1 - -$(top_builddir)/cross/ndk-build/$(1): - $(MAKE) -C $(top_builddir)/cross/ndk-build $(1) - ifeq ($(suffix $(1)),.so) NDK_BUILD_SHARED += $(top_builddir)/cross/ndk-build/$(1) else @@ -53,9 +54,15 @@ ifeq ($(suffix $(1)),.a) NDK_BUILD_STATIC += $(top_builddir)/cross/ndk-build/$(1) endif endif - endef # Generate rules for each module. $(foreach module,$(NDK_BUILD_MODULES),$(eval $(call subr-1,$(module)))) + +# Generate rules to build everything now. +# Make sure to use the top_builddir currently defined. + +NDK_TOP_BUILDDIR := $(top_builddir) +$(NDK_BUILD_ALL_FILES) &: + $(MAKE) -C $(NDK_TOP_BUILDDIR)/cross/ndk-build $(NDK_BUILD_MODULES) |