* [PATCH] move Git.pm build instructions into perl/Makefile
@ 2006-11-21 22:59 Alex Riesen
2006-11-30 16:27 ` [PATCH 1/2] " Alex Riesen
0 siblings, 1 reply; 6+ messages in thread
From: Alex Riesen @ 2006-11-21 22:59 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
...so that I can disable MakeMaker stuff as soon as I get to work,
which is the only windows+cygwin+activestate system available to me.
Alas, it is also the system where I use git most.
The MakeMaker killing patch should follow.
Makefile | 19 +++++++++----------
perl/.gitignore | 3 ++-
perl/Makefile | 23 +++++++++++++++++++++++
3 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 36ce8cd..c849227 100644
--- a/Makefile
+++ b/Makefile
@@ -592,8 +592,8 @@ export prefix TAR INSTALL DESTDIR SHELL_
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi
-all: perl/Makefile
- $(MAKE) -C perl
+all:
+ $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
$(MAKE) -C templates
strip: $(PROGRAMS) git$X
@@ -627,7 +627,11 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.
chmod +x $@+
mv $@+ $@
-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile
+$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
+
+perl/perl.mak: GIT-CFLAGS
+ $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
rm -f $@ $@+
INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
@@ -767,10 +771,6 @@ $(XDIFF_LIB): $(XDIFF_OBJS)
rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)
-perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS
- (cd perl && $(PERL_PATH) Makefile.PL \
- PREFIX='$(prefix_SQ)')
-
doc:
$(MAKE) -C Documentation all
@@ -833,7 +833,7 @@ install: all
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
- $(MAKE) -C perl install
+ $(MAKE) -C perl prefix='$(prefix_SQ)' install
$(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)'; \
@@ -905,8 +905,7 @@ clean:
rm -f $(htmldocs).tar.gz $(manpages).tar.gz
rm -f gitweb/gitweb.cgi
$(MAKE) -C Documentation/ clean
- [ ! -f perl/Makefile ] || $(MAKE) -C perl/ clean || $(MAKE) -C perl/ clean
- rm -f perl/ppport.h perl/Makefile.old
+ $(MAKE) -C perl clean
$(MAKE) -C templates/ clean
$(MAKE) -C t/ clean
rm -f GIT-VERSION-FILE GIT-CFLAGS
diff --git a/perl/.gitignore b/perl/.gitignore
index e990cae..98b2477 100644
--- a/perl/.gitignore
+++ b/perl/.gitignore
@@ -1,4 +1,5 @@
-Makefile
+perl.mak
+perl.mak.old
blib
blibdirs
pm_to_blib
diff --git a/perl/Makefile b/perl/Makefile
new file mode 100644
index 0000000..cff24dd
--- /dev/null
+++ b/perl/Makefile
@@ -0,0 +1,23 @@
+#
+# Makefile for perl support modules and routine
+#
+makfile:=perl.mak
+
+PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+prefix_SQ = $(subst ','\'',$(prefix))
+
+all install instlibdir: $(makfile)
+ $(MAKE) -f $(makfile) $@
+
+clean:
+ test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
+ $(RM) ppport.h
+ $(RM) $(makfile)
+
+$(makfile): Makefile.PL ../GIT-CFLAGS
+ '$(PERL_PATH_SQ)' $< FIRST_MAKEFILE='$@' PREFIX='$(prefix_SQ)'
+
+# 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
--
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/2] move Git.pm build instructions into perl/Makefile
2006-11-21 22:59 [PATCH] move Git.pm build instructions into perl/Makefile Alex Riesen
@ 2006-11-30 16:27 ` Alex Riesen
2006-12-02 23:46 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Alex Riesen @ 2006-11-30 16:27 UTC (permalink / raw)
To: Alex Riesen; +Cc: git, Junio C Hamano
[-- Attachment #1: Type: text/plain, Size: 150 bytes --]
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
This is the first patch, just rebased upon current master.
The ActiveState-related parts follow
[-- Attachment #2: 0001-move-Git.pm-build-instructions-into-perl-Makefile.txt --]
[-- Type: text/plain, Size: 2986 bytes --]
From 95483f27aa0aede7d19b643f321994001ab1f065 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Tue, 21 Nov 2006 23:59:11 +0100
Subject: [PATCH] move Git.pm build instructions into perl/Makefile
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Makefile | 15 +++++++++------
perl/.gitignore | 3 ++-
perl/Makefile | 23 +++++++++++++++++++++++
3 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index de3e9f3..5903a6f 100644
--- a/Makefile
+++ b/Makefile
@@ -568,8 +568,8 @@ export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi
-all: perl/Makefile
- $(MAKE) -C perl
+all:
+ $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
$(MAKE) -C templates
strip: $(PROGRAMS) git$X
@@ -602,7 +602,11 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
chmod +x $@+
mv $@+ $@
-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile
+$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
+
+perl/perl.mak: GIT-CFLAGS
+ $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
rm -f $@ $@+
INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
@@ -796,7 +800,7 @@ install: all
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
- $(MAKE) -C perl install
+ $(MAKE) -C perl prefix='$(prefix_SQ)' install
if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
then \
ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
@@ -866,8 +870,7 @@ clean:
rm -f $(htmldocs).tar.gz $(manpages).tar.gz
rm -f gitweb/gitweb.cgi
$(MAKE) -C Documentation/ clean
- [ ! -f perl/Makefile ] || $(MAKE) -C perl/ clean || $(MAKE) -C perl/ clean
- rm -f perl/ppport.h perl/Makefile.old
+ $(MAKE) -C perl clean
$(MAKE) -C templates/ clean
$(MAKE) -C t/ clean
rm -f GIT-VERSION-FILE GIT-CFLAGS
diff --git a/perl/.gitignore b/perl/.gitignore
index e990cae..98b2477 100644
--- a/perl/.gitignore
+++ b/perl/.gitignore
@@ -1,4 +1,5 @@
-Makefile
+perl.mak
+perl.mak.old
blib
blibdirs
pm_to_blib
diff --git a/perl/Makefile b/perl/Makefile
new file mode 100644
index 0000000..cff24dd
--- /dev/null
+++ b/perl/Makefile
@@ -0,0 +1,23 @@
+#
+# Makefile for perl support modules and routine
+#
+makfile:=perl.mak
+
+PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+prefix_SQ = $(subst ','\'',$(prefix))
+
+all install instlibdir: $(makfile)
+ $(MAKE) -f $(makfile) $@
+
+clean:
+ test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
+ $(RM) ppport.h
+ $(RM) $(makfile)
+
+$(makfile): Makefile.PL ../GIT-CFLAGS
+ '$(PERL_PATH_SQ)' $< FIRST_MAKEFILE='$@' PREFIX='$(prefix_SQ)'
+
+# 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
--
1.4.4.1.g3924-dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] move Git.pm build instructions into perl/Makefile
2006-11-30 16:27 ` [PATCH 1/2] " Alex Riesen
@ 2006-12-02 23:46 ` Junio C Hamano
2006-12-04 9:56 ` Alex Riesen
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2006-12-02 23:46 UTC (permalink / raw)
To: Alex Riesen; +Cc: Alex Riesen, git
"Alex Riesen" <raa.lkml@gmail.com> writes:
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
>
> ---
>
> This is the first patch, just rebased upon current master.
> The ActiveState-related parts follow
Huh?
Ah, attachment that is not inline.
diff --git a/perl/.gitignore b/perl/.gitignore
index e990cae..98b2477 100644
--- a/perl/.gitignore
+++ b/perl/.gitignore
@@ -1,4 +1,5 @@
-Makefile
+perl.mak
+perl.mak.old
blib
blibdirs
pm_to_blib
This, and perl/Makefile not cleaning perl.mak.old, are wrong.
"make && make clean" after a fresh checkout should leave the
working tree the same state is it were.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] move Git.pm build instructions into perl/Makefile
2006-12-02 23:46 ` Junio C Hamano
@ 2006-12-04 9:56 ` Alex Riesen
2006-12-04 10:31 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Alex Riesen @ 2006-12-04 9:56 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
On 12/3/06, Junio C Hamano <junkio@cox.net> wrote:
> > This is the first patch, just rebased upon current master.
> > The ActiveState-related parts follow
>
> diff --git a/perl/.gitignore b/perl/.gitignore
> index e990cae..98b2477 100644
> --- a/perl/.gitignore
> +++ b/perl/.gitignore
> @@ -1,4 +1,5 @@
> -Makefile
> +perl.mak
> +perl.mak.old
> blib
> blibdirs
> pm_to_blib
>
> This, and perl/Makefile not cleaning perl.mak.old, are wrong.
How is this wrong, and the previous (for when there weren't
Makefile at all) Makefile-in-.gitignore is not?
These are generated files, what do you want to preserve them for?
> "make && make clean" after a fresh checkout should leave the
> working tree the same state is it were.
oh, right. Missed it (never seen it generated, BTW. Just took
from Pasky's code that it happens).
Updated patch attached.
[-- Attachment #2: perl-makefile.patch --]
[-- Type: text/x-diff, Size: 3395 bytes --]
Author: Alex Riesen <raa.lkml@gmail.com>
Date: Mon Dec 4 10:50:04 2006 +0100
Subject: Move Git.pm build instructions into perl/Makefile
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
diff --git a/Makefile b/Makefile
index de3e9f3..3e6825b 100644
--- a/Makefile
+++ b/Makefile
@@ -539,6 +539,9 @@ endif
ifdef NO_ACCURATE_DIFF
BASIC_CFLAGS += -DNO_ACCURATE_DIFF
endif
+ifdef NO_PERL_MAKEMAKER
+ export NO_PERL_MAKEMAKER
+endif
# Shell quote (do not use $(call) to accommodate ancient setups);
@@ -568,8 +571,8 @@ export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi
-all: perl/Makefile
- $(MAKE) -C perl
+all:
+ $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
$(MAKE) -C templates
strip: $(PROGRAMS) git$X
@@ -602,7 +605,11 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
chmod +x $@+
mv $@+ $@
-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile
+$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
+
+perl/perl.mak: GIT-CFLAGS
+ $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
rm -f $@ $@+
INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
@@ -796,7 +803,7 @@ install: all
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
- $(MAKE) -C perl install
+ $(MAKE) -C perl prefix='$(prefix_SQ)' install
if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
then \
ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
@@ -866,8 +873,7 @@ clean:
rm -f $(htmldocs).tar.gz $(manpages).tar.gz
rm -f gitweb/gitweb.cgi
$(MAKE) -C Documentation/ clean
- [ ! -f perl/Makefile ] || $(MAKE) -C perl/ clean || $(MAKE) -C perl/ clean
- rm -f perl/ppport.h perl/Makefile.old
+ $(MAKE) -C perl clean
$(MAKE) -C templates/ clean
$(MAKE) -C t/ clean
rm -f GIT-VERSION-FILE GIT-CFLAGS
diff --git a/perl/.gitignore b/perl/.gitignore
index e990cae..98b2477 100644
--- a/perl/.gitignore
+++ b/perl/.gitignore
@@ -1,4 +1,5 @@
-Makefile
+perl.mak
+perl.mak.old
blib
blibdirs
pm_to_blib
diff --git a/perl/Makefile b/perl/Makefile
new file mode 100644
index 0000000..bd483b0
--- /dev/null
+++ b/perl/Makefile
@@ -0,0 +1,39 @@
+#
+# Makefile for perl support modules and routine
+#
+makfile:=perl.mak
+
+PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+prefix_SQ = $(subst ','\'',$(prefix))
+
+all install instlibdir: $(makfile)
+ $(MAKE) -f $(makfile) $@
+
+clean:
+ 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: > $@
+ echo ' :' >> $@
+ echo install: >> $@
+ echo ' mkdir -p $(instdir_SQ)' >> $@
+ echo ' $(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@
+ echo ' $(RM) $(instdir_SQ)/Error.pm; \
+ cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
+ echo instlibdir: >> $@
+ echo ' echo $(instdir_SQ)' >> $@
+else
+$(makfile): Makefile.PL ../GIT-CFLAGS
+ '$(PERL_PATH_SQ)' $< FIRST_MAKEFILE='$@' 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
+
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] move Git.pm build instructions into perl/Makefile
2006-12-04 9:56 ` Alex Riesen
@ 2006-12-04 10:31 ` Junio C Hamano
2006-12-04 13:52 ` Alex Riesen
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2006-12-04 10:31 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
"Alex Riesen" <raa.lkml@gmail.com> writes:
> Updated patch attached.
Will apply, thanks, but with a few tweaks while I had to hand
munge your attachment anyway.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] move Git.pm build instructions into perl/Makefile
2006-12-04 10:31 ` Junio C Hamano
@ 2006-12-04 13:52 ` Alex Riesen
0 siblings, 0 replies; 6+ messages in thread
From: Alex Riesen @ 2006-12-04 13:52 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On 12/4/06, Junio C Hamano <junkio@cox.net> wrote:
> "Alex Riesen" <raa.lkml@gmail.com> writes:
>
> > Updated patch attached.
>
> Will apply, thanks, but with a few tweaks while I had to hand
> munge your attachment anyway.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-12-04 13:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-21 22:59 [PATCH] move Git.pm build instructions into perl/Makefile Alex Riesen
2006-11-30 16:27 ` [PATCH 1/2] " Alex Riesen
2006-12-02 23:46 ` Junio C Hamano
2006-12-04 9:56 ` Alex Riesen
2006-12-04 10:31 ` Junio C Hamano
2006-12-04 13:52 ` 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).