[Scons-users] Custom tools in directories other than site_scons/site_tools

Jonathon Reinhart jonathon.reinhart at gmail.com
Fri May 22 15:00:17 EDT 2015


Thanks a lot Jason!  I somehow managed to miss that in the manual.

On Fri, May 22, 2015 at 2:07 PM, Kenny, Jason L <jason.l.kenny at intel.com> wrote:
> Yes there is. From the man page.
>
> Non-built-in tools may be specified using the toolpath argument:
> env = Environment(tools = ['default', 'foo'], toolpath = ['tools'])
>
>
> toolpath is want you want to use. This is the main in which I use in my extension to SCons to add a mirror part-site directory structure for the tools I extend and or add.
>
> Just keep in mind you have to add "toolpath" to all new Environments to create. Any that you can clone and pass will be ok, making it easy to add new tools via clone() without having to add the toolpath values. You can also try to use the SCons Tool() call directly and apply the tool the environment instead. Ie like:
>
> tool = Tool(tool_name, toolpath=['toolpath'])
> tool(env)
>
> look at the main page (http://scons.org/doc/production/HTML/scons-man.html ),  and search for toolpath. It should answer all your questions.
>
> Hope this helps.
> Jason
>
>
> -----Original Message-----
> From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Jonathon Reinhart
> Sent: Friday, May 22, 2015 12:48 PM
> To: SCons users mailing list
> Subject: [Scons-users] Custom tools in directories other than site_scons/site_tools
>
> Hello all,
>
> I've written a tool that is specific to one small part of my overall project. Because of this, I'd prefer that it go in the subdirectory to which it is specific, although it works okay if it goes in site_scons/site_tools.
>
> Is there a way I can add a tool to an environment by passing it a path, or add other paths to the tool search directory?  Or is invoking this other file by SConscript() the right way to go?
>
> Thanks a lot,
>
> Jonathon
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users



-- 
Computers are incredibly fast, accurate and stupid. Human beings are
incredibly slow, inaccurate and brilliant. Together they are powerful
beyond imagination.
                                    A. Einstein


More information about the Scons-users mailing list