[Scons-users] Print out messages only if target is building

Bill Deegan bill at baddogconsulting.com
Wed Aug 1 14:22:33 EDT 2018


+1 to optionally including sconscripts.
Just be forewarned if the sconscripts set CPPPATH or other needed for the
rest of the build, you'll have to work around that.


On Wed, Aug 1, 2018 at 10:24 AM, Jack Brennen <jbrennen at qti.qualcomm.com>
wrote:

> You should be able to make the SConscript inclusion conditional.
>
> I would do something like this, which feels a little cleaner to me:
>
> if 'SOME_SDK_ROOT' in os.environ:
>    #
>    #  Include subsidiary SConscript, but only if SOME_SDK_ROOT env var is set.
>    #
>    SConscript(...)
>
>
> - Jack
>
>
>
> On 8/1/2018 10:03 AM, Bill Deegan wrote:
>
> SConscripts are not targets.
>
> Can you provide more detail?
> Do you want some text output when a give program is built? Or a library?
> or something else?
>
> On Wed, Aug 1, 2018 at 9:28 AM, Mats Wichmann <mats at wichmann.us> wrote:
>
>> On 08/01/2018 06:19 AM, Anna Cheremnykh wrote:
>> > Hi,
>> >
>> > I stuck with a problem: I want to print message only when given
>> > target(Scinscript) is building.
>> > What we have: several samples, each sample in separate directory with
>> > separate Sconscript. Some of samples require 3rdparty SDKs and
>> > environment variables set to these SDKs. But if developer doesn't have
>> > such env var - sample build should be just skipped without errors.
>> > So in sconsripts we added something like this:
>> >
>> > if not os.getenv('SOME_SDK_ROOT'):
>> >     print('SOME_SDK_ROOT  not found, ' + sample_name + ' build skipped')
>> >     Return()
>> >
>> > I understand that scons read all sconsript files first. And I see this
>> > message every time even if I build another samples or another
>> > components. So my question how NOT to print messages if I call another
>> > target from another Sconscript? Thanks!
>> >
>>
>> I think you can look at COMMAND_LINE_TARGETS and BUILD_TARGETS to maybe
>> figure something out?
>>
>> https://scons.org/doc/3.0.1/HTML/scons-user.html#sect-comman
>> d-line-targets
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
>
>
> _______________________________________________
> Scons-users mailing listScons-users at scons.orghttps://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180801/0828adb9/attachment-0001.html>


More information about the Scons-users mailing list