# [PATCH] Fix generation of perl/perl.mak

3 messages from 2007-10-25 to 2007-10-25. Participants: Alex Riesen, Johannes Schindelin.
Thread: https://gitlist.dev/t/10465

## Alex Riesen, 2007-10-25 20:17

Subject: [PATCH] Fix generation of perl/perl.mak
Message-ID: <20071025201724.GA11308@steel.home>
URL: https://gitlist.dev/e/20071025201724.GA11308%40steel.home

```
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.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 Makefile |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index b728920..72f5ef4 100644
--- a/Makefile
+++ b/Makefile
@@ -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
 
-- 
1.5.3.4.403.g401f6

```

## Johannes Schindelin, 2007-10-25 20:42

Subject: Re: [PATCH] Fix generation of perl/perl.mak
Message-ID: <Pine.LNX.4.64.0710252140500.4362@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0710252140500.4362%40racer.site
In-Reply-To: <20071025201724.GA11308@steel.home>

```
Hi,

On Thu, 25 Oct 2007, Alex Riesen wrote:

> Besides, a changed Git.pm is *NOT* a reason to rebuild all the perl 
> scripts, so remove the dependency too.
>
> [...]
> 
> @@ -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

```

## Alex Riesen, 2007-10-25 21:21

Subject: Re: [PATCH] Fix generation of perl/perl.mak
Message-ID: <20071025212129.GB11308@steel.home>
URL: https://gitlist.dev/e/20071025212129.GB11308%40steel.home
In-Reply-To: <Pine.LNX.4.64.0710252140500.4362@racer.site>

```
Johannes Schindelin, Thu, Oct 25, 2007 22:42:07 +0200:
> On Thu, 25 Oct 2007, Alex Riesen wrote:
> 
> > Besides, a changed Git.pm is *NOT* a reason to rebuild all the perl 
> > scripts, so remove the dependency too.
> >
> > [...]
> > 
> > -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.

```
