[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Command, Depends, NT questions
From: |
Steven Knight |
Subject: |
RE: Command, Depends, NT questions |
Date: |
Fri, 27 Oct 2000 22:49:18 -0500 (CDT) |
On Fri, 27 Oct 2000, Zachary Deretsky wrote:
> > > 2. Apparently dependencies are not recursive: although
> > rings.cpy depends on
> > > rings.i,
> > > dependencies of rings.i (with FISH) are never processed.
> >
> > You've specified dependencies of rings.i, but you've never
> > specified any
> > place where it's actually built (i.e., no Command for it).
> > That probably
> > explains why it isn't processed...
>
> I use Link and Build:
>
> Link "$BUILD/ringspyapi/src" => "#ringspyapi/src";
> Build ("$BUILD/ringspyapi/src/Conscript");
>
> rings.i is not being built, it is a source file in the source directry.
> It is also a source file for the second command and it includes a bunch
> of files. If any of these files get changed, then this command should be
> re-run. How do I achieve that?
Okay, if rings.i is a source file, then it isn't being built in the
Cons sense. Creating a Linked copy of a file is not a "build" of
the file, because it's not actually being generated from other input.
Dependencies being out of date cause files to be re-built--that is,
regenerated from one or more other files.
If rings.i is the input file used to generate rings.cpy and ringspyapi.py,
and it includes a bunch of other files, then rings.cpy and ringspyapi.py
are the targets, and it is the *targets* that depend on the source file
or files. So the quick fix would be to change that Depends line from:
Depends $CONS qw(rings.i), qw(
to:
Depends $CONS [qw(rings.cpy ringspyapi.py)], qw(
But this is still sub-optimum, because if you (e.g.) add a new include
file, you also have to list it in your Conscript file. The next step
would be for you to use QuickScan to write a dependency scanner for
.i files that would pull the dependencies out of rings.i without your
having to duplicate it by hand. See the doc and the FAQ for info.
> > > 4. Which directories are searched for the files in Depends method?
> >
> > None. The path names are relative to the directory in which
> > the Conscript
> > file lives,
>
> Do you mean the build directory or the original source directory?
Build directory. The Link of the Conscript file from the original
source directory happens at a lower layer, more-or-less transparently.
In theory, anyway.
--SK