X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2FKbuild.include;h=b8969e2a75e61f1d1a62ed34aa2ad956aa9ca46e;hb=e63168a9ffae18f807f59925bb5d9d4623633e46;hp=1b62aedb00877bb375bf265c4cd5d3c984342553;hpb=b504ff9f6bbdd4d3700595f64f3c30c5c9f70d35;p=oweals%2Fu-boot.git diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 1b62aedb00..b8969e2a75 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -7,6 +7,7 @@ quote := " squote := ' empty := space := $(empty) $(empty) +pound := \# ### # Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o @@ -172,11 +173,6 @@ ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh) # Usage: $(call ld-ifversion, -ge, 22252, y) ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4)) -# dtc-option -# Usage: DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg) -dtc-option = $(call try-run,\ - echo '/dts-v1/; / {};' | $(DTC) $(1),$(1),$(2)) - ###### ### @@ -247,11 +243,11 @@ endif # Replace >$< with >$$< to preserve $ when reloading the .cmd file # (needed for make) -# Replace >#< with >\#< to avoid starting a comment in the .cmd file +# Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file # (needed for make) # Replace >'< with >'\''< to be able to enclose the whole string in '...' # (needed for the shell) -make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1))))) +make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) # Find any prerequisites that is newer than target or that does not exist. # PHONY targets skipped in both cases. @@ -319,8 +315,20 @@ why = \ echo-why = $(call escsq, $(strip $(why))) endif +# delete partially updated (i.e. corrupted) files on error +.DELETE_ON_ERROR: + +# do not delete intermediate files automatically +.SECONDARY: + ifdef CONFIG_SPL_BUILD SPL_ := SPL_ +ifeq ($(CONFIG_TPL_BUILD),y) +SPL_TPL_ := TPL_ +else +SPL_TPL_ := SPL_ +endif else SPL_ := +SPL_TPL_ := endif