From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions
Date: Fri, 4 Aug 2006 15:40:47 +0200 [thread overview]
Message-ID: <81b0412b0608040640s44c0d84et94871bce0271b047@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
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@gmail.com>
---
Makefile | 39 +++++++++++++++++++++++++++++++++------
1 files changed, 33 insertions(+), 6 deletions(-)
[-- Attachment #2: 0001-add-NO_PERL_XS-for-environments-which-are-not-able-to-support-perl-extensions.txt --]
[-- Type: text/plain, Size: 4262 bytes --]
From 259d3ab5925bdf42a2014a7dbf177de7b3ba9dc9 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
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@gmail.com>
---
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
next reply other threads:[~2006-08-04 13:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 13:40 Alex Riesen [this message]
2006-08-04 14:02 ` [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions Alex Riesen
2006-08-04 17:56 ` Junio C Hamano
2006-08-08 12:03 ` Alex Riesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81b0412b0608040640s44c0d84et94871bce0271b047@mail.gmail.com \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).