mirror of
https://github.com/git/git.git
synced 2024-10-30 13:57:54 +01:00
1fc2cbc1d8
Use double quotes to protect against paths which may contain spaces. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
47 lines
1.4 KiB
Makefile
47 lines
1.4 KiB
Makefile
#
|
|
# Makefile for perl support modules and routine
|
|
#
|
|
makfile:=perl.mak
|
|
|
|
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
|
|
prefix_SQ = $(subst ','\'',$(prefix))
|
|
|
|
ifndef V
|
|
QUIET = @
|
|
endif
|
|
|
|
all install instlibdir: $(makfile)
|
|
$(QUIET)$(MAKE) -f $(makfile) $@
|
|
|
|
clean:
|
|
$(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
|
|
$(RM) ppport.h
|
|
$(RM) $(makfile)
|
|
$(RM) $(makfile).old
|
|
|
|
ifdef NO_PERL_MAKEMAKER
|
|
instdir_SQ = $(subst ','\'',$(prefix)/lib)
|
|
$(makfile): ../GIT-CFLAGS Makefile
|
|
echo all: private-Error.pm Git.pm > $@
|
|
echo ' mkdir -p blib/lib' >> $@
|
|
echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
|
|
echo ' $(RM) blib/lib/Error.pm' >> $@
|
|
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
|
|
echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
|
|
echo install: >> $@
|
|
echo ' mkdir -p "$(instdir_SQ)"' >> $@
|
|
echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
|
|
echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
|
|
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
|
|
echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
|
|
echo instlibdir: >> $@
|
|
echo ' echo $(instdir_SQ)' >> $@
|
|
else
|
|
$(makfile): Makefile.PL ../GIT-CFLAGS
|
|
$(PERL_PATH) $< 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
|