Makefile: replace perl/Makefile.PL with simple make rules

Replace the perl/Makefile.PL and the fallback perl/Makefile used under NO_PERL_MAKEMAKER=NoThanks with a much simpler implementation heavily inspired by how the i18n infrastructure's build process works[1]. The reason for having the Makefile.PL in the first place is that it was initially[2] building a perl C binding to interface with libgit, this functionality, that was removed[3] before Git.pm ever made it to the master branch. We've since since started maintaining a fallback perl/Makefile, as MakeMaker wouldn't work on some platforms[4]. That's just the tip of the iceberg. We have the PM.stamp hack in the top-level Makefile[5] to detect whether we need to regenerate the perl/perl.mak, which I fixed just recently to deal with issues like the perl version changing from under us[6]. There is absolutely no reason for why this needs to be so complex anymore. All we're getting out of this elaborate Rube Goldberg machine was copying perl/* to perl/blib/* as we do a string-replacement on the *.pm files to hardcode @@LOCALEDIR@@ in the source, as well as pod2man-ing Git.pm & friends. So replace the whole thing with something that's pretty much a copy of how we generate po/build/**.mo from po/*.po, just with a small sed(1) command instead of msgfmt. As that's being done rename the files from *.pm to *.pmc just to indicate that they're generated (see "perldoc -f require"). While I'm at it, change the fallback for Error.pm from being something where we'll ship our own Error.pm if one doesn't exist at build time to one where we just use a Git::Error wrapper that'll always prefer the system-wide Error.pm, only falling back to our own copy if it really doesn't exist at runtime. It's now shipped as Git::FromCPAN::Error, making it easy to add other modules to Git::FromCPAN::* in the future if that's needed. Functional changes: * This will not always install into perl's idea of its global "installsitelib". This only potentially matters for packagers that need to expose Git.pm for non-git use, and as explained in the INSTALL file there's a trivial workaround. * The scripts themselves will 'use lib' the target directory, but if INSTLIBDIR is set it overrides it. It doesn't have to be this way, it could be set in addition to INSTLIBDIR, but my reading of [7] is that this is the desired behavior. * We don't build man pages for all of the perl modules as we used to, only Git(3pm). As discussed on-list[8] that we were building installed manpages for purely internal APIs like Git::I18N or private-Error.pm was always a bug anyway, and all the Git::SVN::* ones say they're internal APIs. There are apparently external users of Git.pm, but I don't expect there to be any of the others. As a side-effect of these general changes the perl documentation now only installed by install-{doc,man}, not a mere "install" as before. 1. 5e9637c629 ("i18n: add infrastructure for translating Git with gettext", 2011-11-18) 2. b1edc53d06 ("Introduce Git.pm (v4)", 2006-06-24) 3. 18b0fc1ce1 ("Git.pm: Kill Git.xs for now", 2006-09-23) 4. f848718a69 ("Make perl/ build procedure ActiveState friendly.", 2006-12-04) 5. ee9be06770 ("perl: detect new files in MakeMaker builds", 2012-07-27) 6. c59c4939c2 ("perl: regenerate perl.mak if perl -V changes", 2017-03-29) 7. 0386dd37b1 ("Makefile: add PERLLIB_EXTRA variable that adds to default perl path", 2013-11-15) 8. 87bmjjv1pu.fsf@evledraar.booking.com ("Re: [PATCH] Makefile: replace perl/Makefile.PL with simple make rules" Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Dec 10, 2017 at 21:13 UTC 20d2a30f8ffe14deb09b4e6fc7b70ead53b315f0
14 files changed +106 -199
INSTALL
+16 -1
@@ -84,9 +84,24 @@ Issues of note:
84
85 GIT_EXEC_PATH=`pwd`
86 PATH=`pwd`:$PATH
87 - GITPERLLIB=`pwd`/perl/blib/lib
87 + GITPERLLIB=`pwd`/perl/build/lib
88 export GIT_EXEC_PATH PATH GITPERLLIB
89
90 + - By default (unless NO_PERL is provided) Git will ship various perl
91 + scripts & libraries it needs. However, for simplicity it doesn't
92 + use the ExtUtils::MakeMaker toolchain to decide where to place the
93 + perl libraries. Depending on the system this can result in the perl
94 + libraries not being where you'd like them if they're expected to be
95 + used by things other than Git itself.
96 +
97 + Manually supplying a perllibdir prefix should fix this, if this is
98 + a problem you care about, e.g.:
99 +
100 + prefix=/usr perllibdir=/usr/$(/usr/bin/perl -MConfig -wle 'print substr $Config{installsitelib}, 1 + length $Config{siteprefixexp}')
101 +
102 + Will result in e.g. perllibdir=/usr/share/perl/5.26.1 on Debian,
103 + perllibdir=/usr/share/perl5 (which we'd use by default) on CentOS.
104 +
105 - Git is reasonably self-sufficient, but does depend on a few external
106 programs and libraries. Git can be used without most of them by adding
107 the approriate "NO_<LIBRARY>=YesPlease" to the make command line or
Makefile
+36 -31
@@ -295,9 +295,6 @@ all::
295 #
296 # Define PERL_PATH to the path of your Perl binary (usually /usr/bin/perl).
297 #
298 -# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
299 -# MakeMaker (e.g. using ActiveState under Cygwin).
300 -#
298 # Define NO_PERL if you do not want Perl scripts or libraries at all.
299 #
300 # Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python
@@ -473,6 +470,7 @@ gitexecdir = libexec/git-core
470 mergetoolsdir = $(gitexecdir)/mergetools
471 sharedir = $(prefix)/share
472 gitwebdir = $(sharedir)/gitweb
473 +perllibdir = $(sharedir)/perl5
474 localedir = $(sharedir)/locale
475 template_dir = share/git-core/templates
476 htmldir = $(prefix)/share/doc/git-doc
@@ -486,7 +484,7 @@ mandir_relative = $(patsubst $(prefix)/%,%,$(mandir))
484 infodir_relative = $(patsubst $(prefix)/%,%,$(infodir))
485 htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))
486
489 -export prefix bindir sharedir sysconfdir gitwebdir localedir
487 +export prefix bindir sharedir sysconfdir gitwebdir perllibdir localedir
488
489 CC = cc
490 AR = ar
@@ -1525,9 +1523,6 @@ ifdef SHA1_MAX_BLOCK_SIZE
1523 LIB_OBJS += compat/sha1-chunked.o
1524 BASIC_CFLAGS += -DSHA1_MAX_BLOCK_SIZE="$(SHA1_MAX_BLOCK_SIZE)"
1525 endif
1528 -ifdef NO_PERL_MAKEMAKER
1529 - export NO_PERL_MAKEMAKER
1530 -endif
1526 ifdef NO_HSTRERROR
1527 COMPAT_CFLAGS += -DNO_HSTRERROR
1528 COMPAT_OBJS += compat/hstrerror.o
@@ -1714,8 +1709,10 @@ ETC_GITATTRIBUTES_SQ = $(subst ','\'',$(ETC_GITATTRIBUTES))
1709 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
1710 bindir_SQ = $(subst ','\'',$(bindir))
1711 bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
1712 +mandir_SQ = $(subst ','\'',$(mandir))
1713 mandir_relative_SQ = $(subst ','\'',$(mandir_relative))
1714 infodir_relative_SQ = $(subst ','\'',$(infodir_relative))
1715 +perllibdir_SQ = $(subst ','\'',$(perllibdir))
1716 localedir_SQ = $(subst ','\'',$(localedir))
1717 gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
1718 template_dir_SQ = $(subst ','\'',$(template_dir))
@@ -1824,9 +1821,6 @@ all::
1821 ifndef NO_TCLTK
1822 $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all
1823 $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
1827 -endif
1828 -ifndef NO_PERL
1829 - $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' localedir='$(localedir_SQ)' all
1824 endif
1825 $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) SHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'
1826
@@ -1907,7 +1901,8 @@ common-cmds.h: $(wildcard Documentation/git-*.txt)
1901
1902 SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
1903 $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
1910 - $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV)
1904 + $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV):\
1905 + $(perllibdir_SQ)
1906 define cmd_munge_script
1907 $(RM) $@ $@+ && \
1908 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
@@ -1951,29 +1946,17 @@ git.res: git.rc GIT-VERSION-FILE
1946 $(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
1947
1948 ifndef NO_PERL
1954 -$(SCRIPT_PERL_GEN): perl/perl.mak
1955 -
1956 -perl/perl.mak: perl/PM.stamp
1957 -
1958 -perl/PM.stamp: FORCE
1959 - @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
1960 - $(PERL_PATH) -V >>$@+ && \
1961 - { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
1962 - $(RM) $@+
1963 -
1964 -perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
1965 - $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
1949 +$(SCRIPT_PERL_GEN):
1950
1967 -PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
1968 -$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
1951 +PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
1952 +$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
1953 $(QUIET_GEN)$(RM) $@ $@+ && \
1970 - INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
1954 INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
1955 INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \
1956 sed -e '1{' \
1957 -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
1958 -e ' h' \
1976 - -e ' s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'"));=' \
1959 + -e ' s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'" || "'"$(perllibdir_SQ)"'"));=' \
1960 -e ' H' \
1961 -e ' x' \
1962 -e '}' \
@@ -2291,6 +2274,21 @@ endif
2274 po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
2275 $(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
2276
2277 +PMFILES := $(wildcard perl/*.pm perl/*/*.pm perl/*/*/*.pm perl/*/*/*/*.pm)
2278 +PMCFILES := $(patsubst perl/%.pm,perl/build/lib/%.pmc,$(PMFILES))
2279 +
2280 +ifndef NO_PERL
2281 +all:: $(PMCFILES)
2282 +endif
2283 +
2284 +perl/build/lib/%.pmc: perl/%.pm
2285 + $(QUIET_GEN)mkdir -p $(dir $@) && \
2286 + sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' < $< > $@
2287 +
2288 +perl/build/man/man3/Git.3pm: perl/Git.pm
2289 + $(QUIET_GEN)mkdir -p $(dir $@) && \
2290 + pod2man $< $@
2291 +
2292 FIND_SOURCE_FILES = ( \
2293 git ls-files \
2294 '*.[hcS]' \
@@ -2550,7 +2548,9 @@ ifndef NO_GETTEXT
2548 (cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -)
2549 endif
2550 ifndef NO_PERL
2553 - $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
2551 + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perllibdir_SQ)'
2552 + (cd perl/build/lib && $(TAR) cf - .) | \
2553 + (cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR) xof -)
2554 $(MAKE) -C gitweb install
2555 endif
2556 ifndef NO_TCLTK
@@ -2600,12 +2600,17 @@ endif
2600 install-gitweb:
2601 $(MAKE) -C gitweb install
2602
2603 -install-doc:
2603 +install-doc: install-man-perl
2604 $(MAKE) -C Documentation install
2605
2606 -install-man:
2606 +install-man: install-man-perl
2607 $(MAKE) -C Documentation install-man
2608
2609 +install-man-perl: perl/build/man/man3/Git.3pm
2610 + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mandir_SQ)/man3'
2611 + (cd perl/build/man/man3 && $(TAR) cf - .) | \
2612 + (cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR) xof -)
2613 +
2614 install-html:
2615 $(MAKE) -C Documentation install-html
2616
@@ -2697,7 +2702,7 @@ clean: profile-clean coverage-clean
2702 $(MAKE) -C Documentation/ clean
2703 ifndef NO_PERL
2704 $(MAKE) -C gitweb clean
2700 - $(MAKE) -C perl clean
2705 + $(RM) -r perl/build/
2706 endif
2707 $(MAKE) -C templates/ clean
2708 $(MAKE) -C t/ clean
contrib/examples/git-difftool.perl
+1 -1
@@ -13,7 +13,7 @@
13 use 5.008;
14 use strict;
15 use warnings;
16 -use Error qw(:try);
16 +use Git::Error qw(:try);
17 use File::Basename qw(dirname);
18 use File::Copy;
19 use File::Find;
git-send-email.perl
+1 -1
@@ -26,7 +26,7 @@ use Text::ParseWords;
26 use Term::ANSIColor;
27 use File::Temp qw/ tempdir tempfile /;
28 use File::Spec::Functions qw(catdir catfile);
29 -use Error qw(:try);
29 +use Git::Error qw(:try);
30 use Cwd qw(abs_path cwd);
31 use Git;
32 use Git::I18N;
perl/.gitignore
+1 -8
@@ -1,8 +1 @@
1 -perl.mak
2 -perl.mak.old
3 -MYMETA.json
4 -MYMETA.yml
5 -blib
6 -blibdirs
7 -pm_to_blib
8 -PM.stamp
1 +/build/
perl/Git.pm
+1 -1
@@ -101,7 +101,7 @@ increase notwithstanding).
101
102
103 use Carp qw(carp croak); # but croak is bad - throw instead
104 -use Error qw(:try);
104 +use Git::Error qw(:try);
105 use Cwd qw(abs_path cwd);
106 use IPC::Open2 qw(open2);
107 use Fcntl qw(SEEK_SET SEEK_CUR);
perl/Git/Error.pm new
+46
@@ -0,0 +1,46 @@
1 +package Git::Error;
2 +use 5.008;
3 +use strict;
4 +use warnings;
5 +
6 +=head1 NAME
7 +
8 +Git::Error - Wrapper for the L<Error> module, in case it's not installed
9 +
10 +=head1 DESCRIPTION
11 +
12 +Wraps the import function for the L<Error> module.
13 +
14 +This module is only intended to be used for code shipping in the
15 +C<git.git> repository. Use it for anything else at your peril!
16 +
17 +=cut
18 +
19 +sub import {
20 + shift;
21 + my $caller = caller;
22 +
23 + eval {
24 + require Error;
25 + 1;
26 + } or do {
27 + my $error = $@ || "Zombie Error";
28 +
29 + my $Git_Error_pm_path = $INC{"Git/Error.pm"} || die "BUG: Should have our own path from %INC!";
30 +
31 + require File::Basename;
32 + my $Git_Error_pm_root = File::Basename::dirname($Git_Error_pm_path) || die "BUG: Can't figure out lib/Git dirname from '$Git_Error_pm_path'!";
33 +
34 + require File::Spec;
35 + my $Git_pm_FromCPAN_root = File::Spec->catdir($Git_Error_pm_root, 'FromCPAN');
36 + die "BUG: '$Git_pm_FromCPAN_root' should be a directory!" unless -d $Git_pm_FromCPAN_root;
37 +
38 + local @INC = ($Git_pm_FromCPAN_root, @INC);
39 + require Error;
40 + };
41 +
42 + local @_ = ($caller, @_);
43 + goto &Error::import;
44 +}
45 +
46 +1;
perl/Git/FromCPAN/Error.pm renamed
perl/Git/I18N.pm
+1 -1
@@ -18,7 +18,7 @@ our @EXPORT_OK = @EXPORT;
18
19 sub __bootstrap_locale_messages {
20 our $TEXTDOMAIN = 'git';
21 - our $TEXTDOMAINDIR = $ENV{GIT_TEXTDOMAINDIR} || '++LOCALEDIR++';
21 + our $TEXTDOMAINDIR = $ENV{GIT_TEXTDOMAINDIR} || '@@LOCALEDIR@@';
22
23 require POSIX;
24 POSIX->import(qw(setlocale));
perl/Makefile deleted
-90
@@ -1,90 +0,0 @@
1 -#
2 -# Makefile for perl support modules and routine
3 -#
4 -makfile:=perl.mak
5 -modules =
6 -
7 -PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
8 -prefix_SQ = $(subst ','\'',$(prefix))
9 -localedir_SQ = $(subst ','\'',$(localedir))
10 -
11 -ifndef V
12 - QUIET = @
13 -endif
14 -
15 -all install instlibdir: $(makfile)
16 - $(QUIET)$(MAKE) -f $(makfile) $@
17 -
18 -clean:
19 - $(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
20 - $(RM) ppport.h
21 - $(RM) $(makfile)
22 - $(RM) $(makfile).old
23 - $(RM) PM.stamp
24 -
25 -$(makfile): PM.stamp
26 -
27 -ifdef NO_PERL_MAKEMAKER
28 -instdir_SQ = $(subst ','\'',$(prefix)/lib)
29 -
30 -modules += Git
31 -modules += Git/I18N
32 -modules += Git/IndexInfo
33 -modules += Git/Packet
34 -modules += Git/SVN
35 -modules += Git/SVN/Memoize/YAML
36 -modules += Git/SVN/Fetcher
37 -modules += Git/SVN/Editor
38 -modules += Git/SVN/GlobSpec
39 -modules += Git/SVN/Log
40 -modules += Git/SVN/Migration
41 -modules += Git/SVN/Prompt
42 -modules += Git/SVN/Ra
43 -modules += Git/SVN/Utils
44 -
45 -$(makfile): ../GIT-CFLAGS Makefile
46 - echo all: private-Error.pm Git.pm Git/I18N.pm > $@
47 - set -e; \
48 - for i in $(modules); \
49 - do \
50 - if test $$i = $${i%/*}; \
51 - then \
52 - subdir=; \
53 - else \
54 - subdir=/$${i%/*}; \
55 - fi; \
56 - echo ' $(RM) blib/lib/'$$i'.pm' >> $@; \
57 - echo ' mkdir -p blib/lib'$$subdir >> $@; \
58 - echo ' cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
59 - done
60 - echo ' $(RM) blib/lib/Error.pm' >> $@
61 - '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
62 - echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
63 - echo install: >> $@
64 - set -e; \
65 - for i in $(modules); \
66 - do \
67 - if test $$i = $${i%/*}; \
68 - then \
69 - subdir=; \
70 - else \
71 - subdir=/$${i%/*}; \
72 - fi; \
73 - echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
74 - echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
75 - echo ' cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
76 - done
77 - echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
78 - '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
79 - echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
80 - echo instlibdir: >> $@
81 - echo ' echo $(instdir_SQ)' >> $@
82 -else
83 -$(makfile): Makefile.PL ../GIT-CFLAGS
84 - $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
85 -endif
86 -
87 -# this is just added comfort for calling make directly in perl dir
88 -# (even though GIT-CFLAGS aren't used yet. If ever)
89 -../GIT-CFLAGS:
90 - $(MAKE) -C .. GIT-CFLAGS
perl/Makefile.PL deleted
-62
@@ -1,62 +0,0 @@
1 -use strict;
2 -use warnings;
3 -use ExtUtils::MakeMaker;
4 -use Getopt::Long;
5 -use File::Find;
6 -
7 -# Don't forget to update the perl/Makefile, too.
8 -# Don't forget to test with NO_PERL_MAKEMAKER=YesPlease
9 -
10 -# Sanity: die at first unknown option
11 -Getopt::Long::Configure qw/ pass_through /;
12 -
13 -my $localedir = '';
14 -GetOptions("localedir=s" => \$localedir);
15 -
16 -sub MY::postamble {
17 - return <<'MAKE_FRAG';
18 -instlibdir:
19 - @echo '$(INSTALLSITELIB)'
20 -
21 -ifneq (,$(DESTDIR))
22 -ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
23 -$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
24 - is likely incompatible with the DESTDIR mechanism. Try setting \
25 - NO_PERL_MAKEMAKER=1 instead)
26 -endif
27 -endif
28 -
29 -MAKE_FRAG
30 -}
31 -
32 -# Find all the .pm files in "Git/" and Git.pm
33 -my %pm;
34 -find sub {
35 - return unless /\.pm$/;
36 -
37 - # sometimes File::Find prepends a ./ Strip it.
38 - my $pm_path = $File::Find::name;
39 - $pm_path =~ s{^\./}{};
40 -
41 - $pm{$pm_path} = '$(INST_LIBDIR)/'.$pm_path;
42 -}, "Git", "Git.pm";
43 -
44 -
45 -# We come with our own bundled Error.pm. It's not in the set of default
46 -# Perl modules so install it if it's not available on the system yet.
47 -if ( !eval { require Error } || $Error::VERSION < 0.15009) {
48 - $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
49 -}
50 -
51 -# redirect stdout, otherwise the message "Writing perl.mak for Git"
52 -# disrupts the output for the target 'instlibdir'
53 -open STDOUT, ">&STDERR";
54 -
55 -WriteMakefile(
56 - NAME => 'Git',
57 - VERSION_FROM => 'Git.pm',
58 - PM => \%pm,
59 - PM_FILTER => qq[\$(PERL) -pe "s<\\Q++LOCALEDIR++\\E><$localedir>"],
60 - MAKEFILE => 'perl.mak',
61 - INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
62 -);
t/perf/aggregate.perl
+1 -1
@@ -1,6 +1,6 @@
1 #!/usr/bin/perl
2
3 -use lib '../../perl/blib/lib';
3 +use lib '../../perl/build/lib';
4 use strict;
5 use warnings;
6 use Git;
t/test-lib.sh
+1 -1
@@ -919,7 +919,7 @@ then
919 fi
920 fi
921
922 -GITPERLLIB="$GIT_BUILD_DIR"/perl/blib/lib:"$GIT_BUILD_DIR"/perl/blib/arch/auto/Git
922 +GITPERLLIB="$GIT_BUILD_DIR"/perl/build/lib
923 export GITPERLLIB
924 test -d "$GIT_BUILD_DIR"/templates/blt || {
925 error "You haven't built things yet, have you?"
wrap-for-bin.sh
+1 -1
@@ -14,7 +14,7 @@ else
14 GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
15 export GIT_TEMPLATE_DIR
16 fi
17 -GITPERLLIB='@@BUILD_DIR@@/perl/blib/lib'"${GITPERLLIB:+:$GITPERLLIB}"
17 +GITPERLLIB='@@BUILD_DIR@@/perl/build/lib'"${GITPERLLIB:+:$GITPERLLIB}"
18 GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale'
19 PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
20