From 1996afa70ff430b01a9133d77ae8aa6925077952 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 1 Apr 2022 13:00:52 +0200 Subject: [PATCH] prepare_ports: prevent regeneration of aclocal.m4 Related to #4350 Fixes #4467 --- tool/ports/mk/install.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tool/ports/mk/install.mk b/tool/ports/mk/install.mk index 9fe3a570a9b..69dc6cb25ed 100644 --- a/tool/ports/mk/install.mk +++ b/tool/ports/mk/install.mk @@ -266,10 +266,12 @@ _extract_function = $(call _assert,\ # because it requires a specific automake version on the host. # # We rename the rule target to discharge this magic and keep using the -# provided 'Makefile.in'. +# provided 'Makefile.in'. A similar quirk is required for 'aclocal.m4'. # +_DISCHARGE_PATTERN = /Makefile\.in:.*Makefile\.am/s/^/IGNORE-/ +_DISCHARGE_PATTERN += ;/(ACLOCAL_M4):.*am__aclocal_m4_deps)/s/^/IGNORE-/ _discharge_automake = ( find $(DIR) -name "Makefile.in" |\ - xargs -r sed -i "/Makefile\.in:.*Makefile\.am/s/^/IGNORE-/" ) + xargs -r sed -i "$(_DISCHARGE_PATTERN)" ) %.archive: %.file @$(MSG_EXTRACT)"$(ARCHIVE) ($*)"