Merge branch 'tg/maint-cache-name-compare'
[git.git] / perl / Makefile
blob6ca7d472ebad5c93c014ddaac556e6a4f2284990
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
24 ifdef NO_PERL_MAKEMAKER
25 instdir_SQ = $(subst ','\'',$(prefix)/lib)
27 modules += Git
28 modules += Git/I18N
29 modules += Git/SVN/Memoize/YAML
30 modules += Git/SVN/Fetcher
31 modules += Git/SVN/Editor
32 modules += Git/SVN/Prompt
33 modules += Git/SVN/Ra
35 $(makfile): ../GIT-CFLAGS Makefile
36 echo all: private-Error.pm Git.pm Git/I18N.pm > $@
37 set -e; \
38 for i in $(modules); \
39 do \
40 if test $$i = $${i%/*}; \
41 then \
42 subdir=; \
43 else \
44 subdir=/$${i%/*}; \
45 fi; \
46 echo ' $(RM) blib/lib/'$$i'.pm' >> $@; \
47 echo ' mkdir -p blib/lib'$$subdir >> $@; \
48 echo ' cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
49 done
50 echo ' $(RM) blib/lib/Error.pm' >> $@
51 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
52 echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
53 echo install: >> $@
54 set -e; \
55 for i in $(modules); \
56 do \
57 if test $$i = $${i%/*}; \
58 then \
59 subdir=; \
60 else \
61 subdir=/$${i%/*}; \
62 fi; \
63 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
64 echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
65 echo ' cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
66 done
67 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
68 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
69 echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
70 echo instlibdir: >> $@
71 echo ' echo $(instdir_SQ)' >> $@
72 else
73 $(makfile): Makefile.PL ../GIT-CFLAGS
74 $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
75 endif
77 # this is just added comfort for calling make directly in perl dir
78 # (even though GIT-CFLAGS aren't used yet. If ever)
79 ../GIT-CFLAGS:
80 $(MAKE) -C .. GIT-CFLAGS