Merge branch 'master' of git://repo.or.cz/alt-git
[git/dscho.git] / perl / Makefile
blob2fefcd8bbba6df06d6f68bd85e3425d3a1c69462
2 # Makefile for perl support modules and routine
4 makfile:=perl.mak
6 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
7 prefix_SQ = $(subst ','\'',$(prefix))
9 ifndef V
10 QUIET = @
11 endif
13 all install instlibdir: $(makfile)
14 $(QUIET)$(MAKE) -f $(makfile) $@
16 clean:
17 $(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
18 $(RM) ppport.h
19 $(RM) $(makfile)
20 $(RM) $(makfile).old
22 ifdef NO_PERL_MAKEMAKER
23 # We exploit that /bin/sh transforms the DOS-Stype path in TEMP into
24 # the MSYS style pseudo-mount form.
25 # This colon-free from is needed because our perl scripts look at
26 # $(instdir_SQ) and split it at colons.
27 instdir_SQ = $(subst ','\'',$(shell cmd /x/d/c "set TEMP=$(prefix)/lib && sh -c 'echo \$$TEMP'"))
28 $(makfile): ../GIT-CFLAGS Makefile
29 echo all: private-Error.pm Git.pm > $@
30 echo ' mkdir -p blib/lib' >> $@
31 echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
32 echo ' $(RM) blib/lib/Error.pm' >> $@
33 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
34 echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
35 echo install: >> $@
36 echo ' mkdir -p "$(instdir_SQ)"' >> $@
37 echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
38 echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
39 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
40 echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
41 echo instlibdir: >> $@
42 echo ' echo $(instdir_SQ)' >> $@
43 else
44 $(makfile): Makefile.PL ../GIT-CFLAGS
45 $(PERL_PATH) $< PREFIX='$(prefix_SQ)'
46 endif
48 # this is just added comfort for calling make directly in perl dir
49 # (even though GIT-CFLAGS aren't used yet. If ever)
50 ../GIT-CFLAGS:
51 $(MAKE) -C .. GIT-CFLAGS