cons-discuss
[Top][All Lists]
Advanced

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

RE: Dynamic target: for the sake of clarity


From: Steven Knight
Subject: RE: Dynamic target: for the sake of clarity
Date: Thu, 16 Nov 2000 06:30:46 -0600 (CST)

On Wed, 15 Nov 2000, Zachary Deretsky wrote:
> For my own sake as well I would like to understand
> how cons computes dependencies and what is the difference between
> Gary's and Steven's approaches.
        .
        .
        .
> Now, result.exe should be rebuilt in case input1.txt or input2.txt
> or main.c change and in the case the list @python_files changes or 
> any of the file members of that list change.
> 
> How does each method ensure that this happens?

In either case, Cons will calculate a different MD5 signature for the
result.exe file based on the different lists of input C files, and
result.exe will be rebuilt.

> In Steven's approach will the perl code (combining A. and B.)
> be executed on every cons invocation? Will the MD5 checksums
> kept for the @c_files?

Yes.  Don't forget, a Construct/Conscript file is just a Perl script,
so anything you do directly in Perl just gets executed like Perl.

> Sould I add something like
> Depends $CONS 'result.exe', @python_files;
> 
> or, since @python_files is not static
> 
> Depends $CONS 'result.exe', python_files.txt;
> $CONS->QuickScan(\&cons::my_txt_Scan, "python_files.txt", $PYTHON_PATH);

Not necessary, in either case.  The dependency is established between
result.exe and the list of input C files.  If the list changes (or
the contents of any file on the list change), the signatures change,
and result.exe will be rebuilt.

        --SK




reply via email to

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