scripts/gdb: provide linux constants
[linux-2.6-block.git] / scripts / gdb / linux / Makefile
CommitLineData
3ee7b3fa
JK
1always := gdb-scripts
2
3SRCTREE := $(shell cd $(srctree) && /bin/pwd)
4
5$(obj)/gdb-scripts:
6ifneq ($(KBUILD_SRC),)
7 $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
8endif
9 @:
10
f197d75f
KB
11quiet_cmd_gen_constants_py = GEN $@
12 cmd_gen_constants_py = \
13 $(CPP) -E -x c -P $(c_flags) $< > $@ ;\
14 sed -i '1,/<!-- end-c-headers -->/d;' $@
15
16$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in
17 $(call if_changed,gen_constants_py)
18
19build_constants_py: $(obj)/constants.py
20
21clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py