Merge branch 'ab/simplify-perl-makefile'
The build procedure for perl/ part has been greatly simplified by weaning ourselves off of MakeMaker. * ab/simplify-perl-makefile: perl: treat PERLLIB_EXTRA as an extra path again perl: avoid *.pmc and fix Error.pm further Makefile: replace perl/Makefile.PL with simple make rulesmaint
commit
ed1b87ef91
17
INSTALL
17
INSTALL
|
@ -84,9 +84,24 @@ Issues of note:
|
||||||
|
|
||||||
GIT_EXEC_PATH=`pwd`
|
GIT_EXEC_PATH=`pwd`
|
||||||
PATH=`pwd`:$PATH
|
PATH=`pwd`:$PATH
|
||||||
GITPERLLIB=`pwd`/perl/blib/lib
|
GITPERLLIB=`pwd`/perl/build/lib
|
||||||
export GIT_EXEC_PATH PATH GITPERLLIB
|
export GIT_EXEC_PATH PATH GITPERLLIB
|
||||||
|
|
||||||
|
- By default (unless NO_PERL is provided) Git will ship various perl
|
||||||
|
scripts & libraries it needs. However, for simplicity it doesn't
|
||||||
|
use the ExtUtils::MakeMaker toolchain to decide where to place the
|
||||||
|
perl libraries. Depending on the system this can result in the perl
|
||||||
|
libraries not being where you'd like them if they're expected to be
|
||||||
|
used by things other than Git itself.
|
||||||
|
|
||||||
|
Manually supplying a perllibdir prefix should fix this, if this is
|
||||||
|
a problem you care about, e.g.:
|
||||||
|
|
||||||
|
prefix=/usr perllibdir=/usr/$(/usr/bin/perl -MConfig -wle 'print substr $Config{installsitelib}, 1 + length $Config{siteprefixexp}')
|
||||||
|
|
||||||
|
Will result in e.g. perllibdir=/usr/share/perl/5.26.1 on Debian,
|
||||||
|
perllibdir=/usr/share/perl5 (which we'd use by default) on CentOS.
|
||||||
|
|
||||||
- Git is reasonably self-sufficient, but does depend on a few external
|
- Git is reasonably self-sufficient, but does depend on a few external
|
||||||
programs and libraries. Git can be used without most of them by adding
|
programs and libraries. Git can be used without most of them by adding
|
||||||
the approriate "NO_<LIBRARY>=YesPlease" to the make command line or
|
the approriate "NO_<LIBRARY>=YesPlease" to the make command line or
|
||||||
|
|
66
Makefile
66
Makefile
|
@ -294,9 +294,6 @@ all::
|
||||||
#
|
#
|
||||||
# Define PERL_PATH to the path of your Perl binary (usually /usr/bin/perl).
|
# Define PERL_PATH to the path of your Perl binary (usually /usr/bin/perl).
|
||||||
#
|
#
|
||||||
# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
|
|
||||||
# MakeMaker (e.g. using ActiveState under Cygwin).
|
|
||||||
#
|
|
||||||
# Define NO_PERL if you do not want Perl scripts or libraries at all.
|
# Define NO_PERL if you do not want Perl scripts or libraries at all.
|
||||||
#
|
#
|
||||||
# Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python
|
# Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python
|
||||||
|
@ -479,6 +476,7 @@ gitexecdir = libexec/git-core
|
||||||
mergetoolsdir = $(gitexecdir)/mergetools
|
mergetoolsdir = $(gitexecdir)/mergetools
|
||||||
sharedir = $(prefix)/share
|
sharedir = $(prefix)/share
|
||||||
gitwebdir = $(sharedir)/gitweb
|
gitwebdir = $(sharedir)/gitweb
|
||||||
|
perllibdir = $(sharedir)/perl5
|
||||||
localedir = $(sharedir)/locale
|
localedir = $(sharedir)/locale
|
||||||
template_dir = share/git-core/templates
|
template_dir = share/git-core/templates
|
||||||
htmldir = $(prefix)/share/doc/git-doc
|
htmldir = $(prefix)/share/doc/git-doc
|
||||||
|
@ -492,7 +490,7 @@ mandir_relative = $(patsubst $(prefix)/%,%,$(mandir))
|
||||||
infodir_relative = $(patsubst $(prefix)/%,%,$(infodir))
|
infodir_relative = $(patsubst $(prefix)/%,%,$(infodir))
|
||||||
htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))
|
htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))
|
||||||
|
|
||||||
export prefix bindir sharedir sysconfdir gitwebdir localedir
|
export prefix bindir sharedir sysconfdir gitwebdir perllibdir localedir
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
AR = ar
|
AR = ar
|
||||||
|
@ -1543,9 +1541,6 @@ ifdef SHA1_MAX_BLOCK_SIZE
|
||||||
LIB_OBJS += compat/sha1-chunked.o
|
LIB_OBJS += compat/sha1-chunked.o
|
||||||
BASIC_CFLAGS += -DSHA1_MAX_BLOCK_SIZE="$(SHA1_MAX_BLOCK_SIZE)"
|
BASIC_CFLAGS += -DSHA1_MAX_BLOCK_SIZE="$(SHA1_MAX_BLOCK_SIZE)"
|
||||||
endif
|
endif
|
||||||
ifdef NO_PERL_MAKEMAKER
|
|
||||||
export NO_PERL_MAKEMAKER
|
|
||||||
endif
|
|
||||||
ifdef NO_HSTRERROR
|
ifdef NO_HSTRERROR
|
||||||
COMPAT_CFLAGS += -DNO_HSTRERROR
|
COMPAT_CFLAGS += -DNO_HSTRERROR
|
||||||
COMPAT_OBJS += compat/hstrerror.o
|
COMPAT_OBJS += compat/hstrerror.o
|
||||||
|
@ -1732,8 +1727,10 @@ ETC_GITATTRIBUTES_SQ = $(subst ','\'',$(ETC_GITATTRIBUTES))
|
||||||
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
|
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
|
||||||
bindir_SQ = $(subst ','\'',$(bindir))
|
bindir_SQ = $(subst ','\'',$(bindir))
|
||||||
bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
|
bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
|
||||||
|
mandir_SQ = $(subst ','\'',$(mandir))
|
||||||
mandir_relative_SQ = $(subst ','\'',$(mandir_relative))
|
mandir_relative_SQ = $(subst ','\'',$(mandir_relative))
|
||||||
infodir_relative_SQ = $(subst ','\'',$(infodir_relative))
|
infodir_relative_SQ = $(subst ','\'',$(infodir_relative))
|
||||||
|
perllibdir_SQ = $(subst ','\'',$(perllibdir))
|
||||||
localedir_SQ = $(subst ','\'',$(localedir))
|
localedir_SQ = $(subst ','\'',$(localedir))
|
||||||
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
|
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
|
||||||
template_dir_SQ = $(subst ','\'',$(template_dir))
|
template_dir_SQ = $(subst ','\'',$(template_dir))
|
||||||
|
@ -1843,9 +1840,6 @@ all::
|
||||||
ifndef NO_TCLTK
|
ifndef NO_TCLTK
|
||||||
$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all
|
$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all
|
||||||
$(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
|
$(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
|
||||||
endif
|
|
||||||
ifndef NO_PERL
|
|
||||||
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' localedir='$(localedir_SQ)' all
|
|
||||||
endif
|
endif
|
||||||
$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) SHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'
|
$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) SHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'
|
||||||
|
|
||||||
|
@ -1928,7 +1922,8 @@ common-cmds.h: $(wildcard Documentation/git-*.txt)
|
||||||
|
|
||||||
SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
|
SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
|
||||||
$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
|
$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
|
||||||
$(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV)
|
$(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV):\
|
||||||
|
$(perllibdir_SQ)
|
||||||
define cmd_munge_script
|
define cmd_munge_script
|
||||||
$(RM) $@ $@+ && \
|
$(RM) $@ $@+ && \
|
||||||
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
|
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
|
||||||
|
@ -1972,23 +1967,12 @@ git.res: git.rc GIT-VERSION-FILE
|
||||||
$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
|
$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
|
||||||
|
|
||||||
ifndef NO_PERL
|
ifndef NO_PERL
|
||||||
$(SCRIPT_PERL_GEN): perl/perl.mak
|
$(SCRIPT_PERL_GEN):
|
||||||
|
|
||||||
perl/perl.mak: perl/PM.stamp
|
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
|
||||||
|
$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
|
||||||
perl/PM.stamp: FORCE
|
|
||||||
@$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
|
|
||||||
$(PERL_PATH) -V >>$@+ && \
|
|
||||||
{ 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)
|
|
||||||
|
|
||||||
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
|
|
||||||
$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
|
|
||||||
$(QUIET_GEN)$(RM) $@ $@+ && \
|
$(QUIET_GEN)$(RM) $@ $@+ && \
|
||||||
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
|
INSTLIBDIR='$(perllibdir_SQ)' && \
|
||||||
INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
|
INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
|
||||||
INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \
|
INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \
|
||||||
sed -e '1{' \
|
sed -e '1{' \
|
||||||
|
@ -2312,6 +2296,21 @@ endif
|
||||||
po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
|
po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
|
||||||
$(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
|
$(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
|
||||||
|
|
||||||
|
LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
|
||||||
|
LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
|
||||||
|
|
||||||
|
ifndef NO_PERL
|
||||||
|
all:: $(LIB_PERL_GEN)
|
||||||
|
endif
|
||||||
|
|
||||||
|
perl/build/lib/%.pm: perl/%.pm
|
||||||
|
$(QUIET_GEN)mkdir -p $(dir $@) && \
|
||||||
|
sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' < $< > $@
|
||||||
|
|
||||||
|
perl/build/man/man3/Git.3pm: perl/Git.pm
|
||||||
|
$(QUIET_GEN)mkdir -p $(dir $@) && \
|
||||||
|
pod2man $< $@
|
||||||
|
|
||||||
FIND_SOURCE_FILES = ( \
|
FIND_SOURCE_FILES = ( \
|
||||||
git ls-files \
|
git ls-files \
|
||||||
'*.[hcS]' \
|
'*.[hcS]' \
|
||||||
|
@ -2572,7 +2571,9 @@ ifndef NO_GETTEXT
|
||||||
(cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -)
|
(cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -)
|
||||||
endif
|
endif
|
||||||
ifndef NO_PERL
|
ifndef NO_PERL
|
||||||
$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perllibdir_SQ)'
|
||||||
|
(cd perl/build/lib && $(TAR) cf - .) | \
|
||||||
|
(cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR) xof -)
|
||||||
$(MAKE) -C gitweb install
|
$(MAKE) -C gitweb install
|
||||||
endif
|
endif
|
||||||
ifndef NO_TCLTK
|
ifndef NO_TCLTK
|
||||||
|
@ -2622,12 +2623,17 @@ endif
|
||||||
install-gitweb:
|
install-gitweb:
|
||||||
$(MAKE) -C gitweb install
|
$(MAKE) -C gitweb install
|
||||||
|
|
||||||
install-doc:
|
install-doc: install-man-perl
|
||||||
$(MAKE) -C Documentation install
|
$(MAKE) -C Documentation install
|
||||||
|
|
||||||
install-man:
|
install-man: install-man-perl
|
||||||
$(MAKE) -C Documentation install-man
|
$(MAKE) -C Documentation install-man
|
||||||
|
|
||||||
|
install-man-perl: perl/build/man/man3/Git.3pm
|
||||||
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mandir_SQ)/man3'
|
||||||
|
(cd perl/build/man/man3 && $(TAR) cf - .) | \
|
||||||
|
(cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR) xof -)
|
||||||
|
|
||||||
install-html:
|
install-html:
|
||||||
$(MAKE) -C Documentation install-html
|
$(MAKE) -C Documentation install-html
|
||||||
|
|
||||||
|
@ -2719,7 +2725,7 @@ clean: profile-clean coverage-clean
|
||||||
$(MAKE) -C Documentation/ clean
|
$(MAKE) -C Documentation/ clean
|
||||||
ifndef NO_PERL
|
ifndef NO_PERL
|
||||||
$(MAKE) -C gitweb clean
|
$(MAKE) -C gitweb clean
|
||||||
$(MAKE) -C perl clean
|
$(RM) -r perl/build/
|
||||||
endif
|
endif
|
||||||
$(MAKE) -C templates/ clean
|
$(MAKE) -C templates/ clean
|
||||||
$(MAKE) -C t/ clean
|
$(MAKE) -C t/ clean
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
use 5.008;
|
use 5.008;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Error qw(:try);
|
use Git::Error qw(:try);
|
||||||
use File::Basename qw(dirname);
|
use File::Basename qw(dirname);
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
use File::Find;
|
use File::Find;
|
||||||
|
|
|
@ -26,7 +26,7 @@ use Text::ParseWords;
|
||||||
use Term::ANSIColor;
|
use Term::ANSIColor;
|
||||||
use File::Temp qw/ tempdir tempfile /;
|
use File::Temp qw/ tempdir tempfile /;
|
||||||
use File::Spec::Functions qw(catdir catfile);
|
use File::Spec::Functions qw(catdir catfile);
|
||||||
use Error qw(:try);
|
use Git::Error qw(:try);
|
||||||
use Cwd qw(abs_path cwd);
|
use Cwd qw(abs_path cwd);
|
||||||
use Git;
|
use Git;
|
||||||
use Git::I18N;
|
use Git::I18N;
|
||||||
|
|
|
@ -1,8 +1 @@
|
||||||
perl.mak
|
/build/
|
||||||
perl.mak.old
|
|
||||||
MYMETA.json
|
|
||||||
MYMETA.yml
|
|
||||||
blib
|
|
||||||
blibdirs
|
|
||||||
pm_to_blib
|
|
||||||
PM.stamp
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ increase notwithstanding).
|
||||||
|
|
||||||
|
|
||||||
use Carp qw(carp croak); # but croak is bad - throw instead
|
use Carp qw(carp croak); # but croak is bad - throw instead
|
||||||
use Error qw(:try);
|
use Git::Error qw(:try);
|
||||||
use Cwd qw(abs_path cwd);
|
use Cwd qw(abs_path cwd);
|
||||||
use IPC::Open2 qw(open2);
|
use IPC::Open2 qw(open2);
|
||||||
use Fcntl qw(SEEK_SET SEEK_CUR);
|
use Fcntl qw(SEEK_SET SEEK_CUR);
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
package Git::Error;
|
||||||
|
use 5.008;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Git::Error - Wrapper for the L<Error> module, in case it's not installed
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Wraps the import function for the L<Error> module.
|
||||||
|
|
||||||
|
This module is only intended to be used for code shipping in the
|
||||||
|
C<git.git> repository. Use it for anything else at your peril!
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub import {
|
||||||
|
shift;
|
||||||
|
my $caller = caller;
|
||||||
|
|
||||||
|
eval {
|
||||||
|
require Error;
|
||||||
|
1;
|
||||||
|
} or do {
|
||||||
|
my $error = $@ || "Zombie Error";
|
||||||
|
|
||||||
|
my $Git_Error_pm_path = $INC{"Git/Error.pm"} || die "BUG: Should have our own path from %INC!";
|
||||||
|
|
||||||
|
require File::Basename;
|
||||||
|
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'!";
|
||||||
|
|
||||||
|
require File::Spec;
|
||||||
|
my $Git_pm_FromCPAN_root = File::Spec->catdir($Git_Error_pm_root, 'FromCPAN');
|
||||||
|
die "BUG: '$Git_pm_FromCPAN_root' should be a directory!" unless -d $Git_pm_FromCPAN_root;
|
||||||
|
|
||||||
|
local @INC = ($Git_pm_FromCPAN_root, @INC);
|
||||||
|
require Error;
|
||||||
|
};
|
||||||
|
|
||||||
|
unshift @_, $caller;
|
||||||
|
goto &Error::import;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
|
@ -18,7 +18,7 @@ our @EXPORT_OK = @EXPORT;
|
||||||
|
|
||||||
sub __bootstrap_locale_messages {
|
sub __bootstrap_locale_messages {
|
||||||
our $TEXTDOMAIN = 'git';
|
our $TEXTDOMAIN = 'git';
|
||||||
our $TEXTDOMAINDIR = $ENV{GIT_TEXTDOMAINDIR} || '++LOCALEDIR++';
|
our $TEXTDOMAINDIR = $ENV{GIT_TEXTDOMAINDIR} || '@@LOCALEDIR@@';
|
||||||
|
|
||||||
require POSIX;
|
require POSIX;
|
||||||
POSIX->import(qw(setlocale));
|
POSIX->import(qw(setlocale));
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
#
|
|
||||||
# Makefile for perl support modules and routine
|
|
||||||
#
|
|
||||||
makfile:=perl.mak
|
|
||||||
modules =
|
|
||||||
|
|
||||||
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
|
|
||||||
prefix_SQ = $(subst ','\'',$(prefix))
|
|
||||||
localedir_SQ = $(subst ','\'',$(localedir))
|
|
||||||
|
|
||||||
ifndef V
|
|
||||||
QUIET = @
|
|
||||||
endif
|
|
||||||
|
|
||||||
all install instlibdir: $(makfile)
|
|
||||||
$(QUIET)$(MAKE) -f $(makfile) $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
|
|
||||||
$(RM) ppport.h
|
|
||||||
$(RM) $(makfile)
|
|
||||||
$(RM) $(makfile).old
|
|
||||||
$(RM) PM.stamp
|
|
||||||
|
|
||||||
$(makfile): PM.stamp
|
|
||||||
|
|
||||||
ifdef NO_PERL_MAKEMAKER
|
|
||||||
instdir_SQ = $(subst ','\'',$(prefix)/lib)
|
|
||||||
|
|
||||||
modules += Git
|
|
||||||
modules += Git/I18N
|
|
||||||
modules += Git/IndexInfo
|
|
||||||
modules += Git/Packet
|
|
||||||
modules += Git/SVN
|
|
||||||
modules += Git/SVN/Memoize/YAML
|
|
||||||
modules += Git/SVN/Fetcher
|
|
||||||
modules += Git/SVN/Editor
|
|
||||||
modules += Git/SVN/GlobSpec
|
|
||||||
modules += Git/SVN/Log
|
|
||||||
modules += Git/SVN/Migration
|
|
||||||
modules += Git/SVN/Prompt
|
|
||||||
modules += Git/SVN/Ra
|
|
||||||
modules += Git/SVN/Utils
|
|
||||||
|
|
||||||
$(makfile): ../GIT-CFLAGS Makefile
|
|
||||||
echo all: private-Error.pm Git.pm Git/I18N.pm > $@
|
|
||||||
set -e; \
|
|
||||||
for i in $(modules); \
|
|
||||||
do \
|
|
||||||
if test $$i = $${i%/*}; \
|
|
||||||
then \
|
|
||||||
subdir=; \
|
|
||||||
else \
|
|
||||||
subdir=/$${i%/*}; \
|
|
||||||
fi; \
|
|
||||||
echo ' $(RM) blib/lib/'$$i'.pm' >> $@; \
|
|
||||||
echo ' mkdir -p blib/lib'$$subdir >> $@; \
|
|
||||||
echo ' cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
|
|
||||||
done
|
|
||||||
echo ' $(RM) blib/lib/Error.pm' >> $@
|
|
||||||
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
|
|
||||||
echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
|
|
||||||
echo install: >> $@
|
|
||||||
set -e; \
|
|
||||||
for i in $(modules); \
|
|
||||||
do \
|
|
||||||
if test $$i = $${i%/*}; \
|
|
||||||
then \
|
|
||||||
subdir=; \
|
|
||||||
else \
|
|
||||||
subdir=/$${i%/*}; \
|
|
||||||
fi; \
|
|
||||||
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
|
|
||||||
echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
|
|
||||||
echo ' cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
|
|
||||||
done
|
|
||||||
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
|
|
||||||
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
|
|
||||||
echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
|
|
||||||
echo instlibdir: >> $@
|
|
||||||
echo ' echo $(instdir_SQ)' >> $@
|
|
||||||
else
|
|
||||||
$(makfile): Makefile.PL ../GIT-CFLAGS
|
|
||||||
$(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
|
|
||||||
endif
|
|
||||||
|
|
||||||
# this is just added comfort for calling make directly in perl dir
|
|
||||||
# (even though GIT-CFLAGS aren't used yet. If ever)
|
|
||||||
../GIT-CFLAGS:
|
|
||||||
$(MAKE) -C .. GIT-CFLAGS
|
|
|
@ -1,62 +0,0 @@
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use ExtUtils::MakeMaker;
|
|
||||||
use Getopt::Long;
|
|
||||||
use File::Find;
|
|
||||||
|
|
||||||
# Don't forget to update the perl/Makefile, too.
|
|
||||||
# Don't forget to test with NO_PERL_MAKEMAKER=YesPlease
|
|
||||||
|
|
||||||
# Sanity: die at first unknown option
|
|
||||||
Getopt::Long::Configure qw/ pass_through /;
|
|
||||||
|
|
||||||
my $localedir = '';
|
|
||||||
GetOptions("localedir=s" => \$localedir);
|
|
||||||
|
|
||||||
sub MY::postamble {
|
|
||||||
return <<'MAKE_FRAG';
|
|
||||||
instlibdir:
|
|
||||||
@echo '$(INSTALLSITELIB)'
|
|
||||||
|
|
||||||
ifneq (,$(DESTDIR))
|
|
||||||
ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
|
|
||||||
$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
|
|
||||||
is likely incompatible with the DESTDIR mechanism. Try setting \
|
|
||||||
NO_PERL_MAKEMAKER=1 instead)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
MAKE_FRAG
|
|
||||||
}
|
|
||||||
|
|
||||||
# Find all the .pm files in "Git/" and Git.pm
|
|
||||||
my %pm;
|
|
||||||
find sub {
|
|
||||||
return unless /\.pm$/;
|
|
||||||
|
|
||||||
# sometimes File::Find prepends a ./ Strip it.
|
|
||||||
my $pm_path = $File::Find::name;
|
|
||||||
$pm_path =~ s{^\./}{};
|
|
||||||
|
|
||||||
$pm{$pm_path} = '$(INST_LIBDIR)/'.$pm_path;
|
|
||||||
}, "Git", "Git.pm";
|
|
||||||
|
|
||||||
|
|
||||||
# We come with our own bundled Error.pm. It's not in the set of default
|
|
||||||
# Perl modules so install it if it's not available on the system yet.
|
|
||||||
if ( !eval { require Error } || $Error::VERSION < 0.15009) {
|
|
||||||
$pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
|
|
||||||
}
|
|
||||||
|
|
||||||
# redirect stdout, otherwise the message "Writing perl.mak for Git"
|
|
||||||
# disrupts the output for the target 'instlibdir'
|
|
||||||
open STDOUT, ">&STDERR";
|
|
||||||
|
|
||||||
WriteMakefile(
|
|
||||||
NAME => 'Git',
|
|
||||||
VERSION_FROM => 'Git.pm',
|
|
||||||
PM => \%pm,
|
|
||||||
PM_FILTER => qq[\$(PERL) -pe "s<\\Q++LOCALEDIR++\\E><$localedir>"],
|
|
||||||
MAKEFILE => 'perl.mak',
|
|
||||||
INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
|
|
||||||
);
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use lib '../../perl/blib/lib';
|
use lib '../../perl/build/lib';
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use JSON;
|
use JSON;
|
||||||
|
|
|
@ -939,7 +939,7 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GITPERLLIB="$GIT_BUILD_DIR"/perl/blib/lib:"$GIT_BUILD_DIR"/perl/blib/arch/auto/Git
|
GITPERLLIB="$GIT_BUILD_DIR"/perl/build/lib
|
||||||
export GITPERLLIB
|
export GITPERLLIB
|
||||||
test -d "$GIT_BUILD_DIR"/templates/blt || {
|
test -d "$GIT_BUILD_DIR"/templates/blt || {
|
||||||
error "You haven't built things yet, have you?"
|
error "You haven't built things yet, have you?"
|
||||||
|
|
|
@ -14,7 +14,7 @@ else
|
||||||
GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
|
GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
|
||||||
export GIT_TEMPLATE_DIR
|
export GIT_TEMPLATE_DIR
|
||||||
fi
|
fi
|
||||||
GITPERLLIB='@@BUILD_DIR@@/perl/blib/lib'"${GITPERLLIB:+:$GITPERLLIB}"
|
GITPERLLIB='@@BUILD_DIR@@/perl/build/lib'"${GITPERLLIB:+:$GITPERLLIB}"
|
||||||
GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale'
|
GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale'
|
||||||
PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
|
PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue