From 21469fc904ab4efdb6093ef209d688b0e765c497 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 7 Jun 2024 21:39:01 +0800 Subject: [PATCH] Eliminate Makefile race * java/Makefile.in (cf-stamp): Don't separately depend on NDK_BUILD_SHARED, as this renders make liable to descend into cross/ndk-build twice in different processes. (clean): Don't remove nonexistent file. (cherry picked from commit f1c9a32a234085683f5f713ac91fed5ecf768095) --- java/Makefile.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/Makefile.in b/java/Makefile.in index 9b515ad28e0..83df6384650 100644 --- a/java/Makefile.in +++ b/java/Makefile.in @@ -358,7 +358,11 @@ public static final String[] EMACS_SHARED_LIBRARIES\ # all shared libraries are compiled, because the computation of # ALL_DEPENDENCIES in this instance of Make cannot be postponed until # that stage. -cf-stamp: $(NDK_BUILD_SHARED) $(CROSS_LIBS) +# +# This recipe needs no dependency on $(NDK_BUILD_LIBS), since +# $(CROSS_LIBS) is a phony target that itself guarantees that they are +# up to date. +cf-stamp: $(CROSS_LIBS) $(AM_V_EMACSCONFIG) $(MAKE) cf-stamp-1 $(AM_V_at) touch $@ $(CONFIG_FILE): cf-stamp; @true @@ -432,4 +436,4 @@ clean: find . -name '*.class' $(FIND_DELETE) maintainer-clean distclean bootstrap-clean: clean - rm -f Makefile ndk-build.mk + rm -f Makefile -- 2.39.5