aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSimon Glass2020-12-22 19:30:16 -0700
committerSimon Glass2021-01-05 12:24:40 -0700
commitaa88ac884c998ab521b3a433e963bc001d31e5d8 (patch)
tree72f3468e85e7541f25aa9d4cdd6563d5c9681468 /scripts
parentc7674fcb0748a9a15853be7728c3ae887feb75c8 (diff)
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.spl7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index c92963833bc..161c15b200e 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -307,11 +307,14 @@ $(obj)/$(SPL_BIN).dtb: $(obj)/dts/dt-$(SPL_NAME).dtb FORCE
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),$@)