git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: fix compilation of test programs under MinGW environment

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 27, 2010, 22:15 UTC
Message-ID
<7vmxyupbpa.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vy6ietlf7.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> 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?

Previous: Michael LukashovNext: Michael Lukashov
Message 4 of 8 in “Makefile: fix compilation of test programs under MinGW environment”
  1. Makefile: fix compilation of test programs under MinGW environmentMichael Lukashov, Feb 27, 2010
  2. Junio C HamanoFeb 27, 2010
  3. Michael LukashovFeb 27, 2010
  4. Junio C HamanoFeb 27, 2010
  5. Michael LukashovFeb 27, 2010
  6. 1/2 Makefile: fix definition of $(TEST_PROGRAMS) on WindowsJonathan Nieder, Feb 28, 2010
  7. 2/2 Makefile: clarify definition of TEST_OBJSJonathan Nieder, Feb 28, 2010
  8. Junio C HamanoFeb 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.