Subject: | on pmake |
Date: | Thu, 18 Mar 2004 17:14:09 +0000 |
To: | bug-Make [...] rt.cpan.org |
From: | Philippe Verdret <pverdret [...] caramail.com> |
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--=_NextPart_Caramail_0186131008159790_ID
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Nick,
On my windows machine i'm a user of your very useful
pmake. On otherplateform, with other make avartar, it
seems to me that when you put parameters on the command
line, these parameters are automatically defined
as environment variables. So the following minor
modification of the apply() method. That's satisfied my
own needs, but i ignore if this modification is really
right.
Regards
Philippe
sub apply
{
my $self =3D shift;
my $method =3D shift;
$self->NextPass;
my @targets =3D ();
# print STDERR join(' ',Apply =3D> $method,@_),"\n";
foreach (@_)
{
if (/^(\w+)=3D(.*)$/)
{
#print STDERR "OVERRIDE: $1 =3D $2\n";
$self->{Override}{$1} =3D $2;
# PHV
$ENV{$1} =3D $2;
# PHV
}
else
{
push(@targets,$_);
}
}
#
# This expansion is dubious as it alters the database
# as a function of current values of Override.
#
$self->ExpandTarget; # Process $(VAR) :
@targets =3D ($self->{'Targets'}[0])->Name unless (@targets);
# print STDERR join(' ',Targets =3D> $method,map($_-
Show quoted text
>Name,@targets)),"\n";
foreach (@targets)
{
my $t =3D $self->{Depend}{$_};
unless (defined $t)
{
print STDERR join(' ',$method,@_),"\n";
die "Cannot `$method' - no target $_"
}
$t->$method();
}
}
Show quoted text_________________________________________________________
Le journal des abonn=E9s Caramail - http://www.carazine.com
--=_NextPart_Caramail_0186131008159790_ID--