aboutsummaryrefslogtreecommitdiffstats
path: root/Kbuild
diff options
context:
space:
mode:
authorNicholas Mc Guire2015-05-18 07:19:12 -0500
committerThomas Gleixner2015-05-19 08:13:45 -0500
commit0a227985d4a993a322ff72ecbaeee2611d624216 (patch)
treec433aed266b2d993e47b4b883bd8ffb406ef02ee /Kbuild
parent4cfafd3082afc707653aeb82e9f8e7b596fbbfd6 (diff)
downloadkernel-0a227985d4a993a322ff72ecbaeee2611d624216.tar.gz
kernel-0a227985d4a993a322ff72ecbaeee2611d624216.tar.xz
kernel-0a227985d4a993a322ff72ecbaeee2611d624216.zip
time: Move timeconst.h into include/generated
kernel/time/timeconst.h is moved to include/generated/ and generated by the top level Kbuild. This allows using timeconst.h in an earlier build stage. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Joe Perches <joe@perches.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Andrew Hunter <ahh@google.com> Cc: Paul Turner <pjt@google.com> Cc: Michal Marek <mmarek@suse.cz> Link: http://lkml.kernel.org/r/1431951554-5563-1-git-send-email-hofrat@osadl.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'Kbuild')
-rw-r--r--Kbuild34
1 files changed, 27 insertions, 7 deletions
diff --git a/Kbuild b/Kbuild
index 6f0d82a9245d..df99a5f53beb 100644
--- a/Kbuild
+++ b/Kbuild
@@ -2,8 +2,9 @@
2# Kbuild for top-level directory of the kernel 2# Kbuild for top-level directory of the kernel
3# This file takes care of the following: 3# This file takes care of the following:
4# 1) Generate bounds.h 4# 1) Generate bounds.h
5# 2) Generate asm-offsets.h (may need bounds.h) 5# 2) Generate timeconst.h
6# 3) Check for missing system calls 6# 3) Generate asm-offsets.h (may need bounds.h and timeconst.h)
7# 4) Check for missing system calls
7 8
8# Default sed regexp - multiline due to syntax constraints 9# Default sed regexp - multiline due to syntax constraints
9define sed-y 10define sed-y
@@ -47,7 +48,26 @@ $(obj)/$(bounds-file): kernel/bounds.s FORCE
47 $(call filechk,offsets,__LINUX_BOUNDS_H__) 48 $(call filechk,offsets,__LINUX_BOUNDS_H__)
48 49
49##### 50#####
50# 2) Generate asm-offsets.h 51# 2) Generate timeconst.h
52
53timeconst-file := include/generated/timeconst.h
54
55#always += $(timeconst-file)
56targets += $(timeconst-file)
57
58quiet_cmd_gentimeconst = GEN $@
59define cmd_gentimeconst
60 (echo $(CONFIG_HZ) | bc -q $< ) > $@
61endef
62define filechk_gentimeconst
63 (echo $(CONFIG_HZ) | bc -q $< )
64endef
65
66$(obj)/$(timeconst-file): kernel/time/timeconst.bc FORCE
67 $(call filechk,gentimeconst)
68
69#####
70# 3) Generate asm-offsets.h
51# 71#
52 72
53offsets-file := include/generated/asm-offsets.h 73offsets-file := include/generated/asm-offsets.h
@@ -57,7 +77,7 @@ targets += arch/$(SRCARCH)/kernel/asm-offsets.s
57 77
58# We use internal kbuild rules to avoid the "is up to date" message from make 78# We use internal kbuild rules to avoid the "is up to date" message from make
59arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \ 79arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \
60 $(obj)/$(bounds-file) FORCE 80 $(obj)/$(timeconst-file) $(obj)/$(bounds-file) FORCE
61 $(Q)mkdir -p $(dir $@) 81 $(Q)mkdir -p $(dir $@)
62 $(call if_changed_dep,cc_s_c) 82 $(call if_changed_dep,cc_s_c)
63 83
@@ -65,7 +85,7 @@ $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
65 $(call filechk,offsets,__ASM_OFFSETS_H__) 85 $(call filechk,offsets,__ASM_OFFSETS_H__)
66 86
67##### 87#####
68# 3) Check for missing system calls 88# 4) Check for missing system calls
69# 89#
70 90
71always += missing-syscalls 91always += missing-syscalls
@@ -77,5 +97,5 @@ quiet_cmd_syscalls = CALL $<
77missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE 97missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
78 $(call cmd,syscalls) 98 $(call cmd,syscalls)
79 99
80# Keep these two files during make clean 100# Keep these three files during make clean
81no-clean-files := $(bounds-file) $(offsets-file) 101no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file)