* [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions
@ 2006-08-04 13:40 Alex Riesen
2006-08-04 14:02 ` Alex Riesen
0 siblings, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2006-08-04 13:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions
2006-08-04 13:40 [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions Alex Riesen
@ 2006-08-04 14:02 ` Alex Riesen
2006-08-04 17:56 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2006-08-04 14:02 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 626 bytes --]
On 8/4/06, Alex Riesen <raa.lkml@gmail.com> wrote:
> 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.
>
Damn. Please add attached patch on top of the previous one. I broke
the normal, xs-supported, platforms.
diff --git a/Makefile b/Makefile
index 9cfd677..5d58eca 100644
--- a/Makefile
+++ b/Makefile
@@ -591,7 +591,9 @@ all:
$(MAKE) -C templates
ifndef NO_PERL_XS
-all: perl/Makefile
+.PHONY: perl-dir
+all: perl-dir
+perl-dir: perl/Makefile
$(MAKE) -C perl
endif
[-- Attachment #2: 0001-fix-dependencies-for-xs-supported-platforms.txt --]
[-- Type: text/plain, Size: 628 bytes --]
From ff9c9341341d88b1d3ef55141cab14db45d55cf7 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Fri, 4 Aug 2006 15:59:11 +0200
Subject: [PATCH] fix dependencies for xs-supported platforms
Signed-off-by: Alex Riesen <ariesen@harmanbecker.com>
---
Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 9cfd677..5d58eca 100644
--- a/Makefile
+++ b/Makefile
@@ -591,7 +591,9 @@ all:
$(MAKE) -C templates
ifndef NO_PERL_XS
-all: perl/Makefile
+.PHONY: perl-dir
+all: perl-dir
+perl-dir: perl/Makefile
$(MAKE) -C perl
endif
--
1.4.2.rc2.g6534
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions
2006-08-04 14:02 ` Alex Riesen
@ 2006-08-04 17:56 ` Junio C Hamano
2006-08-08 12:03 ` Alex Riesen
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2006-08-04 17:56 UTC (permalink / raw)
To: Alex Riesen; +Cc: Junio C Hamano, git
"Alex Riesen" <raa.lkml@gmail.com> writes:
> On 8/4/06, Alex Riesen <raa.lkml@gmail.com> wrote:
>> 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.
I'd rather see Git.pm to have an option to emulate what it does
using Git.xs layer without it, to keep the upper layer of
programs still usable.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions
2006-08-04 17:56 ` Junio C Hamano
@ 2006-08-08 12:03 ` Alex Riesen
0 siblings, 0 replies; 4+ messages in thread
From: Alex Riesen @ 2006-08-08 12:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On 8/4/06, Junio C Hamano <junkio@cox.net> wrote:
> >> 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.
>
> I'd rather see Git.pm to have an option to emulate what it does
> using Git.xs layer without it, to keep the upper layer of
> programs still usable.
>
Wont work until MakeMaker is used.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-08-08 12:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04 13:40 [PATCH] add NO_PERL_XS for environments which are not able to support perl extensions Alex Riesen
2006-08-04 14:02 ` Alex Riesen
2006-08-04 17:56 ` Junio C Hamano
2006-08-08 12:03 ` Alex Riesen
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).