cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AfterBuild patch, problem with correction


From: Marcello Pietrobon
Subject: Re: AfterBuild patch, problem with correction
Date: Tue, 28 Nov 2000 23:22:29 -0600

Hi,
after a recent letter from Gary I finally understood something.
What was making me crazy was the fact, beside other minor things, that I've
never been able to imagine that
using a command like:
Build ("$BUILD/Conscript");
do not imply that I have manually to create a Conscript file in the directory
$BUILD.
Gary told me explicitly (I needed of that) that
"Cons will automatically figure out that you really mean the Conscript
in the top directory".

So finally everything is working in a more logical way.

But now AfterBuild with my modification doesn't work anymore.
But it doesn't work even without that modification.

So I looked at your example in the attachment and I see that you don't call
AfterBuild
You call Command() instead to test AfterBuild() !

How can be possible ?
In Cons (with the AfterBuild patch) there isn't any points where AfterBuild is
called !

An other question.
I don't pretend you answer me, but I'm hoping that because perhaps in few
minutes you can save me hours, or days (which I don't have).
My goal is to build a file, to execute it, than to build the next one, execute
it, and so on with all the files in the directory

What I'm expecting I have to do is, in the Conscript file, something like:
  Program $env $tgt, $src;
  AfterBuild $env $tgt, qq(system q($EXPORT$\$tgt)); #launch the program $tgt
to test it.
But now that I'm trying to respect the logic of Cons it doesn't work anymore.

What would you do ?
Also when using AfterBuild do I have to set the dependencies to launch my
command before building the next file ?
If I set the dependencies between the last file built and the next source file
how can make a source file to be built even if building the preceding one
failed ?

Every answer is very much appreciated

Marcello

Zachary Deretsky wrote:

> > -----Original Message-----
> > From: Giovanni Pietrobon [mailto:address@hidden
> > Sent: Friday, November 17, 2000 12:12 AM
> > To: Gary Oberbrunner
> > Cc: Zachary Deretsky
> > Subject: Re: AfterBuild patch
> >
> >
> > Hi,
> > thank you for your patch.
> > It let my to understand how cons works.
> >
> > It works also with cons-2.1.2 if I apply a small correction:
> >
> >     # return $_[0]->{status} if $_[0]->{status};     #1
> >              # 1)  commented out
> >     return $_[0]->{status} if ! $_[0]->{after_build_func};  # 2)
> >     return $_[0]->{status} if $_[0]->{status} ne 'built'; #  3)
> >
> > 2) is applied if we don't want to eval and execute an empty expression
> > 3) is added if we want to execute the expression only when
> > the file has just been build, and not if previously existent ('handled').
> >
> > Marcello
> >
> >
>
> I applied Gary's patch to cons build 1.126. It works for me, so far.
>
> I attach small Construct and Conscript. If you run them, then nothing gets
> built:
>
> D:\gand_dbg\nt>cons -d
> Icwizard Conscript
> Target buildNT\debug\icwizard\src\all_pyfiles.txt:
> buildNT\debug\icwizard\src\pyfiles_gandalf.txt bu
> ildNT\debug\icwizard\src\pyfiles_tpc.txt
> Target exportNT\debug\python\all_pyfiles.txt:
> buildNT\debug\icwizard\src\all_pyfiles.txt
> cons.bat: nothing to be built in ".".
>
>   ------------------------------------------------------------------------
>                 Name: Construct
>    Construct    Type: unspecified type (application/octet-stream)
>             Encoding: quoted-printable
>
>                 Name: Conscript
>    Conscript    Type: unspecified type (application/octet-stream)
>             Encoding: quoted-printable




reply via email to

[Prev in Thread] Current Thread [Next in Thread]