aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/Makefile
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-03-26 08:44:18 +1100
committerPaul Mackerras <paulus@samba.org>2008-03-26 08:44:18 +1100
commit54f53f2b94feb72622bec7a8563fc487d9f97720 (patch)
treeab0c4e1dcadd25a00fa7a4febf41bc43b864cf73 /arch/sh/Makefile
parentf61fb8a52cdf8b9b6a6badde84aefe58cb35d315 (diff)
parenta4083c9271e0a697278e089f2c0b9a95363ada0a (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/sh/Makefile')
-rw-r--r--arch/sh/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index c510c225144..cffc92b1bf2 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -154,7 +154,11 @@ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
boot := arch/sh/boot
+ifneq ($(KBUILD_SRC),)
incdir-prefix := $(srctree)/include/asm-sh/
+else
+incdir-prefix :=
+endif
# Update machine arch and proc symlinks if something which affects
# them changed. We use .arch and .mach to indicate when they were
@@ -182,7 +186,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
$(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
$(Q)rm -f include/asm-sh/mach
$(Q)for i in $(incdir-y); do \
- if [ -d $(incdir-prefix)$$i ]; then \
+ if [ -d $(srctree)/include/asm-sh/$$i ]; then \
echo -n ' SYMLINK include/asm-sh/mach -> '; \
echo -e "include/asm-sh/$$i"; \
ln -fsn $(incdir-prefix)$$i \
@@ -191,7 +195,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
if [ ! -d include/asm-sh/mach ]; then \
echo -n ' SYMLINK include/asm-sh/mach -> '; \
echo -e 'include/asm-sh'; \
- ln -fsn $(incdir-prefix) include/asm-sh/mach; \
+ ln -fsn $(incdir-prefix)../asm-sh include/asm-sh/mach; \
fi; \
fi; \
done