From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, "Jeff King" <peff@peff.net>,
"Phillip Wood" <phillip.wood@dunelm.org.uk>,
"SZEDER Gábor" <szeder.dev@gmail.com>,
"Adam Dinwoodie" <adam@dinwoodie.org>,
"Patrick Steinhardt" <ps@pks.im>
Subject: Re: [PATCH v2 0/3] some unit-test Makefile polishing
Date: Fri, 02 Feb 2024 17:32:42 -0800 [thread overview]
Message-ID: <xmqqjznmtjr9.fsf@gitster.g> (raw)
In-Reply-To: <b7b92f1a-9231-2f53-299e-ad58fc699284@gmx.de> (Johannes Schindelin's message of "Sat, 3 Feb 2024 00:52:16 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> The line 753 of that file (as can be seen at
> https://github.com/git/git/blob/38aa6559b0c513d755d6d5ccf32414ed63754726/config.mak.uname#L753)
Ouch. When it is laid out like this it is very obvious why this is
broken, and what its workaround should be.
Thanks. Let's queue this on top.
------- >8 ------------- >8 ------------- >8 ------------- >8 -------
Subject: [PATCH] t/Makefile: say the default target upfront
Similar to how 2731d048 (Makefile: say the default target upfront.,
2005-12-01) added the default target to the very beginning of the
main Makefile to prevent a random rule that happens to be defined
first in an included makefile fragments from becoming the default
target, protect this Makefile the same way.
This started to matter as we started to include config.mak.uname
and that included makefile fragment does more than defining Make
macros, unfortunately.
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/t/Makefile b/t/Makefile
index 281f4c3534..2d95046f26 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
# Import tree-wide shared Makefile behavior and libraries
include ../shared.mak
@@ -52,7 +55,7 @@ UNIT_TESTS = $(sort $(filter-out unit-tests/bin/t-basic%,$(UNIT_TEST_PROGRAMS)))
# scripts not to run the external "chainlint.pl" script themselves
CHAINLINTSUPPRESS = GIT_TEST_EXT_CHAIN_LINT=0 && export GIT_TEST_EXT_CHAIN_LINT &&
-all: $(DEFAULT_TEST_TARGET)
+all:: $(DEFAULT_TEST_TARGET)
test: pre-clean check-chainlint $(TEST_LINT)
$(CHAINLINTSUPPRESS) $(MAKE) aggregate-results-and-cleanup
--
2.43.0-522-g2a540e432f
next prev parent reply other threads:[~2024-02-03 1:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 3:15 [PATCH 0/2] some unit-test Makefile polishing Jeff King
2024-01-29 3:18 ` [PATCH 1/2] Makefile: use order-only prereq for UNIT_TEST_BIN Jeff King
2024-01-29 20:22 ` SZEDER Gábor
2024-01-29 22:06 ` Junio C Hamano
2024-01-30 5:21 ` Jeff King
2024-01-29 3:19 ` [PATCH 2/2] t/Makefile: get UNIT_TESTS list from C sources Jeff King
2024-01-29 11:26 ` Patrick Steinhardt
2024-01-29 17:49 ` Jeff King
2024-01-29 21:31 ` Adam Dinwoodie
2024-01-30 0:27 ` Junio C Hamano
2024-01-30 5:25 ` Jeff King
2024-01-31 19:13 ` Adam Dinwoodie
2024-01-30 5:23 ` Jeff King
2024-01-29 21:51 ` Junio C Hamano
2024-01-30 5:37 ` [PATCH v2 0/3] some unit-test Makefile polishing Jeff King
2024-01-30 5:37 ` [PATCH v2 1/3] Makefile: use mkdir_p_parent_template for UNIT_TEST_BIN Jeff King
2024-01-30 5:38 ` [PATCH v2 2/3] Makefile: remove UNIT_TEST_BIN directory with "make clean" Jeff King
2024-01-30 5:40 ` [PATCH v2 3/3] t/Makefile: get UNIT_TESTS list from C sources Jeff King
2024-01-31 22:58 ` Junio C Hamano
2024-02-01 10:50 ` Phillip Wood
2024-02-02 1:20 ` [PATCH v2 0/3] some unit-test Makefile polishing Junio C Hamano
2024-02-02 23:52 ` Johannes Schindelin
2024-02-03 1:32 ` Junio C Hamano [this message]
2024-02-04 4:41 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqjznmtjr9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=adam@dinwoodie.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=phillip.wood@dunelm.org.uk \
--cc=ps@pks.im \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).