Re: [PATCH 01/12] Introduce Git.pm (v4)
- From
Petr Baudis <pasky@suse.cz>
- Date
- Jun 24, 2006, 11:52 UTC
- Message-ID
- <20060624115227.GS21864@pasky.or.cz>
- In-Reply-To
- <20060624111657.GR21864@pasky.or.cz>
Dear diary, on Sat, Jun 24, 2006 at 01:16:57PM CEST, I got a letter where Petr Baudis <pasky@suse.cz> said that...
Show 10 quoted lines
> $(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@suse.cz>
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.