diff options
-rw-r--r-- | Kbuild | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -13,8 +13,9 @@ define sed-y | |||
13 | s:->::; p;}" | 13 | s:->::; p;}" |
14 | endef | 14 | endef |
15 | 15 | ||
16 | quiet_cmd_offsets = GEN $@ | 16 | # Use filechk to avoid rebuilds when a header changes, but the resulting file |
17 | define cmd_offsets | 17 | # does not |
18 | define filechk_offsets | ||
18 | (set -e; \ | 19 | (set -e; \ |
19 | echo "#ifndef $2"; \ | 20 | echo "#ifndef $2"; \ |
20 | echo "#define $2"; \ | 21 | echo "#define $2"; \ |
@@ -24,9 +25,9 @@ define cmd_offsets | |||
24 | echo " * This file was generated by Kbuild"; \ | 25 | echo " * This file was generated by Kbuild"; \ |
25 | echo " */"; \ | 26 | echo " */"; \ |
26 | echo ""; \ | 27 | echo ""; \ |
27 | sed -ne $(sed-y) $<; \ | 28 | sed -ne $(sed-y); \ |
28 | echo ""; \ | 29 | echo ""; \ |
29 | echo "#endif" ) > $@ | 30 | echo "#endif" ) |
30 | endef | 31 | endef |
31 | 32 | ||
32 | ##### | 33 | ##### |
@@ -42,9 +43,8 @@ kernel/bounds.s: kernel/bounds.c FORCE | |||
42 | $(Q)mkdir -p $(dir $@) | 43 | $(Q)mkdir -p $(dir $@) |
43 | $(call if_changed_dep,cc_s_c) | 44 | $(call if_changed_dep,cc_s_c) |
44 | 45 | ||
45 | $(obj)/$(bounds-file): kernel/bounds.s Kbuild | 46 | $(obj)/$(bounds-file): kernel/bounds.s FORCE |
46 | $(Q)mkdir -p $(dir $@) | 47 | $(call filechk,offsets,__LINUX_BOUNDS_H__) |
47 | $(call cmd,offsets,__LINUX_BOUNDS_H__) | ||
48 | 48 | ||
49 | ##### | 49 | ##### |
50 | # 2) Generate asm-offsets.h | 50 | # 2) Generate asm-offsets.h |
@@ -62,8 +62,8 @@ arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \ | |||
62 | $(Q)mkdir -p $(dir $@) | 62 | $(Q)mkdir -p $(dir $@) |
63 | $(call if_changed_dep,cc_s_c) | 63 | $(call if_changed_dep,cc_s_c) |
64 | 64 | ||
65 | $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s Kbuild | 65 | $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE |
66 | $(call cmd,offsets,__ASM_OFFSETS_H__) | 66 | $(call filechk,offsets,__ASM_OFFSETS_H__) |
67 | 67 | ||
68 | ##### | 68 | ##### |
69 | # 3) Check for missing system calls | 69 | # 3) Check for missing system calls |