mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
kbuild: drop include/asm
We no longer use this directory for generated files and all architectures has moved their header files so no symlink tricks are needed either. Drop the symlink and drop the ARCH check. If we really need to check that the SRCARCH has not changed when we build a kernel we can add this check back - but then we will find a more convenient way to store the info. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
parent
c95fa08a3e
commit
f7f16b7799
2 changed files with 2 additions and 39 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -45,7 +45,6 @@ Module.symvers
|
||||||
#
|
#
|
||||||
# Generated include files
|
# Generated include files
|
||||||
#
|
#
|
||||||
include/asm
|
|
||||||
include/config
|
include/config
|
||||||
include/linux/autoconf.h
|
include/linux/autoconf.h
|
||||||
include/linux/compile.h
|
include/linux/compile.h
|
||||||
|
|
40
Makefile
40
Makefile
|
@ -968,7 +968,7 @@ endif
|
||||||
prepare2: prepare3 outputmakefile
|
prepare2: prepare3 outputmakefile
|
||||||
|
|
||||||
prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
|
prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
|
||||||
include/asm include/config/auto.conf
|
include/config/auto.conf
|
||||||
$(cmd_crmodverdir)
|
$(cmd_crmodverdir)
|
||||||
|
|
||||||
archprepare: prepare1 scripts_basic
|
archprepare: prepare1 scripts_basic
|
||||||
|
@ -980,42 +980,6 @@ prepare0: archprepare FORCE
|
||||||
# All the preparing..
|
# All the preparing..
|
||||||
prepare: prepare0
|
prepare: prepare0
|
||||||
|
|
||||||
# The asm symlink changes when $(ARCH) changes.
|
|
||||||
# Detect this and ask user to run make mrproper
|
|
||||||
# If asm is a stale symlink (point to dir that does not exist) remove it
|
|
||||||
define check-symlink
|
|
||||||
set -e; \
|
|
||||||
if [ -L include/asm ]; then \
|
|
||||||
asmlink=`readlink include/asm | cut -d '-' -f 2`; \
|
|
||||||
if [ "$$asmlink" != "$(SRCARCH)" ]; then \
|
|
||||||
echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \
|
|
||||||
echo " set ARCH or save .config and run 'make mrproper' to fix it"; \
|
|
||||||
exit 1; \
|
|
||||||
fi; \
|
|
||||||
test -e $$asmlink || rm include/asm; \
|
|
||||||
elif [ -d include/asm ]; then \
|
|
||||||
echo "ERROR: $@ is a directory but a symlink was expected";\
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# We create the target directory of the symlink if it does
|
|
||||||
# not exist so the test in check-symlink works and we have a
|
|
||||||
# directory for generated filesas used by some architectures.
|
|
||||||
define create-symlink
|
|
||||||
if [ ! -L include/asm ]; then \
|
|
||||||
$(kecho) ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \
|
|
||||||
if [ ! -d include/asm-$(SRCARCH) ]; then \
|
|
||||||
mkdir -p include/asm-$(SRCARCH); \
|
|
||||||
fi; \
|
|
||||||
ln -fsn asm-$(SRCARCH) $@; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
include/asm: FORCE
|
|
||||||
$(Q)$(check-symlink)
|
|
||||||
$(Q)$(create-symlink)
|
|
||||||
|
|
||||||
# Generate some files
|
# Generate some files
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1184,7 +1148,7 @@ CLEAN_FILES += vmlinux System.map \
|
||||||
|
|
||||||
# Directories & files removed with 'make mrproper'
|
# Directories & files removed with 'make mrproper'
|
||||||
MRPROPER_DIRS += include/config usr/include include/generated
|
MRPROPER_DIRS += include/config usr/include include/generated
|
||||||
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
|
MRPROPER_FILES += .config .config.old .version .old_version \
|
||||||
include/linux/autoconf.h include/linux/version.h \
|
include/linux/autoconf.h include/linux/version.h \
|
||||||
include/linux/utsrelease.h \
|
include/linux/utsrelease.h \
|
||||||
Module.symvers Module.markers tags TAGS cscope*
|
Module.symvers Module.markers tags TAGS cscope*
|
||||||
|
|
Loading…
Reference in a new issue