threads / patch / 43692

patch, 2 partsadd a flag to disable using of Perls MakeMaker module.

Subject: [PATCH 2/2] add a flag to disable using of Perls MakeMaker module.

## tl;dr

One message between Nov 30, 2006 and Nov 30, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Alex Riesen· Nov 30, 2006, 16:30 UTC · lore

There installations (Cygwin + ActivateState Perl) where the generated makefiles are not usable, because of lineendings and backslashes. The flags is NO_PERL_MAKEMAKER.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>

--- Just remembered configure script. Maybe it could be taught to notice the situation and do something about it (like setting the NO_MAKEMAKER).

From 06fc5e98754de98b44746d8962da16a58a5a5d28 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Thu, 30 Nov 2006 17:15:33 +0100
Subject: [PATCH] add a flag to disable using of Perls MakeMaker module.
There installations (Cygwin + ActivateState Perl) where the generated makefiles
are not usable, because of lineendings and backslashes. The flags is
NO_PERL_MAKEMAKER.
---
 Makefile      |    3 +++
 perl/Makefile |   15 +++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
Show changes to 2 files +18 −0

Makefile, perl/Makefile

diff --git a/Makefile b/Makefile
index 5903a6f..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);
 
diff --git a/perl/Makefile b/perl/Makefile
index cff24dd..a1b98bd 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -14,10 +14,25 @@ clean:
 	$(RM) ppport.h
 	$(RM) $(makfile)
 
+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
+
-- 
1.4.4.1.g3924-dirty

← back to recent threads