Makefile: Use common args for dtoc
At present the dtoc commmand line is repeated twice in the Makefile. Use a
variable to avoid this, so it is easier to add more conditional arguments.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index c929638..161c15b 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -307,11 +307,14 @@
pythonpath = PYTHONPATH=scripts/dtc/pylibfdt
+DTOC_ARGS := $(pythonpath) $(srctree)/tools/dtoc/dtoc \
+ -d $(obj)/$(SPL_BIN).dtb
+
quiet_cmd_dtocc = DTOC C $@
-cmd_dtocc = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ platdata
+cmd_dtocc = $(DTOC_ARGS) -o $@ platdata
quiet_cmd_dtoch = DTOC H $@
-cmd_dtoch = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ struct
+cmd_dtoch = $(DTOC_ARGS) -o $@ struct
quiet_cmd_plat = PLAT $@
cmd_plat = $(CC) $(c_flags) -c $< -o $(filter-out $(PHONY),$@)