parrot_config RFC

Andy Dougherty doughera at lafayette.edu
Thu Jun 25 20:30:46 UTC 2009


On Tue, 23 Jun 2009, Jeff Horwitz wrote:

> On Mon, 22 Jun 2009, James E Keenan wrote:
> 
> > Since jhorwitz asked me about this just now at YAPC|10 Parrot BOF, a data
> > point:
> > 
> > ./parrot_config --dump | grep '$('
> > cat => '$(PERL) -MExtUtils::Command -e cat'
> > chmod => '$(PERL) -MExtUtils::Command -e ExtUtils::Command::chmod'
> > cp => '$(PERL) -MExtUtils::Command -e cp'
> > libparrot => '$(LIBPARROT_SHARED)'
> > libparrot_shared => 'libparrot$(SHARE_EXT).$(SOVERSION)'
> > libparrot_shared_alias => 'libparrot$(SHARE_EXT)'
> > libparrot_soname => '-Wl,-soname=libparrot$(SHARE_EXT).$(SOVERSION)'
> > mkpath => '$(PERL) -MExtUtils::Command -e mkpath'
> > mv => '$(PERL) -MExtUtils::Command -e mv'
> > rm_f => '$(PERL) -MExtUtils::Command -e rm_f'
> > rm_rf => '$(PERL) -MExtUtils::Command -e rm_rf'
> > touch => '$(PERL) -MExtUtils::Command -e touch'
> 
> i ended up working around this problem, so it's not as critical for me
> anymore.  that said, i decided to dig a little deeper for the greater good.  i
> found that the Makefile-style variables are hidden in the OS hints files.  it
> doesn't make much sense to expand them there, but we might want to consider
> doing it while generating parrot_config.  i already wrote the expansion code
> for mod_parrot -- i'll see if i can shoehorn it in.

I don't know what, precisely "this problem" is, but permit me a general
observation: Before adding in yet another layer of variable expansion,
it might be worthwhile to step back as you did and ask where these
variables came from, and question why they exist at all.

Most of them (cat, chmod, cp, mkpath, mv, rm_f, rm_rf, and touch) are
documented in config/init/defaults.pm as '#some utilities in Makefile'.
I don't know whether or not they are a problem.  They are documented
as variables to be used in a Makefile, and they work quite well in
that context.  However, they are also sufficiently vanilla commands that
expanding out the $(PERL) would probably make little or no difference.
It also may not be at all relevant, since I'm unclear whether you are
trying to use these utility commands outside of a Makefile.  If you are,
you may be better off just using the ExtUtils::Command versions directly.

The remaining ones (libparrot, libparrot_shared, libparrot_shared_alias,
and libparrot_soname) look to me as if they can (and should) simply be
expanded by Configure.pl in the first place.

-- 
    Andy Dougherty		doughera at lafayette.edu


More information about the parrot-dev mailing list