diff options
| author | Sam Ravnborg <sam@mars.(none)> | 2005-07-14 16:22:39 -0400 |
|---|---|---|
| committer | Sam Ravnborg <sam@mars.(none)> | 2005-07-14 16:22:39 -0400 |
| commit | d80e22460968ec7986c82fd7d207ebe3de59e03d (patch) | |
| tree | 2dfe27aab805fe70f91b0d3beb45d23b2837990e | |
| parent | c5f75eca120de6587e67a1951ce3e6912e2c6879 (diff) | |
kbuild: Don't fail if include/asm symlink exists
From: Andreas Gruenbacher <agruen@suse.de>
We're having the following situation: There are user-space applications
that include kernel headers directly. With a completely unconfigured
/usr/src/linux tree, including most headers fails because essential
files are not there:
include/asm
include/linux/autoconf.h
include/linux/version.h
So we create these files. On the other hand, we want to use
/usr/src/linux as read-only source for building kernels or additional
modules. Now when building a kernel with a separate output directory
(O=), there is a check in the main makefile for the include/asm symlink.
There is no real need for this check: if we ensure that
$(objdir)/include/asm is always created as the patch does,
$(srctree)/include/asm becomes irrelevant.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| -rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -767,7 +767,7 @@ $(vmlinux-dirs): prepare-all scripts | |||
| 767 | prepare2: | 767 | prepare2: |
| 768 | ifneq ($(KBUILD_SRC),) | 768 | ifneq ($(KBUILD_SRC),) |
| 769 | @echo ' Using $(srctree) as source for kernel' | 769 | @echo ' Using $(srctree) as source for kernel' |
| 770 | $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \ | 770 | $(Q)if [ -f $(srctree)/.config ]; then \ |
| 771 | echo " $(srctree) is not clean, please run 'make mrproper'";\ | 771 | echo " $(srctree) is not clean, please run 'make mrproper'";\ |
| 772 | echo " in the '$(srctree)' directory.";\ | 772 | echo " in the '$(srctree)' directory.";\ |
| 773 | /bin/false; \ | 773 | /bin/false; \ |
| @@ -779,7 +779,8 @@ endif | |||
| 779 | # prepare1 creates a makefile if using a separate output directory | 779 | # prepare1 creates a makefile if using a separate output directory |
| 780 | prepare1: prepare2 outputmakefile | 780 | prepare1: prepare2 outputmakefile |
| 781 | 781 | ||
| 782 | prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER | 782 | prepare0: prepare1 include/linux/version.h $(objtree)/include/asm \ |
| 783 | include/config/MARKER | ||
| 783 | ifneq ($(KBUILD_MODULES),) | 784 | ifneq ($(KBUILD_MODULES),) |
| 784 | $(Q)rm -rf $(MODVERDIR) | 785 | $(Q)rm -rf $(MODVERDIR) |
| 785 | $(Q)mkdir -p $(MODVERDIR) | 786 | $(Q)mkdir -p $(MODVERDIR) |
| @@ -818,7 +819,7 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) | |||
| 818 | # hard to detect, but I suppose "make mrproper" is a good idea | 819 | # hard to detect, but I suppose "make mrproper" is a good idea |
| 819 | # before switching between archs anyway. | 820 | # before switching between archs anyway. |
| 820 | 821 | ||
| 821 | include/asm: | 822 | $(objtree)/include/asm: |
| 822 | @echo ' SYMLINK $@ -> include/asm-$(ARCH)' | 823 | @echo ' SYMLINK $@ -> include/asm-$(ARCH)' |
| 823 | $(Q)if [ ! -d include ]; then mkdir -p include; fi; | 824 | $(Q)if [ ! -d include ]; then mkdir -p include; fi; |
| 824 | @ln -fsn asm-$(ARCH) $@ | 825 | @ln -fsn asm-$(ARCH) $@ |
