develooper Front page | perl.perl5.porters | Postings from January 2009

Re: merging make_ext and make_ext_cross

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
January 11, 2009 05:57
Subject:
Re: merging make_ext and make_ext_cross
Message ID:
20090111135727.GI2919@plum.flirble.org
On Sun, Jan 11, 2009 at 02:20:29PM +0100, Konovalov, Vadim (Vadim)** CTR ** wrote:
> > From: Nicholas Clark [mailto:nick@flirble.org] On Behalf Of 
> 
> ....
> 
> > So the trick is to save the Makefile as Makefile.old and use that for
> > distclean.
> > 
> > 
> > 
> > This, of course, all works fine if make_ext is a shell 
> > script, as it doesn't
> > rely on anything we built to run make distclean. But if we 
> > simply change
> > make_ext to rely on miniperl, we have a problem if we run make clean;
> > make distclean, as it has already gone.
> > 
> > 
> > Not certain what to do, but it strikes me that as make_ext 
> > runs it could
> > write out the shell* instructions to run distclean into a 
> > shell "script" at
> > top level, and we could change realclean (and distclean) to 
> > use that, rather
> > than recurse into ext/ via make_ext.
> 
> I like the idea!
> 
> I will send such a patch within a day, if no-one minds.
> (of course, Nicholas, if you're all in this and willing to implement - I will not dare to interfere :) )

Steffen Mueller actually has all of ext/util/make_ext re-written in Perl,
but (I believe) doesn't have ext/util_make_ext_cross integrated with it,
nor has anyone dealt with the make clean; make distclean problem described.
(make distclean; on its own works fine)

Also, Yves thought it easier to convert ext/util/make_ext to Perl first, then
figure out how to merge it with the Win32 code, rather than trying to compare
a shell script with Perl code.


So best to work out how to avoid duplicating work.

As far as he and I can see, make_ext_cross is identical to make_ext, except
that it invokes Makefile.PL with -MCross. So I assume that the right way
forward is to add an option to the new make_ext.pl to use -MCross, and then
change the 4 lines in Cross/Makefile-cross-SH that currently invoke
make_ext_cross, to instead invoke make_ext.pl with the 'use -MCross' option
enabled.

So is it best if we patch blead to change ext/util/make_ext to
ext/util/make_ext.pl, and then let you patch that (and test it) to incorporate
the -MCross option, and eliminate ext/util/make_ext_cross ?

(then sort out disclean, and work out how to merge the Win32 code)

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About