[Scons-users] emitter create dependency cycle

William Deegan bill at baddogconsulting.com
Fri Sep 6 14:11:15 EDT 2013


Phil,

Stil a print here:

>> SCons.Script.Ignore(target, source)

>>

>> print "target:%s source:%s"%(target,source)

>> return target, source

>>

>


And paste the output.
Also what's the command you're running and capturing the output?

-Bill
On Sep 6, 2013, at 1:50 AM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:


> Hi Bill,

>

> this seems to be not correct, because my emitter results only files (with a full path), the target_factory is also set to files only. The problem seems to be the full file path, but I can not remove the path, because in the build(er) call I need this full path. Can you be more specific for a workaround?

>

> Thanks

>

> Phil

>

>

>

> On 2013-09-05 20:06:04 +0000, William Deegan said:

>

> Phil,

>

> Don't have Dir's in your target's or Sources. Just have files.

>

> -Bill

> On Sep 4, 2013, at 9:17 PM, Philipp Kraus <philipp.kraus at tu-clausthal.de> wrote:

> Hi Bill,

>

> do you know some workaround / fix to solve this problem at the moment?

>

>

> Phil

>

>

>

> Am 05.09.2013 um 00:33 schrieb Bill Deegan <bill at baddogconsulting.com>:

> Phil,

>

> The problem you're running into (I think) is that SCons implicitly adds a dependency to a directory for each file in it.

> The net is you need to deal with files and not directories or you will run into this issue.

>

> I do agree however that we need a way to deal with directories as an object and not just a container with the implicit dependencies as a source and as a target.

> One thing to consider is whether such and object should always be considered out of date if any file in the directory (and possibility in it's sub-directories recursively) has changed.

>

> -Bill

>

>

> On Wed, Sep 4, 2013 at 6:19 AM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:

> 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

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130906/bb36018a/attachment-0001.html


More information about the Scons-users mailing list