1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
| | #
# Makefile for perl support modules and routine
#
# This Makefile generates "perl.mak", which contains the actual build and
# installation directions.
#
# PERL_PATH must be defined to be the path of the Perl interpreter to use.
#
# prefix must be defined as the Git installation prefix.
#
# perl_localedir must be defined as the path to the locale data.
#
# perllibdir may be optionally defined to override the default Perl module
# installation directory, which is relative to prefix. If perllibdir is not
# absolute, it will be treated as relative to prefix.
#
# NO_PERL_MAKEMAKER may be defined to use a built-in Makefile generation method
# instead of Perl MakeMaker.
makfile:=perl.mak
modules =
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
prefix_SQ = $(subst ','\'',$(prefix))
localedir_SQ = $(subst ','\'',$(perl_localedir))
ifndef V
QUIET = @
endif
# If a library directory is provided, and it is not an absolute path, resolve
# it relative to prefix.
ifneq ($(perllibdir),)
ifneq ($(filter /%,$(firstword $(perllibdir))),)
perllib_instdir = $(perllibdir)
else
perllib_instdir = $(prefix)/$(perllibdir)
endif
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
ifeq ($(perllib_instdir),)
perllib_instdir = $(prefix)/lib
endif
instdir_SQ = $(subst ','\'',$(perllib_instdir))
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 ../GIT-PERL-DEFINES 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
# This may be empty if perllibdir was empty.
instdir_SQ = $(subst ','\'',$(perllib_instdir))
MAKEMAKER_PARAMS = PREFIX='$(prefix_SQ)' INSTALL_BASE=''
ifneq ($(instdir_SQ),)
MAKEMAKER_PARAMS += LIB='$(instdir_SQ)'
endif
ifneq ($(localedir_SQ),)
MAKEMAKER_PARAMS += --localedir='$(localedir_SQ)'
endif
$(makfile): Makefile.PL ../GIT-CFLAGS ../GIT-PERL-DEFINES
$(PERL_PATH) $< $(MAKEMAKER_PARAMS)
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 ../GIT-PERL-DEFINES:
$(MAKE) -C .. $(@F)
|