diff options
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | src/components/style/.gitignore | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 4758e39349f..9cce690bfa1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -309,7 +309,9 @@ $(AUTOGEN_SRC_script): $(BINDINGS_SRC)/%Binding.rs: $(bindinggen_dependencies) \ globalgen_dependencies := $(addprefix $(BINDINGS_SRC)/, GlobalGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py) $(CACHE_DIR)/.done $(MAKO_style): $(MAKO_SRC_style) - PYTHONPATH=$(MAKO_ZIP) python -c "from mako.template import Template; print(Template(filename='$<').render())" > $@ +# Use a temporary file to avoid writing an empty (but more recent) file on failure. + PYTHONPATH=$(MAKO_ZIP) python -c "from mako.template import Template; print(Template(filename='$<').render())" > $@.tmp + mv $@.tmp $@ $(CACHE_DIR)/.done: diff --git a/src/components/style/.gitignore b/src/components/style/.gitignore index babbbcce4e3..79d1b1f5fe2 100644 --- a/src/components/style/.gitignore +++ b/src/components/style/.gitignore @@ -1 +1,2 @@ properties.rs +properties.rs.tmp |