Support the tools scripted in perl.
[4msysgit-hv.git] / perl / Makefile
blobfdb7cb9886d80362f8207db3a332f1a55657a8f9
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 all install instlibdir: $(makfile)
10 $(MAKE) -f $(makfile) $@
12 clean:
13 test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
14 $(RM) ppport.h
15 $(RM) $(makfile)
16 $(RM) $(makfile).old
18 ifdef NO_PERL_MAKEMAKER
19 # We exploit that /bin/sh transforms the DOS-Stype path in TEMP into
20 # the MSYS style pseudo-mount form.
21 # This colon-free from is needed because our perl scripts look at
22 # $(instdir_SQ) and split it at colons.
23 instdir_SQ = $(subst ','\'',$(shell cmd /x/d/c "set TEMP=$(prefix)/lib && sh -c 'echo \$$TEMP'"))
24 $(makfile): ../GIT-CFLAGS Makefile
25 echo all: > $@
26 echo ' :' >> $@
27 echo install: >> $@
28 echo ' mkdir -p $(instdir_SQ)' >> $@
29 echo ' $(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@
30 echo ' $(RM) $(instdir_SQ)/Error.pm; \
31 cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
32 echo instlibdir: >> $@
33 echo ' echo $(instdir_SQ)' >> $@
34 else
35 $(makfile): Makefile.PL ../GIT-CFLAGS
36 '$(PERL_PATH_SQ)' $< PREFIX='$(prefix_SQ)'
37 endif
39 # this is just added comfort for calling make directly in perl dir
40 # (even though GIT-CFLAGS aren't used yet. If ever)
41 ../GIT-CFLAGS:
42 $(MAKE) -C .. GIT-CFLAGS