From: Michael Lukashov <michael.lukashov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Makefile: fix compilation of test programs under MinGW environment
Date: Sun, 28 Feb 2010 02:03:35 +0300 [thread overview]
Message-ID: <63cde7731002271503oac53237ubed6d318b46042e9@mail.gmail.com> (raw)
In-Reply-To: <7vmxyupbpa.fsf@alter.siamese.dyndns.org>
Hi,
On Sun, Feb 28, 2010 at 1:15 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Michael Lukashov <michael.lukashov@gmail.com> writes:
>>
>>> Commit 225f78c8 (Merge branch 'master' of git://repo.or.cz/alt-git
>>> into jn/autodep, 2010-01-26) changed Makefile in such a way that
>>> the following error occurs when trying to compile Git under MinGW environment:
>>>
>>> make: *** No rule to make target `test-chmtime', needed by `all'. Stop.
>>>
>>> Under Linux it seems there's no difference between two variants.
>>
>>> -TEST_PROGRAMS := $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
>>> +TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
>>
>> If the difference were on the RHS of this definition, which does involve
>> $X that is different between the two platforms, I would understand, but
>> your patch looks like it is addressing difference between := vs =, and
>> that is more like a difference of other parts of the Makefile than
>> difference between Linux and mingw compilation environment.
>
> Ok, I think I know what happend.
>
> We used to have the definition of TEST_PROGRAMS way later than where we
> currently have it, and it was for a reason. X is to be defined to be .exe
> in the platform specific section for MinGW (and probably Cygwin as well).
>
> But because the definition of TEST_PROGRAMS was moved way up, it needs to
> be recursively expanded.
>
> TEST_OBJS also uses $X in simple expansion (i.e. sets with := not with =),
> so I expect that it has the same issue. Can you check and verify?
>
>
It seems there's no difference between
TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
and
TEST_OBJS = $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
Both variants seem to work under mingw.
next prev parent reply other threads:[~2010-02-27 23: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 [this message]
2010-02-28 9:03 ` [PATCH 1/2] Makefile: fix definition of $(TEST_PROGRAMS) on Windows Jonathan Nieder
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=63cde7731002271503oac53237ubed6d318b46042e9@mail.gmail.com \
--to=michael.lukashov@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).