public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] build: Use filechk rules to create and update u-boot.lds
@ 2014-04-15 21:09 Jon Loeliger
  2014-04-18 21:02 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Loeliger @ 2014-04-15 21:09 UTC (permalink / raw)
  To: u-boot

Prior to this patch, the top-level linker script u-boot.lds
used a simple $(call if_changed) check when generated.
That mechanism misses cases where a possible include file
change induces a change in the u-boot.lds too.

This patch converts it to a stronger check using ($call filechk)
that will also notice differences in file contents and
will catch changes due to pre-processing as well.

Signed-off-by: Jon Loeliger <jon.loeliger@oracle.com>
---
 Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index b807e5c..dcc42b2 100644
--- a/Makefile
+++ b/Makefile
@@ -1052,12 +1052,13 @@ depend dep:
 	@echo '*** Warning: make $@ is unnecessary now.'
 
 # ---------------------------------------------------------------------------
-quiet_cmd_cpp_lds = LDS     $@
-cmd_cpp_lds = $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ \
-		-x assembler-with-cpp -P -o $@ $<
+define filechk_ubootlds
+	($(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ \
+		-x assembler-with-cpp -P -o - -)
+endef
 
 u-boot.lds: $(LDSCRIPT) prepare FORCE
-	$(call if_changed,cpp_lds)
+	$(call filechk,ubootlds)
 
 PHONY += nand_spl
 nand_spl: prepare
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-18 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15 21:09 [U-Boot] [PATCH] build: Use filechk rules to create and update u-boot.lds Jon Loeliger
2014-04-18 21:02 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox