Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Make CPAN distribution.

Report information
The Basics
Id: 5716
Status: rejected
Priority: 0/
Queue: Make

People
Owner: Nobody in particular
Requestors: pverdret [...] caramail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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--
[pverdret@caramail.com - Thu Mar 18 12:14:14 2004]: Show quoted text
> 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.
Hmm, having a way of setting environment variables with pmake is a good idea. Unix makes don't usually add command line args to env though. Need to think about it. Show quoted text
> > 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($_-
> >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(); > } > } > > _________________________________________________________ > Le journal des abonn=E9s Caramail - http://www.carazine.com > > > --=_NextPart_Caramail_0186131008159790_ID-- > > > >
Since other makes don't do this, and there are already ways to set env-vars, there is no reason to do so in this program. Reluctantly closing.