[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cons 2.3.0 bug?
From: |
Rajesh Vaidheeswarran |
Subject: |
Re: Cons 2.3.0 bug? |
Date: |
Tue, 31 Jul 2001 23:08:44 -0400 |
----- Original Message -----
From: "Steven Knight" <address@hidden>
To: "Gary Oberbrunner" <address@hidden>
Cc: "Cons-Discuss" <address@hidden>
Sent: Monday, July 30, 2001 6:39 PM
Subject: Re: Cons 2.3.0 bug?
> On Mon, 30 Jul 2001, Gary Oberbrunner wrote:
> > I seem to have discovered a bug in Cons in multi-target commands.
> > I've enclosed a Construct which works properly the first time, but if
you
> > change 'hello' to 'goodbye' in the Conscript it rebuilds a.c, b.h, and
c.h,
> > but then stops -- it doesn't rebuild a.exe.
> >
> > The way this script is SUPPOSED to work is that the first Command
generates
> > a script foo.bat, which, when run, will generate some source code. The
> > second Command uses foo.bat to generate a.c, and also does some other
stuff.
> > This is the Command with the bug. The final Program uses the generated
a.c
> > to make a (or a.exe on Win32).
> >
> > To repro: run the Construct, then change 'hello' to 'goodbye' and re-run
it.
> > It'll re-generate a.c, but won't rebuild a (or a.exe).
> >
> > I've enclosed two versions of the Construct, one for Win32, and one for
> > Unix. It behaves the same on either platform, I just want to make it
easy
> > to repro.
> >
> > Any hints on why this is happening? It seems to happen whenever the
target
> > is an array reference, whether or not there's a second item in the
array.
> > I'm stumped.
>
> I'm pretty sure this is because the environment isn't getting propagated
> through the build::multiple package that handles array references. This
> used to not be necessary, but now it's needed so that Cons can consult
> the SIGNATURE value in the environment to decide what signature to use
> to determine if the target is out of date.
>
> I've appended a patch below. If this doesn't fix it, there's some other
> problem at work, so speak up again. (The patch is from already-checked
> in source; Rajesh, any idea when you'll have time to release 2.3.1 so
> these fixes are readily available?)
I was hoping that if the last of the bugs have trickled in, then we could
just
release the fixed version and mark it as the 2.4 stable release.
> --SK
>
>
>
> Index: src/cons.pl
> ===================================================================
> RCS file: /home/cvs/cons/src/cons.pl,v
> retrieving revision 1.162
> retrieving revision 1.163
> diff -c -r1.162 -r1.163
> *** src/cons.pl 2001/06/11 03:58:44 1.162
> --- src/cons.pl 2001/06/15 20:20:27 1.163
> ***************
> *** 15,21 ****
>
> use vars qw( $CVS_id $CVS_ver $ver_num $ver_rev $version );
>
> ! $CVS_id = '$Id: cons.pl,v 1.162 2001/06/11 03:58:44 knight Exp $ ';
> $CVS_ver = (split(/\s+/, $CVS_id))[2];
>
> $ver_num = "__VERSION__";
> --- 15,21 ----
>
> use vars qw( $CVS_id $CVS_ver $ver_num $ver_rev $version );
>
> ! $CVS_id = '$Id: cons.pl,v 1.163 2001/06/15 20:20:27 knight Exp $ ';
> $CVS_ver = (split(/\s+/, $CVS_id))[2];
>
> $ver_num = "__VERSION__";
> ***************
> *** 1667,1673 ****
>
> sub new {
> my($class, $builder, $tgts) = @_;
> ! bless { 'builder' => $builder, 'tgts' => $tgts };
> }
>
> sub scriptsig {
> --- 1667,1673 ----
>
> sub new {
> my($class, $builder, $tgts) = @_;
> ! bless { 'builder' => $builder, 'env' => $builder->{env}, 'tgts' =>
$tgts };
> }
>
> sub scriptsig {
>
>
>
> _______________________________________________
> address@hidden
> http://mail.gnu.org/mailman/listinfo/cons-discuss
> Cons URL: http://www.dsmit.com/cons/