Subject: bug#68545: warnings from GNU Make 3.81

From: Po Lu <[email-masked]>
Date: Thu, 18 Jan 2024 08:50:41 +0800

Eli Zaretskii <[email-masked]> writes:

> The &: feature was introduced in GNU Make 4.3, and we don't want to
> force people to use such new versions.  So please find a different
> solution for what you need to do there, one that doesn't require Make
> newer than 3.81.

This is a harmless warning message that doesn't affect the execution of
the `clean' target itself.  It's not necessary to address this or
support Make 3.81 for building the Android port, because Makefiles
provided by the Android.mk build system require versions of Make which
support group targets.

If suppressing the warning is still a concern, please try this patch:

diff --git a/java/Makefile.in b/java/Makefile.in
index 60bd2ea086b..af2989d8f3b 100644
--- a/java/Makefile.in
+++ b/java/Makefile.in
@@ -47,6 +47,7 @@ ANDROID_SDK_8_OR_EARLIER =
 WARN_JAVAFLAGS = @WARN_JAVAFLAGS@
 JAVAFLAGS = $(WARN_JAVAFLAGS) -classpath "$(ANDROID_JAR):$(srcdir)"
 FIND_DELETE = @FIND_DELETE@
+ANDROID = @ANDROID@
 
 # Android 4.3 and earlier require Emacs to be signed with a different
 # digital signature algorithm.
@@ -145,6 +146,7 @@ CROSS_ARCHIVES =
 
 .PHONY: $(CROSS_BINS) $(CROSS_LIBS) $(CROSS_ARCHIVES)
 
+ifeq ($(ANDROID),yes)
 # There should only be a single invocation of $(MAKE) -C
 # $(top_srcdir)/cross for each directory under $(top_srcdir)/cross.
 $(CROSS_SRC_BINS) $(CROSS_LIBS) &: $(CROSS_ARCHIVES)
@@ -269,6 +271,7 @@ emacs.apk-in:
 	  $(AAPT) add ../$@ `find lib -type f`;		\
 	popd &> /dev/null
 	$(AM_V_SILENT) rm -rf install_temp
+endif
 
 # Makefile itself.
 .PRECIOUS: $(top_srcdir)/config.status Makefile
@@ -291,6 +294,7 @@ $(RESOURCE_FILE):
 # Make all class files depend on R.java being built.
 $(CLASS_FILES): $(RESOURCE_FILE)
 
+ifeq ($(ANDROID),yes)
 .SUFFIXES: .java .class
 $(CLASS_FILES) &: $(JAVA_FILES)
 	$(AM_V_JAVAC) $(JAVAC) $(JAVAFLAGS) $(JAVA_FILES)
@@ -320,6 +324,7 @@ $(APK_NAME):
 # Signing must happen after alignment!
 	$(AM_V_SILENT) $(APKSIGNER) $(SIGN_EMACS_V2) $@
 	$(AM_V_SILENT) rm -f $@.unaligned *.idsig
+endif
 
 # TAGS generation.

Thanks.