Re: How to build only a subset of targets under a directory

Bill Deegan <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CHp9RRZuc=hajZkRG_fQ2kQn7kyxTzUPTUkY0XGKmFjRw@mail.gmail.com>
I guess I'm not really clear what you want to do.

You could make a PsuedoBuilder (see users guide/manpage) something like

env.TestProgram(...)
And that could add all your tests to an alias progrmatticaly and also pass
the args to Program()..

Would something like that work?

On Fri, Apr 1, 2022 at 1:51 PM Jay West <[email protected]> wrote:

> Using a target file is good when you want to compile only one target.  In
> this case, there may be a lot of targets within a subdirectory, so naming
> every target associated with, say "test" within a subdirectory is not
> practical.  In general, you don't know the specific names of all the "test"
> targets within a subdirectory.
>
> Jay
>
>
> On Fri, Apr 1, 2022 at 1:05 PM Bill Deegan <[email protected]>
> wrote:
>
>> Jay,
>>
>> You can list all the targets individually, you don't need aliases..
>>
>> scons dir/dir/target_file works
>> and you can specify N targets on the command line.
>>
>> Is that what you're looking for?
>>
>> -Bill
>>
>> On Fri, Apr 1, 2022 at 12:13 PM Jay West <[email protected]> wrote:
>>
>>> Is there a way to build only a subset of targets under a directory,
>>> instead of all targets under that directory?
>>>
>>> For example:
>>>
>>> top/aa
>>>   Alias('bin', bin_a)
>>>   Alias ('test', test_a)
>>> top/bb
>>>   Alias('bin', bin_b)
>>>   Alias ('test', test_b)
>>>
>>> scons top/aa # builds bin_a and test_a
>>> scons bin # builds bin_a and bin_b
>>>
>>> I want to do something like:
>>> cd top/aa; scons bin # build only bin_a
>>>
>>> I know that I can define more aliases, but doing so is a maintenance
>>> headache.  Is there better way?
>>>
>>> Thanks,
>>>
>>> Jay
>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> [email protected]
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>> _______________________________________________
>> Scons-users mailing list
>> [email protected]
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.