cons-discuss
[Top][All Lists]
Advanced

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

Command, Depends, NT questions


From: Zachary Deretsky
Subject: Command, Depends, NT questions
Date: Fri, 27 Oct 2000 14:44:37 -0700

I am creating a Conscript file involving several commands calling swig, in
particular.
I need to gain more understanding on what is going on since I am not
succeeding.
Below is my (simplified) Conscript file followed by my questions.

# -*- Perl -*-

Import qw(CONS INCLUDE LIB BIN PYTHON SWIG TABLES BUILD BUILDTYPE EXPORT
DEFINES RULES);

$thisDir = DirPath '.';
$absInclude = DirPath $INCLUDE;

################## First command clause, works fine
Depends $CONS 'rings.ii', ("rings.iic", "$BIN/rings.dll");
Command $CONS 'rings.ii', "$BIN/rings.dll", qq(
        perl $CONS->{ENV}{TOOLSDIR}/swigig.pl -s -V HN -c %>:b.iic -o %> %<
d:/bin/symread
);
################## First command clause, works fine

############# never called, does not complain about FISH
Depends $CONS qw(rings.i), qw(
                      FISH
                            gandalf.i
                            autpyapi.ii
                            geom.ii
                            ctm.ii
                            rtc.ii
                            rngCommon.hpp
                            rings_typemaps.i
                            rings.ii
                            rings.iim
);
############# never called, does not complain about FISH


############# apparently called because rings.i is copied to the build
directory
Depends $CONS 'rings.cpy', qw(rings.i rings.ii);
############# apparently called because rings.i is copied to the build
directory


############# never called, does not complain about FISH
Depends $CONS 'ringspyapi.py', qw(rings.i rings.ii FISH);
############# never called, does not complain about FISH

#############  apparently the second file on the target list, ringspyapi.py
is not processed
Command $CONS qw(rings.cpy ringspyapi.py), qw(rings.i), qq(
     swig -I$absInclude -I$thisDir -dhtml -c++ -shadow -python -c++ -o %>
$thisDir/rings.i
     mv %>:d\\ringspyapi.py %>:d\\ringspyapi.py.org
     echo from autpyapi import * > %>:d\\ringspyapi.py
     sed -e 's/ctmCL/ctmpyapi.ctmCL/g' %>:d\\ringspyapi.py.org >>
%>:d\\ringspyapi.py
);


######## End of Conscript

1. Do I understand it correctly that cons looks at targets of the Command
calls and
then processes Depens calls for these targets? According to my experiments
if
target is a list then only the first element is processed. In the above
"Depends $CONS 'ringspyapi.py', qw(rings.i rings.ii FISH);" is never
processed.
Is this a bug or a feature?


2. Apparently dependencies are not recursive: although rings.cpy depends on
rings.i,
dependencies of rings.i (with FISH) are never processed.

3. What causes a file from the source directory to be copied (on NT which
does not
have links) to the build directory? In my case I need rings.iim included
into rings.i
to be present in the build directory.

4. Which directories are searched for the files in Depends method?

I am using cons 2.1.2

Thanks, Zach.




reply via email to

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