Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

26 lines
1.0 KiB
Diff

diff --git a/make/PreInit.gmk b/make/PreInit.gmk
index 3df44308dd..490d7c24e9 100644
--- a/make/PreInit.gmk
+++ b/make/PreInit.gmk
@@ -60,13 +60,19 @@
# Extract non-global targets that require a spec file.
CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
+# GNU make-4.4 (and later) include not just single-letter form of the
+# options MAKEFILES but also long for and even some of the arguments.
+# Skip long form and use only short form:
+# MAKEFLAGS=' --debug=basic -- LOG=trace ...'
+MAKEFLAGS_SINGLE_LETTER := $(firstword -$(MAKEFLAGS))
+
# If we have only global targets, or if we are called with -qp (assuming an
# external part, e.g. bash completion, is trying to understand our targets),
# we will skip SPEC location and the sanity checks.
ifeq ($(CALLED_SPEC_TARGETS), )
SKIP_SPEC := true
endif
-ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
+ifeq ($(findstring p, $(MAKEFLAGS_SINGLE_LETTER))$(findstring q, $(MAKEFLAGS_SINGLE_LETTER)), pq)
SKIP_SPEC := true
endif