diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-06-18 15:06:32 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-06-18 15:11:11 +0200 |
commit | 208d8bd28890493fecaf0d79a35c0a05bca77f46 (patch) | |
tree | 0f3c80ed803c51c57e0e33b5917cf6adc1ff1a18 /tool/Makefile | |
parent | 1b63fdccab1cf8ac873dac012908936056eeaf19 (diff) |
tool: If make-usage.sh exits abnormally don't update the target file
- If make-usage.sh exits abnormally, the target output file is still
updated, and consequently subsequent invocations of make don't
rebuild the target. Store the output in a temporary file.
If (and only if) make-usage.sh exits without error, rename the
temporary file.
Diffstat (limited to 'tool/Makefile')
-rw-r--r-- | tool/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/Makefile b/tool/Makefile index 0d90b3cd..196a4cfb 100644 --- a/tool/Makefile +++ b/tool/Makefile @@ -11,4 +11,4 @@ all: src/sq-usage.rs update-usage: src/sq-usage.rs src/sq-usage.rs: make-usage.sh $(SQ) - sh make-usage.sh $(SQ) >$@ + sh make-usage.sh $(SQ) >$@~ && mv $@~ $@ |