At the moment, the only known example of such environment is Cygwin with ActiveState Perl: Makefile, generated by the MakeMaker from ActiveState perl distribution is not usable by cygwin's gmake. Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx> --- Makefile | 39 +++++++++++++++++++++++++++++++++------ 1 files changed, 33 insertions(+), 6 deletions(-)
From 259d3ab5925bdf42a2014a7dbf177de7b3ba9dc9 Mon Sep 17 00:00:00 2001 From: Alex Riesen <raa.lkml@xxxxxxxxx> Date: Fri, 4 Aug 2006 15:31:58 +0200 Subject: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions At the moment, the only known example of such environment is Cygwin with ActiveState Perl: Makefile, generated by the MakeMaker from ActiveState perl distribution is not usable by cygwin's gmake. Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx> --- Makefile | 39 +++++++++++++++++++++++++++++++++------ 1 files changed, 33 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d662bd6..9cfd677 100644 --- a/Makefile +++ b/Makefile @@ -173,16 +173,19 @@ SCRIPT_SH = \ SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ - git-shortlog.perl git-rerere.perl \ - git-annotate.perl git-cvsserver.perl \ - git-svnimport.perl git-cvsexportcommit.perl \ - git-send-email.perl git-svn.perl + git-shortlog.perl git-rerere.perl git-cvsserver.perl \ + git-svnimport.perl git-cvsexportcommit.perl git-svn.perl + +SCRIPT_XS_PERL = \ + git-annotate.perl \ + git-send-email.perl SCRIPT_PYTHON = \ git-merge-recursive.py SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.perl,%,$(SCRIPT_PERL)) \ + $(patsubst %.perl,%,$(SCRIPT_XS_PERL)) \ $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ git-cherry-pick git-status git-instaweb @@ -550,6 +553,9 @@ endif ifdef NO_ACCURATE_DIFF BASIC_CFLAGS += -DNO_ACCURATE_DIFF endif +ifdef NO_PERL_XS + SCRIPT_XS_PERL = +endif # Shell quote (do not use $(call) to accommodate ancient setups); @@ -581,9 +587,13 @@ ### Build rules all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi +all: + $(MAKE) -C templates + +ifndef NO_PERL_XS all: perl/Makefile $(MAKE) -C perl - $(MAKE) -C templates +endif strip: $(PROGRAMS) git$X $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X @@ -613,9 +623,18 @@ common-cmds.h: Documentation/git-*.txt chmod +x $@+ mv $@+ $@ -$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl rm -f $@ $@+ + sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + $@.perl >$@+ + chmod +x $@+ + mv $@+ $@ + +ifndef NO_PERL_XS +$(patsubst %.perl,%,$(SCRIPT_XS_PERL)): perl/Makefile +$(patsubst %.perl,%,$(SCRIPT_XS_PERL)): % : %.perl + rm -f $@ $@+ INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \ sed -e '1{' \ -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \ @@ -629,6 +648,7 @@ common-cmds.h: Documentation/git-*.txt $@.perl >$@+ chmod +x $@+ mv $@+ $@ +endif $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py GIT-CFLAGS rm -f $@ $@+ @@ -681,6 +701,7 @@ # These can record GIT_VERSION git$X git.spec \ $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.perl,%,$(SCRIPT_PERL)) \ + $(patsubst %.perl,%,$(SCRIPT_XS_PERL)) \ $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ : GIT-VERSION-FILE @@ -747,6 +768,7 @@ XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS) +ifndef NO_PERL_XS PERL_DEFINE = $(BASIC_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"' PERL_DEFINE_SQ = $(subst ','\'',$(PERL_DEFINE)) PERL_LIBS = $(BASIC_LDFLAGS) $(EXTLIBS) @@ -756,6 +778,7 @@ perl/Makefile: perl/Git.pm perl/Makefile PREFIX='$(prefix_SQ)' \ DEFINE='$(PERL_DEFINE_SQ)' \ LIBS='$(PERL_LIBS_SQ)') +endif doc: $(MAKE) -C Documentation all @@ -819,7 +842,9 @@ install: all $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)' $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install +ifndef NO_PERL_XS $(MAKE) -C perl install +endif $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)' $(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)' if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \ @@ -890,8 +915,10 @@ clean: rm -f $(htmldocs).tar.gz $(manpages).tar.gz rm -f gitweb/gitweb.cgi $(MAKE) -C Documentation/ clean +ifndef NO_PERL_XS [ ! -f perl/Makefile ] || $(MAKE) -C perl/ clean || $(MAKE) -C perl/ clean rm -f perl/ppport.h perl/Makefile.old +endif $(MAKE) -C templates/ clean $(MAKE) -C t/ clean rm -f GIT-VERSION-FILE GIT-CFLAGS -- 1.4.2.rc2.g6534