mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 04/20] scripts/gdb: rebuild constants.py on dependancy change
@ 2016-07-14 19:06 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-14 19:06 UTC (permalink / raw)
  To: torvalds, mm-commits, akpm, kieran, jan.kiszka

From: Kieran Bingham <kieran@ksquared.org.uk>
Subject: scripts/gdb: rebuild constants.py on dependancy change

The autogenerated constants.py file was only being built on the initial
call, and if the constants.py.in file changed.  As we are utilising the
CPP hooks, we can successfully use the call if_changed_dep rules to
determine when to rebuild the file based on it's inclusions.

Link: http://lkml.kernel.org/r/1467127337-11135-3-git-send-email-kieran@bingham.xyz
Signed-off-by: Kieran Bingham <kieran@bingham.xyz>
Reported-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/gdb/linux/Makefile |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN scripts/gdb/linux/Makefile~scripts-gdb-rebuild-constantspy-on-dependancy-change scripts/gdb/linux/Makefile
--- a/scripts/gdb/linux/Makefile~scripts-gdb-rebuild-constantspy-on-dependancy-change
+++ a/scripts/gdb/linux/Makefile
@@ -13,8 +13,9 @@ quiet_cmd_gen_constants_py = GEN     $@
 	$(CPP) -E -x c -P $(c_flags) $< > $@ ;\
 	sed -i '1,/<!-- end-c-headers -->/d;' $@
 
-$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in
-	$(call if_changed,gen_constants_py)
+targets += constants.py
+$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
+	$(call if_changed_dep,gen_constants_py)
 
 build_constants_py: $(obj)/constants.py
 	@:
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-14 19:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 19:06 [patch 04/20] scripts/gdb: rebuild constants.py on dependancy change akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).