Kbuild fix for clean and mrproper targets.
This commit fixes the target clean functionality. Originally, the clean and mrproper targets search for the Documentation and samples directories and their respective Makefiles. Our current directory structure is not including Documentation directory yet. Also, there is not support for a global Makefiles at samples directory. This commit deletes references to Documentation directories for clean and mrproper targets as well. Also, This commit deletes the reference to sample directory for clean target. Finally, this commit temporary fixes the references to assembly files .s extensions. This has been marked as a BUG until all .s files can be renamed to .S files. Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com> Change-Id: I4c95c2eed4b5756843ecb9021d03401289522586
This commit is contained in:
parent
ba741fedd7
commit
ce3533a476
1 changed files with 12 additions and 4 deletions
16
Makefile
16
Makefile
|
@ -975,7 +975,7 @@ PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
|
|||
prepare3: include/config/kernel.release
|
||||
ifneq ($(KBUILD_SRC),)
|
||||
@$(kecho) ' Using $(srctree) as source for kernel'
|
||||
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
|
||||
$(Q)if [ -f $(srctree)/.config ]; then \
|
||||
echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \
|
||||
echo >&2 " in the '$(srctree)' directory.";\
|
||||
/bin/false; \
|
||||
|
@ -1218,6 +1218,11 @@ endif # CONFIG_MODULES
|
|||
# Directories & files removed with 'make clean'
|
||||
CLEAN_DIRS += $(MODVERDIR)
|
||||
|
||||
CLEAN_FILES += misc/generated/nodes/kernel_main.c \
|
||||
misc/generated/nodes/microkernel_objects.h \
|
||||
misc/generated/nodes/vxmicro.h \
|
||||
misc/generated/nodes/prj.vpf
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
MRPROPER_DIRS += include/config usr/include include/generated \
|
||||
arch/*/include/generated .tmp_objdiff
|
||||
|
@ -1231,7 +1236,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
|
|||
#
|
||||
clean: rm-dirs := $(CLEAN_DIRS)
|
||||
clean: rm-files := $(CLEAN_FILES)
|
||||
clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)
|
||||
clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) )
|
||||
|
||||
PHONY += $(clean-dirs) clean archclean vmlinuxclean
|
||||
$(clean-dirs):
|
||||
|
@ -1246,7 +1251,7 @@ clean: archclean vmlinuxclean
|
|||
#
|
||||
mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
|
||||
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
|
||||
mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts)
|
||||
mrproper-dirs := $(addprefix _mrproper_,scripts)
|
||||
|
||||
PHONY += $(mrproper-dirs) mrproper archmrproper
|
||||
$(mrproper-dirs):
|
||||
|
@ -1471,11 +1476,14 @@ prepare: ;
|
|||
scripts: ;
|
||||
endif # KBUILD_EXTMOD
|
||||
|
||||
#BUG [oas] regular expression is substituted by [oa] to ommit the removal
|
||||
# of .s files. This change can be undone once all .s files have been
|
||||
# renamed to .S files.
|
||||
clean: $(clean-dirs)
|
||||
$(call cmd,rmdirs)
|
||||
$(call cmd,rmfiles)
|
||||
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
|
||||
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
|
||||
\( -name '*.[oa]' -o -name '*.ko' -o -name '.*.cmd' \
|
||||
-o -name '*.ko.*' \
|
||||
-o -name '*.dwo' \
|
||||
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue