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

Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue

From
Philip Oakley <philipoakley@iee.org>
Date
Jun 25, 2015, 19:33 UTC
Message-ID
<DBFC4D88D6F34023BA43F5F10134331E@PhilipOakley>
In-Reply-To
<xmqq8ub724ls.fsf@gitster.dls.corp.google.com>
From: "Junio C Hamano" <gitster@pobox.com>
Show 12 quoted lines
> Philip Oakley <philipoakley@iee.org> writes:
>
>> A 'make -n' dry-run is used as part of the /compat/vcbuild and
>> /contrib/buildsystems code. The commit ee9be06 (perl: detect new 
>> files
>> in MakeMaker builds, 2012-07-27) was not aware of that dry-run usage
>> and thus would not execute the target.
>>
>> Add a comment to the make file stating the issue and the available
>> solutions of either NO_PERL or a '+recipe'.
>
> I am not sure what this patch is trying to achieve.

It was probably a bit of 'don't mess with working code', given that I'd used the NO_PERL solution, rather 'document the issue'. The issue had me stuck for a while. The possible use of '+' came later when driving down through the Makefile manual.

Show 13 quoted lines
>
> If you are not touching what this Makefile actually does, then I
> would imagine that you are running the "buildsystems code" that
> actually drives 'make -n' with some "available solution" (perhaps
> you are running 'make -n NO_PERL=NoThanks' or something like that)?
> Then instead of a command like this that nobody would read in this
> file, the same command can instead go there to explain what the
> "workaround" (e.g. unusual-looking 'make -n NO_PERL=NoThanks') is
> doing?
>
> I suspect you mean by +recipe that you modify this makefile to make
> such a workaround unnecessary?  If that is the case, why isn't such
> a change actually be done with this commit, instead of a comment?

Yes. See above about the lack of 'fearless coding'; been working in real world engineering too long ;-)

Show 37 quoted lines
>
> I am not sure what this patch is trying to achieve.
>
> Puzzled...
>
>>
>> Signed-off-by: Philip Oakley <philipoakley@iee.org>
>> ---
>>  Makefile | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Makefile b/Makefile
>> index 149f1c7..22108bb 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1746,6 +1746,9 @@ $(SCRIPT_PERL_GEN): perl/perl.mak
>>
>>  perl/perl.mak: perl/PM.stamp
>>
>> +# 'make -n' (dry-run) will not execute this target which 
>> creates/updates the PM.stamp file.
>> +# To avoid the error of failing to find the target PM.stamp, either 
>> use NO_PERL=1 (YesPlease),
>> +# or add a leading '+' to the recipe '+$(QUIET_GEN)$(FIND) perl ...' 
>> so that it is executed.
>>  perl/PM.stamp: FORCE
>>  @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
>>  { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
>> -- 
>> 2.3.1
>>
>> -- 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 34 in “Make the msvc-build scripts work again”
  1. 00/17 Make the msvc-build scripts work againPhilip Oakley, Jun 25, 2015
  2. 01/17 .gitignore: improve MSVC ignore patternsPhilip Oakley, Jun 25, 2015
  3. Junio C HamanoJun 25, 2015
  4. Philip OakleyJun 25, 2015
  5. Junio C HamanoJun 25, 2015
  6. 02/17 .gitignore: ignore library directories created by MSVC VS2008 buildsystemPhilip Oakley, Jun 25, 2015
  7. 03/17 (msvc-build) Vcproj.pm: remove duplicate GUIDPhilip Oakley, Jun 25, 2015
  8. Eric SunshineJun 28, 2015
  9. Philip OakleyJun 28, 2015
  10. 04/17 Makefile: a dry-run can error out if no perl. Document the issuePhilip Oakley, Jun 25, 2015
  11. Junio C HamanoJun 25, 2015
  12. Philip OakleyJun 25, 2015
  13. Junio C HamanoJun 25, 2015
  14. Philip OakleyJun 25, 2015
  15. Philip OakleyJul 14, 2015
  16. 05/17 engine.pl: fix error message (lib->link)Philip Oakley, Jun 25, 2015
  17. 06/17 engine.pl: Avoid complications with perl supportPhilip Oakley, Jun 25, 2015
  18. 07/17 engine.pl: Properly accept quoted spaces in filenamesPhilip Oakley, Jun 25, 2015
  19. 08/17 engine.pl: Fix i18n -o option in msvc buildsystem generatorPhilip Oakley, Jun 25, 2015
  20. 09/17 engine.pl: ignore invalidcontinue.obj which is known to MSVCPhilip Oakley, Jun 25, 2015
  21. 10/17 engine.pl: name the msvc buildsystem's makedry error filePhilip Oakley, Jun 25, 2015
  22. 11/17 engine.pl: delete the captured stderr file if emptyPhilip Oakley, Jun 25, 2015
  23. 12/17 engine.pl: add debug line to capture the dry-runPhilip Oakley, Jun 25, 2015
  24. 13/17 engine.pl: provide more debug print statementsPhilip Oakley, Jun 25, 2015
  25. Sebastian SchuberthJun 29, 2015
  26. Philip OakleyJul 7, 2015
  27. Sebastian SchuberthJun 29, 2015
  28. Sebastian SchuberthJun 29, 2015
  29. 14/17 Vcproj.pm: list git.exe first to be startup projectPhilip Oakley, Jun 25, 2015
  30. 15/17 vcbuild/readme: Improve layout and reference msvc-build scriptPhilip Oakley, Jun 25, 2015
  31. 16/17 msvc-build: add complete Microsoft Visual C compilation scriptPhilip Oakley, Jun 25, 2015
  32. 17/17 config.mak.uname: add MSVC No_SafeExeceptionHandler optionPhilip Oakley, Jun 25, 2015
  33. Junio C HamanoJun 25, 2015
  34. Philip OakleyJun 25, 2015

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.