[Scons-users] emitter create dependency cycle
Philipp Kraus
philipp.kraus at flashpixx.de
Wed Sep 4 09:19:18 EDT 2013
On 2013-09-04 13:05:54 +0000, Gary Oberbrunner said:
>
>
>
> On Wed, Sep 4, 2013 at 9:01 AM, Philipp Kraus
> <philipp.kraus at flashpixx.de> wrote:
> On 2013-09-04 12:51:50 +0000, Gary Oberbrunner said:
> ...
> Can you use Ignore() to make the dir ignore the new files you're creating?
>
> http://www.scons.org/doc/2.3.0/HTML/scons-user.html#AEN1275
> Hi Gary,
> IMHO I can use ignore, because only the targets are needed, but how can
> I use ignore in my builder script - not in my build (SConstruct) script?
> I need the package call, is it SCons.Ignore, isn't it?
>
> I usually do
> from SCons.Script import *
> then you can write things in your external script the same as in SConscript.
>
> http://www.scons.org/doc/2.3.0/HTML/scons-user.html#AEN3822
I get always the dependy cycle. My emitter shows:
def __GitFileListEmitter( target, source, env ) :
cmd = env.subst(env["mycommand"], source=source)
handle = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
target = handle.stdout.readlines()
handle.communicate()
if handle.returncode <> 0 :
raise SCons.Errors.StopError("error [%s]" % (cmd, source[0]) )
target = list(set( [os.path.join(source[0].abspath, i.strip()) for
i in target] ))
SCons.Script.Ignore(target, source)
return target, source
For my test build with Lua Bridge shows a cycle:
library/build/lua/bridge/README.md ->
library/build/lua/bridge/Source/LuaBridge/detail/Constructor.h ->
library/build/lua/bridge/Source/LuaBridge/detail ->
library/build/lua/bridge/Source/LuaBridge ->
library/build/lua/bridge/Source -> library/build/lua/bridge/Manual.html
-> library/build/lua/bridge/index.html ->
library/build/lua/bridge/README.md
If I remove source[0].abspath everythings fine, but the resulting files
are incorrect (path is incorrect)
The Ignore call should IMHO ignore any connection between each target
and source, but this seems to be a cycle between the targets. Each
target has got a unique path, but all targets in the "source"
directory. source is a single Dir object and target should be only a
list of files.
Thanks a lot
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130904/db6d1db9/attachment.htm
More information about the Scons-users
mailing list