Merge branch 'master' of git://git.kernel.org/pub/scm/git/git
[git/jnareb-git.git] / perl / Makefile
blob15d96fcc7a5a81ae0304bc51a603fe54bcbb95c6
2 # Makefile for perl support modules and routine
4 makfile:=perl.mak
5 modules =
7 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
8 prefix_SQ = $(subst ','\'',$(prefix))
9 localedir_SQ = $(subst ','\'',$(localedir))
11 ifndef V
12 QUIET = @
13 endif
15 all install instlibdir: $(makfile)
16 $(QUIET)$(MAKE) -f $(makfile) $@
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
25 $(makfile): PM.stamp
27 ifdef NO_PERL_MAKEMAKER
28 instdir_SQ = $(subst ','\'',$(prefix)/lib)
30 modules += Git
31 modules += Git/I18N
32 modules += Git/IndexInfo
33 modules += Git/SVN
34 modules += Git/SVN/Memoize/YAML
35 modules += Git/SVN/Fetcher
36 modules += Git/SVN/Editor
37 modules += Git/SVN/GlobSpec
38 modules += Git/SVN/Log
39 modules += Git/SVN/Migration
40 modules += Git/SVN/Prompt
41 modules += Git/SVN/Ra
42 modules += Git/SVN/Utils
44 $(makfile): ../GIT-CFLAGS Makefile
45 echo all: private-Error.pm Git.pm Git/I18N.pm > $@
46 set -e; \
47 for i in $(modules); \
48 do \
49 if test $$i = $${i%/*}; \
50 then \
51 subdir=; \
52 else \
53 subdir=/$${i%/*}; \
54 fi; \
55 echo ' $(RM) blib/lib/'$$i'.pm' >> $@; \
56 echo ' mkdir -p blib/lib'$$subdir >> $@; \
57 echo ' cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
58 done
59 echo ' $(RM) blib/lib/Error.pm' >> $@
60 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
61 echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
62 echo install: >> $@
63 set -e; \
64 for i in $(modules); \
65 do \
66 if test $$i = $${i%/*}; \
67 then \
68 subdir=; \
69 else \
70 subdir=/$${i%/*}; \
71 fi; \
72 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
73 echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
74 echo ' cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
75 done
76 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
77 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
78 echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
79 echo instlibdir: >> $@
80 echo ' echo $(instdir_SQ)' >> $@
81 else
82 $(makfile): Makefile.PL ../GIT-CFLAGS
83 $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
84 endif
86 # this is just added comfort for calling make directly in perl dir
87 # (even though GIT-CFLAGS aren't used yet. If ever)
88 ../GIT-CFLAGS:
89 $(MAKE) -C .. GIT-CFLAGS