Skip to contentSkip to conversation

Fix generation of perl/perl.mak

PATCH In review Alex Riesen 2 participants 3 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix generation of perl/perl.mak

The code generating perl/Makefile from Makefile.PL was causing trouble because it didn't considered NO_PERL_MAKEMAKER and ran makemaker unconditionally, rewriting perl.mak. Makemaker is FUBAR in ActiveState Perl, and perl/Makefile has a replacement for it.

Besides, a changed Git.pm is *NOT* a reason to rebuild all the perl scripts, so remove the dependency too.

---
 Makefile |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
Makefile +1 -5
index b728920..72f5ef4 100644
@@ -812,7 +812,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 
 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
 
-perl/perl.mak: GIT-CFLAGS
+perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL
 	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
 
 $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
@@ -931,10 +931,6 @@ $(XDIFF_LIB): $(XDIFF_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(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
 
Signature · 1 line
1.5.3.4.403.g401f6
#1 lore raw

Hi,

Makefile $(XDIFF_LIB): $(XDIFF_OBJS) · line 937

Quoted 13 lines · Alex Riesen

Besides, a changed Git.pm is *NOT* a reason to rebuild all the perl scripts, so remove the dependency too.

[...]

Makefile +0 -4
@@ -931,10 +931,6 @@ $(XDIFF_LIB): $(XDIFF_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS)
 
 
-perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS
-	(cd perl && $(PERL_PATH) Makefile.PL \
-		PREFIX='$(prefix_SQ)')
-

This is not really the dependency triggering a rebuild of all perl scripts, right?

Ciao,
Dscho

#2 lore raw

Johannes Schindelin, Thu, Oct 25, 2007 22:42:07 +0200:

Quoted 7 lines · Alex Riesen
Quoted 6 lines

Besides, a changed Git.pm is *NOT* a reason to rebuild all the perl scripts, so remove the dependency too.

[...]

Quoted 7 lines

Makefile $(XDIFF_LIB): $(XDIFF_OBJS) · line 937

Quoted 4 lines
Makefile +0 -4
-perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS
-	(cd perl && $(PERL_PATH) Makefile.PL \
-		PREFIX='$(prefix_SQ)')
-

This is not really the dependency triggering a rebuild of all perl scripts, right?

In a way. This rebuilds perl/perl.mak which, in turn, can cause the rebuild of all perl scripts. The rule you replaced with "[...]" does the same, but uses perl/Makefile, which generates the perl.mak
depending on the NO_PERL_MAKEMAKER setting.