Blame view

scripts/gdb/linux/Makefile 599 Bytes
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  # SPDX-License-Identifier: GPL-2.0
3ee7b3fa2   Jan Kiszka   scripts/gdb: add ...
2
  always := gdb-scripts
8e9b46679   Masahiro Yamada   kbuild: use $(abs...
3
  SRCTREE := $(abspath $(srctree))
3ee7b3fa2   Jan Kiszka   scripts/gdb: add ...
4
5
6
7
8
9
  
  $(obj)/gdb-scripts:
  ifneq ($(KBUILD_SRC),)
  	$(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
  endif
  	@:
f197d75fc   Kieran Bingham   scripts/gdb: prov...
10
11
12
13
  quiet_cmd_gen_constants_py = GEN     $@
        cmd_gen_constants_py = \
  	$(CPP) -E -x c -P $(c_flags) $< > $@ ;\
  	sed -i '1,/<!-- end-c-headers -->/d;' $@
834a35296   Kieran Bingham   scripts/gdb: rebu...
14
15
16
  targets += constants.py
  $(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
  	$(call if_changed_dep,gen_constants_py)
f197d75fc   Kieran Bingham   scripts/gdb: prov...
17
18
  
  build_constants_py: $(obj)/constants.py
abb035b48   Kieran Bingham   scripts/gdb: sile...
19
  	@:
f197d75fc   Kieran Bingham   scripts/gdb: prov...
20
21
  
  clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py