]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Use common args for dtoc
authorSimon Glass <sjg@chromium.org>
Wed, 23 Dec 2020 02:30:16 +0000 (19:30 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:40 +0000 (12:24 -0700)
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>
scripts/Makefile.spl

index c92963833bcc37a65f5fa5dbdfe0dd37779fa902..161c15b200e6bd87560d14cca093262a8cdeae37 100644 (file)
@@ -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),$@)