aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/Makefile
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2005-09-28 17:27:23 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-29 11:46:26 -0400
commitecba97d4aacf4e80c56eb73e39af0369cb8539a4 (patch)
tree79b845eb73b34e75d9f53fae17e53bd264595960 /arch/um/Makefile
parent54bb5675a6e966a58755ac44e3407f8ec2272b82 (diff)
[PATCH] uml makefiles sanitized
UML makefiles sanitized: - number of generated headers reduced to 2 (from user-offsets.c and kernel-offsets.c resp.). The rest is made constant and simply includes those two. - mk_... helpers are gone now that we don't need to generate these headers - arch/um/include2 removed since everything under arch/um/include/sysdep is constant now and symlink can point straight to source tree. - dependencies seriously simplified. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r--arch/um/Makefile68
1 files changed, 11 insertions, 57 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 5b5af95721ab..7af37e342e33 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -28,8 +28,6 @@ SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header))
28ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \ 28ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \
29 $(SYMLINK_HEADERS) $(ARCH_DIR)/include/uml-config.h 29 $(SYMLINK_HEADERS) $(ARCH_DIR)/include/uml-config.h
30 30
31GEN_HEADERS += $(ARCH_DIR)/include/task.h $(ARCH_DIR)/include/kern_constants.h
32
33um-modes-$(CONFIG_MODE_TT) += tt 31um-modes-$(CONFIG_MODE_TT) += tt
34um-modes-$(CONFIG_MODE_SKAS) += skas 32um-modes-$(CONFIG_MODE_SKAS) += skas
35 33
@@ -45,9 +43,7 @@ endif
45 43
46ARCH_INCLUDE := -I$(ARCH_DIR)/include 44ARCH_INCLUDE := -I$(ARCH_DIR)/include
47ifneq ($(KBUILD_SRC),) 45ifneq ($(KBUILD_SRC),)
48ARCH_INCLUDE += -I$(ARCH_DIR)/include2
49ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include 46ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include
50MRPROPER_DIRS += $(ARCH_DIR)/include2
51endif 47endif
52SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) 48SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
53 49
@@ -87,10 +83,6 @@ CONFIG_KERNEL_HALF_GIGS ?= 0
87 83
88SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) 84SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000)
89 85
90ifeq ($(CONFIG_MODE_SKAS), y)
91$(SYS_HEADERS) : $(ARCH_DIR)/include/skas_ptregs.h
92endif
93
94.PHONY: linux 86.PHONY: linux
95 87
96all: linux 88all: linux
@@ -111,7 +103,8 @@ else
111$(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch) 103$(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch)
112endif 104endif
113 105
114archprepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) 106archprepare: $(ARCH_SYMLINKS) $(ARCH_DIR)/include/user_constants.h
107prepare: $(ARCH_DIR)/include/kern_constants.h
115 108
116LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static 109LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
117LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib 110LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
@@ -146,15 +139,13 @@ endef
146#When cleaning we don't include .config, so we don't include 139#When cleaning we don't include .config, so we don't include
147#TT or skas makefiles and don't clean skas_ptregs.h. 140#TT or skas makefiles and don't clean skas_ptregs.h.
148CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/uml-config.h \ 141CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/uml-config.h \
149 $(GEN_HEADERS) $(ARCH_DIR)/include/skas_ptregs.h \ 142 $(ARCH_DIR)/include/user_constants.h \
150 $(ARCH_DIR)/include/user_constants.h $(ARCH_DIR)/Kconfig.arch 143 $(ARCH_DIR)/include/kern_constants.h $(ARCH_DIR)/Kconfig.arch
151 144
152MRPROPER_FILES += $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) \ 145MRPROPER_FILES += $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) \
153 $(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) $(ARCH_DIR)/os 146 $(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) $(ARCH_DIR)/os
154 147
155archclean: 148archclean:
156 $(Q)$(MAKE) $(clean)=$(ARCH_DIR)/util
157 $(Q)$(MAKE) $(clean)=$(ARCH_DIR)/os-$(OS)/util
158 @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ 149 @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
159 -o -name '*.gcov' \) -type f -print | xargs rm -f 150 -o -name '*.gcov' \) -type f -print | xargs rm -f
160 151
@@ -180,9 +171,7 @@ $(ARCH_DIR)/include/sysdep:
180 @echo ' SYMLINK $@' 171 @echo ' SYMLINK $@'
181ifneq ($(KBUILD_SRC),) 172ifneq ($(KBUILD_SRC),)
182 $(Q)mkdir -p $(ARCH_DIR)/include 173 $(Q)mkdir -p $(ARCH_DIR)/include
183 $(Q)mkdir -p $(ARCH_DIR)/include2 174 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep
184 $(Q)ln -fsn sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep
185 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include2/sysdep
186else 175else
187 $(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep 176 $(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep
188endif 177endif
@@ -202,8 +191,6 @@ endef
202 191
203define filechk_gen-asm-offsets 192define filechk_gen-asm-offsets
204 (set -e; \ 193 (set -e; \
205 echo "#ifndef __ASM_OFFSETS_H__"; \
206 echo "#define __ASM_OFFSETS_H__"; \
207 echo "/*"; \ 194 echo "/*"; \
208 echo " * DO NOT MODIFY."; \ 195 echo " * DO NOT MODIFY."; \
209 echo " *"; \ 196 echo " *"; \
@@ -212,8 +199,7 @@ define filechk_gen-asm-offsets
212 echo " */"; \ 199 echo " */"; \
213 echo ""; \ 200 echo ""; \
214 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ 201 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
215 echo ""; \ 202 echo ""; )
216 echo "#endif" )
217endef 203endef
218 204
219$(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h 205$(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h
@@ -222,50 +208,18 @@ $(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h
222$(ARCH_DIR)/user-offsets.s: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.c 208$(ARCH_DIR)/user-offsets.s: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.c
223 $(CC) $(USER_CFLAGS) -S -o $@ $< 209 $(CC) $(USER_CFLAGS) -S -o $@ $<
224 210
225$(ARCH_DIR)/user-offsets.h: $(ARCH_DIR)/user-offsets.s 211$(ARCH_DIR)/include/user_constants.h: $(ARCH_DIR)/user-offsets.s
226 $(call filechk,gen-asm-offsets) 212 $(call filechk,gen-asm-offsets)
227 213
228CLEAN_FILES += $(ARCH_DIR)/user-offsets.s $(ARCH_DIR)/user-offsets.h 214CLEAN_FILES += $(ARCH_DIR)/user-offsets.s
229 215
230$(ARCH_DIR)/kernel-offsets.s: $(ARCH_DIR)/sys-$(SUBARCH)/kernel-offsets.c \ 216$(ARCH_DIR)/kernel-offsets.s: $(ARCH_DIR)/sys-$(SUBARCH)/kernel-offsets.c \
231 $(ARCH_SYMLINKS) \ 217 archprepare
232 $(SYS_DIR)/sc.h \
233 include/asm include/linux/version.h \
234 include/config/MARKER \
235 $(ARCH_DIR)/include/user_constants.h
236 $(CC) $(CFLAGS) $(NOSTDINC_FLAGS) $(CPPFLAGS) -S -o $@ $< 218 $(CC) $(CFLAGS) $(NOSTDINC_FLAGS) $(CPPFLAGS) -S -o $@ $<
237 219
238$(ARCH_DIR)/kernel-offsets.h: $(ARCH_DIR)/kernel-offsets.s 220$(ARCH_DIR)/include/kern_constants.h: $(ARCH_DIR)/kernel-offsets.s
239 $(call filechk,gen-asm-offsets) 221 $(call filechk,gen-asm-offsets)
240 222
241CLEAN_FILES += $(ARCH_DIR)/kernel-offsets.s $(ARCH_DIR)/kernel-offsets.h 223CLEAN_FILES += $(ARCH_DIR)/kernel-offsets.s
242
243$(ARCH_DIR)/include/task.h: $(ARCH_DIR)/util/mk_task
244 $(call filechk,gen_header)
245
246$(ARCH_DIR)/include/user_constants.h: $(ARCH_DIR)/os-$(OS)/util/mk_user_constants
247 $(call filechk,gen_header)
248
249$(ARCH_DIR)/include/kern_constants.h: $(ARCH_DIR)/util/mk_constants
250 $(call filechk,gen_header)
251
252$(ARCH_DIR)/include/skas_ptregs.h: $(ARCH_DIR)/kernel/skas/util/mk_ptregs
253 $(call filechk,gen_header)
254
255$(ARCH_DIR)/os-$(OS)/util/mk_user_constants: $(ARCH_DIR)/os-$(OS)/util FORCE ;
256
257$(ARCH_DIR)/util/mk_task $(ARCH_DIR)/util/mk_constants: $(ARCH_DIR)/include/user_constants.h $(ARCH_DIR)/util \
258 FORCE ;
259
260$(ARCH_DIR)/kernel/skas/util/mk_ptregs: $(ARCH_DIR)/kernel/skas/util FORCE ;
261
262$(ARCH_DIR)/util: scripts_basic $(SYS_DIR)/sc.h $(ARCH_DIR)/kernel-offsets.h FORCE
263 $(Q)$(MAKE) $(build)=$@
264
265$(ARCH_DIR)/kernel/skas/util: scripts_basic $(ARCH_DIR)/user-offsets.h FORCE
266 $(Q)$(MAKE) $(build)=$@
267
268$(ARCH_DIR)/os-$(OS)/util: scripts_basic $(ARCH_DIR)/user-offsets.h FORCE
269 $(Q)$(MAKE) $(build)=$@
270 224
271export SUBARCH USER_CFLAGS OS 225export SUBARCH USER_CFLAGS OS