{"thread":{"id":"5120","subject":"[PATCH] add NO_PERL_XS for environments which are not able to support perl extensions","startedAt":"2006-08-04T13:40:47Z","lastAt":"2006-08-08T12:03:41Z","messageCount":4,"participants":["Alex Riesen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"24702","messageId":"81b0412b0608040640s44c0d84et94871bce0271b047@mail.gmail.com","threadId":"5120","inReplyTo":null,"subject":"[PATCH] add NO_PERL_XS for environments which are not able to support perl extensions","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-08-04T13:40:47Z","receivedAt":"2006-08-04T13:40:47Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"At the moment, the only known example of such environment is Cygwin with\nActiveState Perl: Makefile, generated by the MakeMaker from ActiveState perl\ndistribution is not usable by cygwin's gmake.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n Makefile |   39 +++++++++++++++++++++++++++++++++------\n 1 files changed, 33 insertions(+), 6 deletions(-)\n\n\nFrom 259d3ab5925bdf42a2014a7dbf177de7b3ba9dc9 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Fri, 4 Aug 2006 15:31:58 +0200\nSubject: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions\n\nAt the moment, the only known example of such environment is Cygwin with\nActiveState Perl: Makefile, generated by the MakeMaker from ActiveState perl\ndistribution is not usable by cygwin's gmake.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n Makefile |   39 +++++++++++++++++++++++++++++++++------\n 1 files changed, 33 insertions(+), 6 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex d662bd6..9cfd677 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -173,16 +173,19 @@ SCRIPT_SH = \\\n \n SCRIPT_PERL = \\\n \tgit-archimport.perl git-cvsimport.perl git-relink.perl \\\n-\tgit-shortlog.perl git-rerere.perl \\\n-\tgit-annotate.perl git-cvsserver.perl \\\n-\tgit-svnimport.perl git-cvsexportcommit.perl \\\n-\tgit-send-email.perl git-svn.perl\n+\tgit-shortlog.perl git-rerere.perl git-cvsserver.perl \\\n+\tgit-svnimport.perl git-cvsexportcommit.perl git-svn.perl\n+\n+SCRIPT_XS_PERL = \\\n+\tgit-annotate.perl \\\n+\tgit-send-email.perl\n \n SCRIPT_PYTHON = \\\n \tgit-merge-recursive.py\n \n SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n+\t  $(patsubst %.perl,%,$(SCRIPT_XS_PERL)) \\\n \t  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n \t  git-cherry-pick git-status git-instaweb\n \n@@ -550,6 +553,9 @@ endif\n ifdef NO_ACCURATE_DIFF\n \tBASIC_CFLAGS += -DNO_ACCURATE_DIFF\n endif\n+ifdef NO_PERL_XS\n+\tSCRIPT_XS_PERL =\n+endif\n \n # Shell quote (do not use $(call) to accommodate ancient setups);\n \n@@ -581,9 +587,13 @@ ### Build rules\n \n all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi\n \n+all:\n+\t$(MAKE) -C templates\n+\n+ifndef NO_PERL_XS\n all: perl/Makefile\n \t$(MAKE) -C perl\n-\t$(MAKE) -C templates\n+endif\n \n strip: $(PROGRAMS) git$X\n \t$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X\n@@ -613,9 +623,18 @@ common-cmds.h: Documentation/git-*.txt\n \tchmod +x $@+\n \tmv $@+ $@\n \n-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile\n $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl\n \trm -f $@ $@+\n+\tsed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \\\n+\t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n+\t    $@.perl >$@+\n+\tchmod +x $@+\n+\tmv $@+ $@\n+\n+ifndef NO_PERL_XS\n+$(patsubst %.perl,%,$(SCRIPT_XS_PERL)): perl/Makefile\n+$(patsubst %.perl,%,$(SCRIPT_XS_PERL)): % : %.perl\n+\trm -f $@ $@+\n \tINSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \\\n \tsed -e '1{' \\\n \t    -e '\ts|#!.*perl|#!$(PERL_PATH_SQ)|' \\\n@@ -629,6 +648,7 @@ common-cmds.h: Documentation/git-*.txt\n \t    $@.perl >$@+\n \tchmod +x $@+\n \tmv $@+ $@\n+endif\n \n $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py GIT-CFLAGS\n \trm -f $@ $@+\n@@ -681,6 +701,7 @@ # These can record GIT_VERSION\n git$X git.spec \\\n \t$(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t$(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n+\t$(patsubst %.perl,%,$(SCRIPT_XS_PERL)) \\\n \t$(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n \t: GIT-VERSION-FILE\n \n@@ -747,6 +768,7 @@ XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare\n \trm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)\n \n \n+ifndef NO_PERL_XS\n PERL_DEFINE = $(BASIC_CFLAGS) -DGIT_VERSION='\"$(GIT_VERSION)\"'\n PERL_DEFINE_SQ = $(subst ','\\'',$(PERL_DEFINE))\n PERL_LIBS = $(BASIC_LDFLAGS) $(EXTLIBS)\n@@ -756,6 +778,7 @@ perl/Makefile: perl/Git.pm perl/Makefile\n \t\tPREFIX='$(prefix_SQ)' \\\n \t\tDEFINE='$(PERL_DEFINE_SQ)' \\\n \t\tLIBS='$(PERL_LIBS_SQ)')\n+endif\n \n doc:\n \t$(MAKE) -C Documentation all\n@@ -819,7 +842,9 @@ install: all\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n+ifndef NO_PERL_XS\n \t$(MAKE) -C perl install\n+endif\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n \t$(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n \tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n@@ -890,8 +915,10 @@ clean:\n \trm -f $(htmldocs).tar.gz $(manpages).tar.gz\n \trm -f gitweb/gitweb.cgi\n \t$(MAKE) -C Documentation/ clean\n+ifndef NO_PERL_XS\n \t[ ! -f perl/Makefile ] || $(MAKE) -C perl/ clean || $(MAKE) -C perl/ clean\n \trm -f perl/ppport.h perl/Makefile.old\n+endif\n \t$(MAKE) -C templates/ clean\n \t$(MAKE) -C t/ clean\n \trm -f GIT-VERSION-FILE GIT-CFLAGS\n-- \n1.4.2.rc2.g6534\n\n"},{"id":"24703","messageId":"81b0412b0608040702l7c7676adk30b792d69c05e05f@mail.gmail.com","threadId":"5120","inReplyTo":"81b0412b0608040640s44c0d84et94871bce0271b047@mail.gmail.com","subject":"Re: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-08-04T14:02:37Z","receivedAt":"2006-08-04T14:02:37Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 8/4/06, Alex Riesen <raa.lkml@gmail.com> wrote:\n> At the moment, the only known example of such environment is Cygwin with\n> ActiveState Perl: Makefile, generated by the MakeMaker from ActiveState perl\n> distribution is not usable by cygwin's gmake.\n>\n\nDamn. Please add attached patch on top of the previous one. I broke\nthe normal, xs-supported, platforms.\n\ndiff --git a/Makefile b/Makefile\nindex 9cfd677..5d58eca 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -591,7 +591,9 @@ all:\n \t$(MAKE) -C templates\n\n ifndef NO_PERL_XS\n-all: perl/Makefile\n+.PHONY: perl-dir\n+all: perl-dir\n+perl-dir: perl/Makefile\n \t$(MAKE) -C perl\n endif\n\n\nFrom ff9c9341341d88b1d3ef55141cab14db45d55cf7 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Fri, 4 Aug 2006 15:59:11 +0200\nSubject: [PATCH] fix dependencies for xs-supported platforms\n\nSigned-off-by: Alex Riesen <ariesen@harmanbecker.com>\n---\n Makefile |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 9cfd677..5d58eca 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -591,7 +591,9 @@ all:\n \t$(MAKE) -C templates\n \n ifndef NO_PERL_XS\n-all: perl/Makefile\n+.PHONY: perl-dir\n+all: perl-dir\n+perl-dir: perl/Makefile\n \t$(MAKE) -C perl\n endif\n \n-- \n1.4.2.rc2.g6534\n\n"},{"id":"24726","messageId":"7vfygcl6zm.fsf@assigned-by-dhcp.cox.net","threadId":"5120","inReplyTo":"81b0412b0608040702l7c7676adk30b792d69c05e05f@mail.gmail.com","subject":"Re: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-04T17:56:45Z","receivedAt":"2006-08-04T17:56:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alex Riesen\" <raa.lkml@gmail.com> writes:\n\n> On 8/4/06, Alex Riesen <raa.lkml@gmail.com> wrote:\n>> At the moment, the only known example of such environment is Cygwin with\n>> ActiveState Perl: Makefile, generated by the MakeMaker from ActiveState perl\n>> distribution is not usable by cygwin's gmake.\n\nI'd rather see Git.pm to have an option to emulate what it does\nusing Git.xs layer without it, to keep the upper layer of\nprograms still usable.\n"},{"id":"24976","messageId":"81b0412b0608080503j7ef32bcbx79a50ed3020ff65e@mail.gmail.com","threadId":"5120","inReplyTo":"7vfygcl6zm.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-08-08T12:03:41Z","receivedAt":"2006-08-08T12:03:41Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 8/4/06, Junio C Hamano <junkio@cox.net> wrote:\n> >> At the moment, the only known example of such environment is Cygwin with\n> >> ActiveState Perl: Makefile, generated by the MakeMaker from ActiveState perl\n> >> distribution is not usable by cygwin's gmake.\n>\n> I'd rather see Git.pm to have an option to emulate what it does\n> using Git.xs layer without it, to keep the upper layer of\n> programs still usable.\n>\n\nWont work until MakeMaker is used.\n"}]}