Hi Pete,
I don't think this workflow will work well in tup. I think it would also be fairly confusing even if it did work -- consider if there was an un-formatted file checked into your repo, and someone checks it out and does a build. They would then find files modified in 'git diff' and the like, even though they didn't change anything themselves.
One thing you can do in the build system is to use it as a linter, so it's more of a format-checker rather than a format-rewriter. So you could do something like this:
: foreach *.s |> asm-format --check %f |>
(Assuming asm-format accepts a --check argument and exits with 0 for success and 1 for bad formatting). Note that you don't actually need an output file for this; the command will re-run if any of the inputs change.
The actual re-formatting is likely much better suited for one or both of your editor and/or a version control hook (so all files could be formatted on commit or something).
Hope that helps,
-Mike