[Scons-users] How to correctly use emitters

William Blevins wblevins001 at gmail.com
Wed Oct 26 02:50:56 EDT 2016


Pierre-Luc,

SCons will automatically create a target if you do not specify one based on
the source. I believe it just replaces the source file extension
(src_suffix) with the target suffix (suffix) which you did not specify
(thus empty string).

V/R,
William

On Tue, Oct 25, 2016 at 5:04 PM, Pierre-Luc Boily <pierreluc.boily at gmail.com
> wrote:

> William,
>
> Sorry to bug you with this again.  Emitters are easy to  understand
> following the documentation "tool for fool", thx!
>
> But, there is still something I don`t understand in my own code.  For
> following example, I completely removed my emitter and call my builder like
> this :
>
> /target = env.buildGrammar(source = env['ENV']['LOCALROOT'] +
> '/LINK/bin/win32/sideLibrary.jar')/
>
> This gives the following tree :
> /scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> _build_grammar(["LINK\bin\win32\sideLibrary"],
> ["LINK\bin\win32\sideLibrary.jar"])
> +-.
>   +-build
>   | +-build\debug
>   |   +-build\debug\sr
>   |     +-build\debug\sr\sra
>   |       +-build\debug\sr\sra\src
>   |         +-build\debug\sr\sra\src\grammars
>   |           +-build\debug\sr\sra\src\grammars\win32
>   |             +-sr\sra\src\grammars\src_grammars.scj
>   +-c
>   +-cm
>   | +-cm\scons
>   |   +-cm\scons\adacelBuilders
>   +-LINK
>   | +-LINK\bin
>   |   +-LINK\bin\win32
>   |     +-LINK\bin\win32\sideLibrary
>   |     | +-LINK\bin\win32\sideLibrary.jar
>   |     +-LINK\bin\win32\sideLibrary.jar
>   +-SConstruct
>   +-sr
>     +-sr\sra
>       +-sr\sra\src
>         +-sr\sra\src\grammars
>           +-sr\sra\src\grammars\src_grammars.scj
> scons: done building targets./
>
> It you see the _build_grammar call, it looks like that scons mechanism
> creates a target (sideLibrary) from sideLibrary.jar.  There is something I
> really don`t understand here :(
>
>
>
> --
> View this message in context: http://scons.1086193.n5.
> nabble.com/How-to-correctly-use-emitters-tp40675p40679.html
> Sent from the Users mailing list archive at Nabble.com.
> _______________________________________________
> 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/20161026/1d099fd0/attachment.html>


More information about the Scons-users mailing list