[Scons-users] code styler tool in SCons
Bill Deegan
bill at baddogconsulting.com
Fri Oct 11 02:41:11 EDT 2013
Rob,
In general, having a build system with any targets where the source and the
target are the same file is not a good idea.
The reason for this is, how do you decide if you should rebuild on the 2nd
build?
You've touched all the sources since the 1st build, so everything should
get built again..
(This should be true if you are using either time or md5 signature of the
file)
SCons will (should) detect a circular dependency..
Is the intent that the styled version of the file is what should be checked
in?
-Bill
On Thu, Oct 10, 2013 at 12:28 AM, Rob Deckers
<Rob.Deckers at vanderlande.com>wrote:
> Hi,
>
> In our current make-environment we use a code-styler / code-beautifier
> tool (named: astyle).
> Currently, in every build this tool is executed recursively from the
> project root.
> The tool itself check's for non-read-only *.cpp & *.h files (means they
> are changed) and styles the file. So source and target and the same file.
>
> Now in SCons, I tried implement the same tool. I created a simple style.py
> tool that uses a env.Execute in the generate function.
> This works fast enough and good for the regular SCons build, but this
> doesn't do anything once the developer is in the --interactive build mode.
>
> How can I let every build be preseeded by this code-styler?
>
> Kind regards,
> Rob Deckers
> ** Disclaimer **
>
> This e-mail, including any attachments, may include proprietary and
> confidential information of Vanderlande Industries and may only be read by
> the person or those persons to whom it is addressed.
> This document is forwarded to you in such a form (e-mail) that Vanderlande
> Industries cannot guarantee the completeness and/or correctness of its
> contents and information.
> If you have received this e-mail message in error, please notify us
> immediately. Please also delete this document from your computer.
> This document may not be reproduced, copied, distributed, published,
> modified, or furnished to third parties, without the prior written consent
> of Vanderlande Industries.
>
> _______________________________________________
> 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/20131010/b0ecd405/attachment-0001.htm
More information about the Scons-users
mailing list