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

Re: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 27, 2012, 07:09 UTC
Message-ID
<7vlii51xz4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vpq7h1z1q.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 29 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> t91XX series seem to fail in 'pu' with "Can't locate Git/SVN.pm in
>> @INC" for me.  I see perl/blib/lib/Git/SVN/ directory and files
>> under it, but there is no perl/blib/lib/Git/SVN.pm installed.  I see
>> Git/I18N.pm and Git/SVN/Ra.pm (and friends) mentioned in
>> perl/perl.mak generated by MakeMaker, but Git/SVN.pm does not appear
>> anywhere.
>> 
>> I think it is some interaction with other topics, as the tip of
>> ms/git-svn-pm topic that parks this series does not exhibit the
>> symptom, but it is getting late for me already, so I won't dig into
>> this further.
>
> Actually there is no difference between ms/git-svn-pm and pu in perl/
> directory. I _think_ there is some dependency missing that makes
> this sequence break:
>
> 	(in one repository)
> 	git checkout pu ;# older pu without ms/git-svn-pm
>         make ; make test
>
> 	(in another repository that shares the refs)
> 	git checkout pu
>         git merge ms/git-svn-pm
>
> 	(in the first repository)
>         git reset --hard ;# update the working tree
>         make ; make test

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...

 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 6ca7d47..d6f8478 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)
Previous: Junio C HamanoNext: Eric Wong
Message 16 of 30 in “Extract Git::SVN from git-svn, take 2.”
  1. Michael G. SchwernJul 26, 2012
  2. 1/4 Extract some utilities from git-svn to allow extracting Git::SVN.Michael G. Schwern, Jul 26, 2012
  3. Junio C HamanoJul 27, 2012
  4. Michael G SchwernJul 27, 2012
  5. Eric WongJul 27, 2012
  6. 2/4 Prepare Git::SVN for extraction into its own file.Michael G. Schwern, Jul 26, 2012
  7. Junio C HamanoJul 27, 2012
  8. Junio C HamanoJul 27, 2012
  9. Michael G SchwernJul 27, 2012
  10. Eric WongJul 27, 2012
  11. 4/4 Move initialization of Git::SVN variables into Git::SVN.Michael G. Schwern, Jul 26, 2012
  12. Junio C HamanoJul 27, 2012
  13. Jonathan NiederJul 27, 2012
  14. Junio C HamanoJul 27, 2012
  15. Junio C HamanoJul 27, 2012
  16. Junio C HamanoJul 27, 2012
  17. Eric WongJul 27, 2012
  18. Michael G SchwernJul 27, 2012
  19. Eric WongJul 27, 2012
  20. Junio C HamanoJul 27, 2012
  21. Junio C HamanoJul 27, 2012
  22. Eric WongJul 27, 2012
  23. Eric WongJul 27, 2012
  24. Junio C HamanoJul 27, 2012
  25. Eric WongJul 27, 2012
  26. Junio C HamanoJul 27, 2012
  27. Eric WongJul 27, 2012
  28. Junio C HamanoJul 27, 2012
  29. Eric WongJul 27, 2012
  30. Michael G SchwernJul 27, 2012

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.