From: Jonathan Nieder <jrnieder@gmail.com>
To: Michael Lukashov <michael.lukashov@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: [PATCH 1/2] Makefile: fix definition of $(TEST_PROGRAMS) on Windows
Date: Sun, 28 Feb 2010 03:03:12 -0600 [thread overview]
Message-ID: <20100228090311.GA30143@progeny.tock> (raw)
In-Reply-To: <63cde7731002271503oac53237ubed6d318b46042e9@mail.gmail.com>
From: Michael Lukashov <michael.lukashov@gmail.com>
Commit ea92519 (build dashless "bin-wrappers" directory similar to
installed bindir, 2009-12-02) replaced the definition of
TEST_PROGRAMS with a macro:
TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
and commit daa99a9 (Makefile: make sure test helpers are rebuilt when
headers change, 2010-01-26) moved the (unchanged, non-macro)
definition of TEST_PROGRAMS earlier so it could be used in two
different sections of the Makefile.
The merge 225f78 resolving these two changes unfortunately snuck in an
optimization while at it: it replaced the delayed-evaluation =
operator with an immediate := assignment:
TEST_PROGRAMS := $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
Such a change would have been safe when TEST_PROGRAMS was defined
towards the bottom of the makefile, but in its new location before
the platform-specific definitions, $(X) is not yet defined. Thus
the following error occurs when trying to compile Git in Windows:
make: *** No rule to make target `test-chmtime', needed by `all'. Stop.
or if X is set to a nonempty value in config.mak.
So change the operator back to =. This makes TEST_PROGRAMS more
similar to PROGRAMS and the other macros defined with delayed
evaluation in that section.
Thanks to Junio for the analysis.
Signed-off-by: Michael Lukashov <michael.lukashov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Thanks for the catch! Here’s a longer explanation.
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 93e1a92..b64eec1 100644
--- a/Makefile
+++ b/Makefile
@@ -418,7 +418,7 @@ TEST_PROGRAMS_NEED_X += test-sha1
TEST_PROGRAMS_NEED_X += test-sigchain
TEST_PROGRAMS_NEED_X += test-index-version
-TEST_PROGRAMS := $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
+TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
# List built-in command $C whose implementation cmd_$C() is not in
# builtin-$C.o but is linked in as part of some other command.
--
1.7.0
next prev parent reply other threads:[~2010-02-28 9:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-27 21:09 [PATCH] Makefile: fix compilation of test programs under MinGW environment Michael Lukashov
2010-02-27 21:31 ` Junio C Hamano
2010-02-27 21:40 ` Michael Lukashov
2010-02-27 22:15 ` Junio C Hamano
2010-02-27 23:03 ` Michael Lukashov
2010-02-28 9:03 ` Jonathan Nieder [this message]
2010-02-28 9:11 ` [PATCH 2/2] Makefile: clarify definition of TEST_OBJS Jonathan Nieder
2010-02-28 21:17 ` Junio C Hamano
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=20100228090311.GA30143@progeny.tock \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=michael.lukashov@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).