diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-08-02 11:10:47 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-08-02 11:10:47 (GMT) |
| commit | 58fb5d630b9ce00e4552afa19ceb06e3b985a087 (patch) | |
| tree | f0d57b788261021982fac03fce18b086499c57e9 /Makefile | |
| parent | c74d9e296bc6ee9d167efd9dc56e5ea903dce98f (diff) | |
Makefile: Clean up empty redirected file on failure
If the preprocessor fails for any reason then an empty or partially
processed watch.py file is created which will satisfy the dependency
checks in any later invocation of make which can silently break the
build. Cleaning up on failure prevents this from happening.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5,7 +5,8 @@ all : bootloader reloader micropython ifdef BOARD WASP_WATCH_PY = wasp/boards/$(BOARD)/watch.py $(WASP_WATCH_PY) : $(WASP_WATCH_PY).in - (cd wasp; ../tools/preprocess.py ../$(WASP_WATCH_PY).in > ../$(WASP_WATCH_PY)) + (cd wasp; ../tools/preprocess.py ../$(WASP_WATCH_PY).in > ../$(WASP_WATCH_PY)) \ + || ($(RM) $(WASP_WATCH_PY); false) else BOARD ?= $(error Please set BOARD=) endif |
