Dear diary, on Sat, Jun 24, 2006 at 01:16:57PM CEST, I got a letter where Petr Baudis <pasky@xxxxxxx> said that... > $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl > rm -f $@ $@+ > sed -e '1s|#!.*perl\(.*\)|#!$(PERL_PATH_SQ)\1 -I'"$$(make -s -C perl instlibdir)"'|' \ > -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ > $@.perl >$@+ > chmod +x $@+ > mv $@+ $@ > > (This is also why I was a bit confused by your make test patch - it does > not "fix" anything per se since no tests directly use Git.pm.) And this makes the Perl scripts work even without make install: Signed-off-by: Petr Baudis <pasky@xxxxxxx> diff --git a/Makefile b/Makefile index 7842195..d614f18 100644 --- a/Makefile +++ b/Makefile @@ -509,7 +509,9 @@ common-cmds.h: Documentation/git-*.txt $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl rm -f $@ $@+ - sed -e '1s|#!.*perl\(.*\)|#!$(PERL_PATH_SQ)\1 -I'"$$(make -s -C perl instlibdir)"'|' \ + sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \ + -e '2i\ + use lib qw ('"$$(make -s -C perl instlibdir)"' '"$$(pwd)"'/perl/blib/lib);' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ $@.perl >$@+ chmod +x $@+ diff --git a/perl/Makefile.PL b/perl/Makefile.PL index 54e8b20..2cbd227 100644 --- a/perl/Makefile.PL +++ b/perl/Makefile.PL @@ -2,6 +2,9 @@ use ExtUtils::MakeMaker; sub MY::postamble { return <<'MAKE_FRAG'; +all:: + cp blib/arch/auto/Git/* blib/lib/auto/Git/ + instlibdir: @echo $(INSTALLSITELIB) -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ A person is just about as big as the things that make them angry. - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html