[Scons-users] Need help in making a custom rule

Dirk Bächle tshortik at gmx.de
Mon Oct 22 13:26:54 EDT 2012


Hi,

when you say "scons test" SCons tries to create a target file/directory
named "test". Since you have only defined a Builder named "test()", but
your main target BinName seems to be "bin-test", you get the error
message that you see.

From the given snippet of your build script, my guess is that you want
to run some user-defined tests after compilation of your programs/libs.
If this is the case, which results did googling for "scons test target"
give you and why didn't they apply to your situation (which problems did
you encounter)? ;)

Best regards,

Dirk


On 22.10.2012 18:09, aullidolunar at gmail.com wrote:

> Hello!

>

> This is my script:

>

> BinName='bin-test'

> CCFLAGS = ' `pkg-config --cflags gtk+-2.0` '

> LINKFLAGS = ' `pkg-config --libs gtk+-2.0` '

>

> CustomBuilder = Builder(action = 'build/BinName')

> env = Environment(CCFLAGS=CCFLAGS, LINKFLAGS=LINKFLAGS, BUILDERS =

> {'test' : CustomBuilder})

> env.test

> app = env.Program(target=[BinName], source=Glob('*.c'))

>

> When I run "scons -Q", it compiles propertly, but...when I try to run

> "scons test"...it returns: "Do not know how to make File target `test'"

>

> My idea is to test my binary without been launched after the

> compile-link operation.

>

> Thanks.

>

>

> _______________________________________________

> 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/20121022/52ee90c8/attachment.htm>


More information about the Scons-users mailing list