git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	"Michael G. Schwern" <schwern@pobox.com>,
	git@vger.kernel.org, robbat2@gentoo.org,
	bwalton@artsci.utoronto.ca
Subject: Re: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.
Date: Fri, 27 Jul 2012 20:07:03 +0000	[thread overview]
Message-ID: <20120727200703.GA2034@dcvr.yhbt.net> (raw)
In-Reply-To: <7vlii51xz4.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> What was happening was that originally, pu had ms/makefile-pl but
> not ms/git-svn-pm.  Hence, perl/Git/SVN.pm did not exist.  I ran
> "make" and it created perl/perl.mak that does not know about
> Git/SVN.pm;
> 
> Then ms/git-svn-pm is merged to pu and now we have perl/Git/SVN.pm.
> But there is nothing in ms/makefile-pl that says on what files
> perl.mak depends on.
> 
> I think there needs to be a dependency in to recreate perl/perl.mak
> when any of the *.pm files are changed, perhaps like this.
> 
> I am not sure why perl/perl.mak is built by the top-level Makefile,
> instead of just using "$(MAKE) -C perl/", though...

I'm not sure why perl/perl.mak is built by the top-level Makefile,
either.

I'll put the following after ms/makefile-pl but before ms/git-svn-pm:

>From a6ea2301d1bb6fd7c7415fed3aa7673542a563bd Mon Sep 17 00:00:00 2001
From: Junio C Hamano <gitster@pobox.com>
Date: Fri, 27 Jul 2012 20:04:20 +0000
Subject: [PATCH] perl: detect new files in MakeMaker builds

While Makefile.PL now finds .pm files on its own, it does not
detect new files after it generates perl/perl.mak.

[ew: commit message]

ref: http://mid.gmane.org/7vlii51xz4.fsf@alter.siamese.dyndns.org

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 Makefile      | 7 +++++++
 perl/Makefile | 1 +
 2 files changed, 8 insertions(+)

diff --git a/Makefile b/Makefile
index b0b3493..e2a4ac7 100644
--- a/Makefile
+++ b/Makefile
@@ -2090,6 +2090,13 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
 ifndef NO_PERL
 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
 
+perl/perl.mak: perl/PM.stamp
+
+perl/PM.stamp: FORCE
+	$(QUIET_GEN)find perl -type f -name '*.pm' | sort >$@+ && \
+	{ cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
+	$(RM) $@+
+
 perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
 	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
 
diff --git a/perl/Makefile b/perl/Makefile
index 8493d76..4969ef8 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -20,6 +20,7 @@ clean:
 	$(RM) ppport.h
 	$(RM) $(makfile)
 	$(RM) $(makfile).old
+	$(RM) PM.stamp
 
 ifdef NO_PERL_MAKEMAKER
 instdir_SQ = $(subst ','\'',$(prefix)/lib)
-- 
Eric Wong

  reply	other threads:[~2012-07-27 20:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 23:22 Extract Git::SVN from git-svn, take 2 Michael G. Schwern
2012-07-26 23:22 ` [PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN Michael G. Schwern
2012-07-27  5:18   ` Junio C Hamano
2012-07-27  8:19     ` Michael G Schwern
2012-07-27 11:34     ` Eric Wong
2012-07-26 23:22 ` [PATCH 2/4] Prepare Git::SVN for extraction into its own file Michael G. Schwern
2012-07-27  5:18   ` Junio C Hamano
2012-07-27  5:23     ` Junio C Hamano
2012-07-27  8:16     ` Michael G Schwern
2012-07-27 11:53       ` Eric Wong
2012-07-26 23:22 ` [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN Michael G. Schwern
2012-07-27  5:18   ` Junio C Hamano
2012-07-27  5:38     ` Jonathan Nieder
2012-07-27  6:07       ` Junio C Hamano
2012-07-27  6:46         ` Junio C Hamano
2012-07-27  7:09           ` Junio C Hamano
2012-07-27 20:07             ` Eric Wong [this message]
2012-07-27 20:56               ` Michael G Schwern
2012-07-27 20:59                 ` Eric Wong
2012-07-27 21:31                 ` Junio C Hamano
2012-07-27 21:49               ` Junio C Hamano
2012-07-27 22:07                 ` Eric Wong
2012-07-27 22:19                   ` Eric Wong
2012-07-27 22:37                     ` Junio C Hamano
2012-07-27 22:45                       ` Eric Wong
2012-07-27 22:59                         ` Junio C Hamano
2012-07-27 23:01                           ` Eric Wong
2012-07-27 22:52                     ` Junio C Hamano
2012-07-27 11:59         ` Eric Wong
2012-07-27  8:41     ` Michael G Schwern
  -- strict thread matches above, loose matches on Subject: below --
2012-07-25  6:01 Move Git::SVN into its own .pm file Michael G. Schwern
2012-07-25  6:01 ` [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN Michael G. Schwern

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=20120727200703.GA2034@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=robbat2@gentoo.org \
    --cc=schwern@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).