[openwrt/openwrt] image: fix device profile specific COMPILE targets

LEDE Commits lede-commits at lists.infradead.org
Mon Dec 19 04:33:38 PST 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1bff0752bd5e7feb0f311224a09b3bf217a9aeb3

commit 1bff0752bd5e7feb0f311224a09b3bf217a9aeb3
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Tue Nov 22 00:37:39 2022 +0000

    image: fix device profile specific COMPILE targets
    
    Commit a01d23e75 ("image: always rebuild kernel loaders")
    is a step in the right direction, but exposed some issues
    and regressions in the makefile.
    
    Some of the files made by device specific COMPILE targets
    start with an "append" command (i.e. >> instead of > redirection)
    and if the file already exists, the target file is the
    input to itself before the first recipe-specified input.
    
    Fixes: a01d23e75 ("image: always rebuild kernel loaders")
    Fixes: a7fb589e8 ("image: always rebuild kernel loaders")
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
---
 include/image.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/image.mk b/include/image.mk
index e9dc53f82e..5d9d4acb41 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -520,6 +520,7 @@ define Device/Build/compile
   $$(_COMPILE_TARGET): $(KDIR)/$(1)
   $(eval $(call Device/Export,$(KDIR)/$(1)))
   $(KDIR)/$(1): FORCE
+	rm -f $(KDIR)/$(1)
 	$$(call concat_cmd,$(COMPILE/$(1)))
 
 endef




More information about the lede-commits mailing list