git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Philip Oakley" <philipoakley@iee.org>
To: "Philip Oakley" <philipoakley@iee.org>,
	"Junio C Hamano" <gitster@pobox.com>
Cc: "GitList" <git@vger.kernel.org>,
	"MsysGitList" <msysgit@googlegroups.com>
Subject: Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue
Date: Tue, 14 Jul 2015 23:42:13 +0100	[thread overview]
Message-ID: <0D1AA32B8D59471B8C528002A460E912@PhilipOakley> (raw)
In-Reply-To: 45344004B4CA4B16BD7FB174B4849D77@PhilipOakley

From: "Philip Oakley" <philipoakley@iee.org>
Sent: Friday, June 26, 2015 12:34 AM
> From: "Junio C Hamano" <gitster@pobox.com>
>> "Philip Oakley" <philipoakley@iee.org> writes:
>>
>>> From: "Junio C Hamano" <gitster@pobox.com>
>>>>
>>>> I am not sure what this patch is trying to achieve.

I have been able to repeat the issue, more below.

>>>
>>> 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'....
>>
>> Then this part applies, I think.
>>
>>>> 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?

The command sequence:
 $ git clean -dfx
 $ make -n MSVC=1 V=1 2>ErrsFile.txt 1>MakeDry.txt

produces the error
 make[1]: *** No rule to make target 'PM.stamp', needed by 'perl.mak'. 
Stop.
 make: *** [perl/perl.mak] Error 2

the actual MakeDry.txt reaches

 echo "$FLAGS" >GIT-CFLAGS; \
            fi
 make[2]: Leaving directory '/c/msysgit195/git'
 make[1]: Leaving directory '/c/msysgit195/git/perl'
 Makefile:1758: recipe for target 'perl/perl.mak' failed

My understanding of the error is that, first, the PM.stamp is removed by 
the clean, then the dryrun has by the error time passed the initial 
PM.stamp update code, but doesn't execute it (being a dry run), thus the 
file PM.stamp still does not exist.

The makefile then descends into the 'perl/Makefile' pre-requisite to 
'perl/perl.mak', and (IIUC) at this point the L25#$(makfile): PM.stamp 
then barfs because there is no PM.stamp to be a prerequisite for that 
line.

As noted in the patch, my response at the time (not fully understanding 
why) was simply to annotate the Makefile's PM.stamp (which is where the 
error would first leads any future debugging).

Possibly other options would be to add an extra PM.stamp target which, 
for a dry-run (+recipe), creates any empty PM.stamp file if one does not 
exist, simply to allow the perl/perl.mak to succeed. Or perhaps simply 
add the PM.stamp file to the code (or maybe not).

A third option would be to simply convert the PM.stamp recipe to a 
+recipe so that it's executed during the dry-run, but that may be 
contrary to the idea of being a dry-run.

Do you have any preference for how I should resolve this? Ideally I like 
to drop the use of the NO_PERL in the dry run.

--
Philip

>>
> I was more of the view that this was about prevention (here), rather
> than retrospective explanation of the code (there).
>
> In my case the errors were showing problems with the PM.stamp in the
> makefile (I didn't have the solution at that point).
>
> So either a short comment "#  consider using 'NO_PERL=YesPlease' for 
> dry
> run invocations" (beware your double negative ;-), or the addition of
> the '+recipe', would still be my preferred change, rather than leaving
> the open manhole for others to fall into.
>
> The thread on my difficulties is at $gmane/263656 (2015-02-10 22:51)
> "
>    At the moment I'm getting (on my old WinXP machine, using Msysgit
>    1.9.5 as a basis)
>
>    $ make -n MSVC=1 V=1 1>makedry.txt
>    make[1]: *** No rule to make target `PM.stamp', needed by 
> `perl.mak'.
>    Stop.
>    make: *** [perl/perl.mak] Error 2
> "
> As you can see, at that time the place to look would be the makefile,
> so I would do think a 'fix' there would still be appropriate.
>
> Do you have a preference among the three options (comment, +recipe, 
> drop)?
> --
> Philip
>

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  reply	other threads:[~2015-07-14 22:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
2015-06-25  0:03 ` [PATCH 01/17] .gitignore: improve MSVC ignore patterns Philip Oakley
2015-06-25 15:13   ` Junio C Hamano
2015-06-25 19:32     ` Philip Oakley
2015-06-25 20:22       ` Junio C Hamano
2015-06-25  0:03 ` [PATCH 02/17] .gitignore: ignore library directories created by MSVC VS2008 buildsystem Philip Oakley
2015-06-25  0:03 ` [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID Philip Oakley
2015-06-28  3:05   ` Eric Sunshine
2015-06-28  8:44     ` Philip Oakley
2015-06-25  0:03 ` [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue Philip Oakley
2015-06-25 15:24   ` Junio C Hamano
2015-06-25 19:33     ` Philip Oakley
2015-06-25 20:21       ` Junio C Hamano
2015-06-25 23:34         ` Philip Oakley
2015-07-14 22:42           ` Philip Oakley [this message]
2015-06-25  0:03 ` [PATCH 05/17] engine.pl: fix error message (lib->link) Philip Oakley
2015-06-25  0:03 ` [PATCH 06/17] engine.pl: Avoid complications with perl support Philip Oakley
2015-06-25  0:03 ` [PATCH 07/17] engine.pl: Properly accept quoted spaces in filenames Philip Oakley
2015-06-25  0:03 ` [PATCH 08/17] engine.pl: Fix i18n -o option in msvc buildsystem generator Philip Oakley
2015-06-25  0:03 ` [PATCH 09/17] engine.pl: ignore invalidcontinue.obj which is known to MSVC Philip Oakley
2015-06-25  0:03 ` [PATCH 10/17] engine.pl: name the msvc buildsystem's makedry error file Philip Oakley
2015-06-25  0:03 ` [PATCH 11/17] engine.pl: delete the captured stderr file if empty Philip Oakley
2015-06-25  0:03 ` [PATCH 12/17] engine.pl: add debug line to capture the dry-run Philip Oakley
2015-06-25  0:03 ` [PATCH 13/17] engine.pl: provide more debug print statements Philip Oakley
2015-06-29 21:27   ` Sebastian Schuberth
2015-07-07 22:18     ` Philip Oakley
2015-06-29 21:31   ` Sebastian Schuberth
2015-06-29 21:33   ` Sebastian Schuberth
2015-06-25  0:03 ` [PATCH 14/17] Vcproj.pm: list git.exe first to be startup project Philip Oakley
2015-06-25  0:03 ` [PATCH 15/17] vcbuild/readme: Improve layout and reference msvc-build script Philip Oakley
2015-06-25  0:03 ` [PATCH 16/17] msvc-build: add complete Microsoft Visual C compilation script Philip Oakley
2015-06-25  0:03 ` [PATCH 17/17] config.mak.uname: add MSVC No_SafeExeceptionHandler option Philip Oakley
2015-06-25 15:10 ` [PATCH 00/17] Make the msvc-build scripts work again Junio C Hamano
2015-06-25 19:31   ` Philip Oakley

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0D1AA32B8D59471B8C528002A460E912@PhilipOakley \
    --to=philipoakley@iee.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=msysgit@googlegroups.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).