cons-discuss
[Top][All Lists]
Advanced

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

Re: Dynamic target: How to get a file from source irectory to the linked


From: Steven Knight
Subject: Re: Dynamic target: How to get a file from source irectory to the linked build directory?
Date: Thu, 16 Nov 2000 05:46:00 -0600 (CST)

On Wed, 15 Nov 2000, Zachary Deretsky wrote:
> > If the input text files are source files (i.e., aren't generated by
> > an action), then you could do this more simply by executing step 1 in
> > straight perl, either coded directly or by calling a utility to do it,
> > like so:
> >
> >     @c_files = `generate_list input1.txt input2.txt`;
> >     Program $env 'output.exe', @c_files;
> >
> 
> I started implementing this suggestion and the old problem sufaces again:
> what is a simple and sure way to bring a file from the source directory to
> the build directory?
> 
> I get this error when my generate_list subroutine tries to open up a file.
> 
> cons.bat: error in file "icwizard\src\Conscript" (: open
> buildNT\debug\icwizard\src/pyfiles_gandalf.txt: No such file or directory)

Rather than try to bring the source file into the Linked build directory,
you can use the SourcePath method to find it in its original location.
Unfortunately, I just looked, and the SourcePath method only takes a
single argument, so right now you'd need to use it as follows:

        foreach $file (qw(input1.txt input2.txt)) {
                push(@input_files, SourcePath($file));
        }
        @c_files = `generate_list @input_files`;
        Program $env 'output.exe', @c_files;

This will work even if the file is in a Repository.

        --SK




reply via email to

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