diff options
author | Franck Bui-Huu <fbuihuu@gmail.com> | 2008-03-21 12:22:01 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-03-21 12:22:01 +0900 |
commit | 49a5ba46c5d1e34bcb07634157b29d7414ce13bd (patch) | |
tree | cca1cf5409cb077387cc9a17789da1fdab5a488a /arch/sh/Makefile | |
parent | 40f75879a0dda7025cebc3444c9317ec9e3dcd70 (diff) | |
download | kernel_samsung_smdk4412-49a5ba46c5d1e34bcb07634157b29d7414ce13bd.zip kernel_samsung_smdk4412-49a5ba46c5d1e34bcb07634157b29d7414ce13bd.tar.gz kernel_samsung_smdk4412-49a5ba46c5d1e34bcb07634157b29d7414ce13bd.tar.bz2 |
sh: Use relative paths for mach/cpu symlinks.
When building the kernel without passing the O= command line parameter
there's no point to use absolute paths for them.
Usually relative paths are preferred because they survive directory
moves, work across networked file systems and chrooted environments.
Absolute paths are still used if an output directory is given.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/Makefile')
-rw-r--r-- | arch/sh/Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index c510c22..cffc92b 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 |