]> git.ipfire.org Git - thirdparty/git.git/blame - perl/Makefile
Merge branch 'tr/maint-cherry-pick-list' into maint-1.6.6
[thirdparty/git.git] / perl / Makefile
CommitLineData
f848718a
AR
1#
2# Makefile for perl support modules and routine
3#
4makfile:=perl.mak
5
6PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
7prefix_SQ = $(subst ','\'',$(prefix))
8
2314c947 9ifndef V
74f2b2a8
SP
10 QUIET = @
11endif
12
f848718a 13all install instlibdir: $(makfile)
74f2b2a8 14 $(QUIET)$(MAKE) -f $(makfile) $@
f848718a
AR
15
16clean:
74f2b2a8 17 $(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
f848718a
AR
18 $(RM) ppport.h
19 $(RM) $(makfile)
20 $(RM) $(makfile).old
21
22ifdef NO_PERL_MAKEMAKER
23instdir_SQ = $(subst ','\'',$(prefix)/lib)
24$(makfile): ../GIT-CFLAGS Makefile
058fb414
BC
25 echo all: private-Error.pm Git.pm > $@
26 echo ' mkdir -p blib/lib' >> $@
27 echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
28 echo ' $(RM) blib/lib/Error.pm' >> $@
29 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
30 echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
f848718a 31 echo install: >> $@
3696c4ce
JH
32 echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
33 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
34 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
058fb414 35 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
3696c4ce 36 echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
f848718a
AR
37 echo instlibdir: >> $@
38 echo ' echo $(instdir_SQ)' >> $@
39else
40$(makfile): Makefile.PL ../GIT-CFLAGS
5318f698 41 $(PERL_PATH) $< PREFIX='$(prefix_SQ)'
f848718a
AR
42endif
43
44# this is just added comfort for calling make directly in perl dir
45# (even though GIT-CFLAGS aren't used yet. If ever)
46../GIT-CFLAGS:
47 $(MAKE) -C .. GIT-CFLAGS