update-mocks: don't try to regenerate files.

If you do update-mocks in a dirty tree, the recursive make that it
uses will try to rebuild things!  Suppress that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-05-21 14:46:05 +09:30
parent 33736b860a
commit cc6f1fd120
6 changed files with 19 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ START=$(grep -F -n '/* AUTOGENERATED MOCKS START */' "$FILE" | cut -d: -f1)
END=$(grep -F -n '/* AUTOGENERATED MOCKS END */' "$FILE" | cut -d: -f1)
function make_binary() {
$MAKE "${FILE/%.c/}" 2> "${BASE}.err" >/dev/null
$MAKE SUPPRESS_GENERATION=1 "${FILE/%.c/}" 2> "${BASE}.err" >/dev/null
}
if [ -n "$START" ]; then