scons icon indicating copy to clipboard operation
scons copied to clipboard

common Post/Pre actions for builders?

Open bdbaddog opened this issue 7 years ago • 2 comments

This issue was originally created at: 2003-03-25 19:10:48. This issue was reported by: issues@scons. issues@scons said at 2003-03-25 19:10:48

Would it make sense to allow the user to set common Pre/Post actions that would be applied to all targets of certain builders?

For example, in my SConstruct I set up a AddPreAction () that echoes the name of the target. This is to provide more context around error messages in the build logs.

Hmm... I guess you might be able to get this effect if your builder was implemented via a generator function, it could return a list of actions with the appropriate pre-action prepended to the list and the post-action appended. Although that would only cover things for user-defined builders.

[email protected]

issues@scons said at 2003-03-25 19:10:48

Converted from SourceForge tracker item 709843

gregnoel said at 2008-04-13 23:09:45

Bug party triage.

gregnoel said at 2008-04-13 23:11:29

Bug party triage.

bdbaddog avatar Jan 02 '18 06:01 bdbaddog

In recent times, we've seen several cases where cross/embedded builds want to postprocess all the executables they produce (e.g. strip).

mwichmann avatar May 28 '22 18:05 mwichmann

Yes, though it might make better sense to allow an API to access the Actions for a given source file type -> target file type?

bdbaddog avatar May 29 '22 05:05 bdbaddog