mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
auto merge of #574 : metajack/servo/bindgen-deps, r=jdm
This touches the `.rs` files even if they don't change. This will cause libscript to rebuild sometimes even when it doesn't have to. This seems better than having bindgen run every time as the case where CodegenRust.py changes but doesn't change the output `.rs` seems like it should be rare. r? @jdm
This commit is contained in:
commit
c085a93f9d
2 changed files with 6 additions and 2 deletions
|
@ -254,11 +254,13 @@ bindinggen_dependencies := $(addprefix $(BINDINGS_SRC)/, BindingGen.py Bindings.
|
||||||
|
|
||||||
$(AUTOGEN_SRC_script): %Binding.rs: $(bindinggen_dependencies) \
|
$(AUTOGEN_SRC_script): %Binding.rs: $(bindinggen_dependencies) \
|
||||||
%.webidl
|
%.webidl
|
||||||
PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \
|
@echo "Maybe generating $(shell basename $@)..."
|
||||||
|
$(Q)PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \
|
||||||
-I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \
|
-I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \
|
||||||
-D$(BINDINGS_SRC) \
|
-D$(BINDINGS_SRC) \
|
||||||
$(BINDINGS_SRC)/BindingGen.py rs \
|
$(BINDINGS_SRC)/BindingGen.py rs \
|
||||||
$(BINDINGS_SRC)/Bindings.conf $*Binding $*.webidl
|
$(BINDINGS_SRC)/Bindings.conf $*Binding $*.webidl
|
||||||
|
$(Q)touch $@
|
||||||
|
|
||||||
globalgen_dependencies := $(addprefix $(BINDINGS_SRC)/, GlobalGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py) $(CACHE_DIR)/.done
|
globalgen_dependencies := $(addprefix $(BINDINGS_SRC)/, GlobalGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py) $(CACHE_DIR)/.done
|
||||||
|
|
||||||
|
@ -268,7 +270,7 @@ $(CACHE_DIR)/.done:
|
||||||
|
|
||||||
$(BINDINGS_SRC)/ParserResults.pkl: $(globalgen_dependencies) \
|
$(BINDINGS_SRC)/ParserResults.pkl: $(globalgen_dependencies) \
|
||||||
$(WEBIDL_script)
|
$(WEBIDL_script)
|
||||||
PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \
|
$(Q)PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \
|
||||||
-I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \
|
-I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \
|
||||||
-D$(BINDINGS_SRC) \
|
-D$(BINDINGS_SRC) \
|
||||||
$(BINDINGS_SRC)/GlobalGen.py $(BINDINGS_SRC)/Bindings.conf . \
|
$(BINDINGS_SRC)/GlobalGen.py $(BINDINGS_SRC)/Bindings.conf . \
|
||||||
|
|
|
@ -39,6 +39,8 @@ def replaceFileIfChanged(filename, newContents):
|
||||||
f.write(newContents)
|
f.write(newContents)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def toStringBool(arg):
|
def toStringBool(arg):
|
||||||
return str(not not arg).lower()
|
return str(not not arg).lower()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue