All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Philip Oakley <philipoakley@iee.org>, Git List <git@vger.kernel.org>
Cc: Eric Wong <normalperson@yhbt.net>,
	Junio C Hamano <gitster@pobox.com>,
	 Git MsysGit <msysgit@googlegroups.com>
Subject: Re: Missing inversion in Makefile (ee9be06)
Date: Sat, 27 Dec 2014 20:07:01 +0100	[thread overview]
Message-ID: <549F0355.5020805@kdbg.org> (raw)
In-Reply-To: <E3DB9AD2A8914C379FB3371494B0B816@PhilipOakley>

Am 27.12.2014 um 19:49 schrieb Philip Oakley:
> Hi,
> 
> In ee9be06 (perl: detect new files in MakeMaker builds, 2012-07-27)
> there is a step to detect if there has been an update to the PM.* files,
> however it appears that the logic is inverted in the comparison.
> 
> I need some extra eye's on this to be sure I have it right (I'm trying
> to debug an old Windows breakage...).
> 
> The resultant output of a make dry run included (on my m/c)..:
> 
>  find perl -type f -name '*.pm' | sort >perl/PM.stamp+ && \
>   { cmp perl/PM.stamp+ perl/PM.stamp >/dev/null 2>/dev/null || mv
> perl/PM.stamp+ perl/PM.stamp; } && \
>   rm -f perl/PM.stamp+
>  make -C perl  PERL_PATH='/usr/bin/perl' prefix='/c/Documents and
> Settings/Philip' perl.mak
> 
> Shouldn't it be `{ ! cmp ` so that when the files are not identical, the
> move is performed?
> 
> https://github.com/git/git/blob/ee9be06770223238c6a22430eb874754dd22dfb0/Makefile#L2097

The existing code looks correct to me. cmp succeeds when the files are
identical and fails when they are different: When it succeeds (files are
equal), the mv is not executed. When it fails, either because a file
does not exist or they are different, the mv is executed.

-- Hannes

-- 
-- 
*** 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:[~2014-12-27 19:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 18:49 Missing inversion in Makefile (ee9be06) Philip Oakley
2014-12-27 19:07 ` Johannes Sixt [this message]
2014-12-27 20:17   ` Philip Oakley
2015-02-10 22:51     ` [msysGit] " 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

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

  git send-email \
    --in-reply-to=549F0355.5020805@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=msysgit@googlegroups.com \
    --cc=normalperson@yhbt.net \
    --cc=philipoakley@iee.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.