Skip to content

Commit

Permalink
scripts/gdb: rebuild constants.py on dependancy change
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Kieran Bingham <[email protected]>
Reported-by: Jan Kiszka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Kieran Bingham authored and torvalds committed Jul 15, 2016
1 parent abb035b commit 834a352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/gdb/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
@:
Expand Down

0 comments on commit 834a352

Please sign in to comment.