mirror of
https://github.com/git/git.git
synced 2026-03-14 10:53:25 +01:00
There is one subtlety in perl/Makefile: The $(prefix) may contain a drive letter-colon combination. But unfortunately, the perl scripts contain a stance that splits the path at colons to find Git.pm. For this reason, we convert the path to the MSYS style, which does not have the colon.
44 lines
1.2 KiB
Makefile
44 lines
1.2 KiB
Makefile
#
|
|
# Makefile for perl support modules and routine
|
|
#
|
|
makfile:=perl.mak
|
|
|
|
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
|
|
prefix_SQ = $(subst ','\'',$(prefix))
|
|
|
|
all install instlibdir: $(makfile)
|
|
$(MAKE) -f $(makfile) $@
|
|
|
|
clean:
|
|
test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
|
|
$(RM) ppport.h
|
|
$(RM) $(makfile)
|
|
$(RM) $(makfile).old
|
|
|
|
ifdef NO_PERL_MAKEMAKER
|
|
# We exploit that /bin/sh transforms the DOS-Stype path in TEMP into
|
|
# the MSYS style pseudo-mount form.
|
|
# This colon-free from is needed because our perl scripts look at
|
|
# $(instdir_SQ) and split it at colons.
|
|
instdir_SQ = $(subst ','\'',$(shell cmd /x/d/c "set TEMP=$(prefix)/lib && sh -c 'echo \$$TEMP'"))
|
|
$(makfile): ../GIT-CFLAGS Makefile
|
|
echo all: > $@
|
|
echo ' :' >> $@
|
|
echo install: >> $@
|
|
echo ' mkdir -p $(instdir_SQ)' >> $@
|
|
echo ' $(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@
|
|
echo ' $(RM) $(instdir_SQ)/Error.pm; \
|
|
cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
|
|
echo instlibdir: >> $@
|
|
echo ' echo $(instdir_SQ)' >> $@
|
|
else
|
|
$(makfile): Makefile.PL ../GIT-CFLAGS
|
|
'$(PERL_PATH_SQ)' $< PREFIX='$(prefix_SQ)'
|
|
endif
|
|
|
|
# this is just added comfort for calling make directly in perl dir
|
|
# (even though GIT-CFLAGS aren't used yet. If ever)
|
|
../GIT-CFLAGS:
|
|
$(MAKE) -C .. GIT-CFLAGS
|
|
|