[PATCH 05/15] MIPS: Netlogic: keep .dtb/.dtb.S until make clean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Provide a .SECONDARY entry for these intermediate files. Otherwise
make deletes them, and these files are regenerated for every rebuild.

Signed-off-by: Jayachandran C <jchandra@xxxxxxxxxxxx>
---
 arch/mips/netlogic/dts/Makefile |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/mips/netlogic/dts/Makefile b/arch/mips/netlogic/dts/Makefile
index 67ae3fe2..40502ff 100644
--- a/arch/mips/netlogic/dts/Makefile
+++ b/arch/mips/netlogic/dts/Makefile
@@ -1,4 +1,14 @@
-obj-$(CONFIG_DT_XLP_EVP) := xlp_evp.dtb.o
+DTS_FILE		= xlp_evp.dts
+DTB_FILE		= $(patsubst %.dts, %.dtb, $(DTS_FILE))
 
-$(obj)/%.dtb: $(obj)/%.dts
-	$(call if_changed,dtc)
+# built-in dtb
+obj-$(CONFIG_DT_XLP_EVP) := $(DTB_FILE).o
+
+$(obj)/%.dtb: $(src)/%.dts
+	$(call if_changed_dep,dtc)
+
+# Keep intermediate files .dtb and .dtb.S, delete them only at make clean
+KEEP_FILES		= $(DTB_FILE) $(DTB_FILE).S
+clean-files		+= $(KEEP_FILES)
+
+.SECONDARY: $(addprefix $(obj)/, $(KEEP_FILES))
-- 
1.7.9.5





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux