diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2009-01-05 12:18:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 20:41:45 -0500 |
commit | 22409f9c80d0a742ff98d1cfe1bf60fce1927be1 (patch) | |
tree | f95de35847d30855c20db415ac3010ea096e5772 | |
parent | fe0bdec68b77020281dc814805edfe594ae89e0f (diff) |
get rid of the last symlink in uml build
We need to make asm-offsets.h contents visible for objects built
with userland headers. Instead of creating a symlink, just have the
file with equivalent include (relative to location of header) created
once. That kills the last symlink used in arch/um builds.
Additionally, both generated headers can become dependencies of
archprepare now, killing the misuse of prepare.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/um/Makefile | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index d944c343acdb..0728def32234 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -22,10 +22,11 @@ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas | |||
22 | 22 | ||
23 | include $(srctree)/$(ARCH_DIR)/Makefile-skas | 23 | include $(srctree)/$(ARCH_DIR)/Makefile-skas |
24 | 24 | ||
25 | ARCH_INCLUDE := -I$(srctree)/$(ARCH_DIR)/include/shared | 25 | SHARED_HEADERS := $(ARCH_DIR)/include/shared |
26 | ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS) | ||
26 | ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared | 27 | ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared |
27 | ifneq ($(KBUILD_SRC),) | 28 | ifneq ($(KBUILD_SRC),) |
28 | ARCH_INCLUDE += -I$(ARCH_DIR)/include/shared # for two generated files | 29 | ARCH_INCLUDE += -I$(SHARED_HEADERS) |
29 | endif | 30 | endif |
30 | KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH) | 31 | KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH) |
31 | 32 | ||
@@ -85,8 +86,8 @@ endef | |||
85 | 86 | ||
86 | KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH) | 87 | KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH) |
87 | 88 | ||
88 | archprepare: $(ARCH_DIR)/include/shared/user_constants.h | 89 | archprepare: $(SHARED_HEADERS)/user_constants.h |
89 | prepare: $(ARCH_DIR)/include/shared/kern_constants.h | 90 | archprepare: $(SHARED_HEADERS)/kern_constants.h |
90 | 91 | ||
91 | LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static | 92 | LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static |
92 | LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib | 93 | LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib |
@@ -119,17 +120,13 @@ endef | |||
119 | # When cleaning we don't include .config, so we don't include | 120 | # When cleaning we don't include .config, so we don't include |
120 | # TT or skas makefiles and don't clean skas_ptregs.h. | 121 | # TT or skas makefiles and don't clean skas_ptregs.h. |
121 | CLEAN_FILES += linux x.i gmon.out \ | 122 | CLEAN_FILES += linux x.i gmon.out \ |
122 | $(ARCH_DIR)/include/shared/user_constants.h \ | 123 | $(SHARED_HEADERS)/user_constants.h \ |
123 | $(ARCH_DIR)/include/shared/kern_constants.h | 124 | $(SHARED_HEADERS)/kern_constants.h |
124 | 125 | ||
125 | archclean: | 126 | archclean: |
126 | @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ | 127 | @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ |
127 | -o -name '*.gcov' \) -type f -print | xargs rm -f | 128 | -o -name '*.gcov' \) -type f -print | xargs rm -f |
128 | 129 | ||
129 | $(objtree)/$(ARCH_DIR)/include/shared: | ||
130 | @echo ' MKDIR $@' | ||
131 | $(Q)mkdir -p $@ | ||
132 | |||
133 | # Generated files | 130 | # Generated files |
134 | 131 | ||
135 | $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE | 132 | $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE |
@@ -148,11 +145,11 @@ define filechk_gen-asm-offsets | |||
148 | echo ""; ) | 145 | echo ""; ) |
149 | endef | 146 | endef |
150 | 147 | ||
151 | $(ARCH_DIR)/include/shared/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s | 148 | $(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s |
152 | $(call filechk,gen-asm-offsets) | 149 | $(call filechk,gen-asm-offsets) |
153 | 150 | ||
154 | $(ARCH_DIR)/include/shared/kern_constants.h: $(objtree)/$(ARCH_DIR)/include/shared | 151 | $(SHARED_HEADERS)/kern_constants.h: |
155 | @echo ' SYMLINK $@' | 152 | $(Q)mkdir -p $(dir $@) |
156 | $(Q)ln -sf ../../../../include/asm/asm-offsets.h $@ | 153 | $(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@ |
157 | 154 | ||
158 | export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH | 155 | export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH |