Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Don't advertise (or allow) headers_{install,check} where inappropriate.

For architectures which don't have the include/asm-$(ARCH)/Kbuild file,
like ARM26, UM, etc.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>

+9 -2
+9 -2
Makefile
··· 894 894 895 895 PHONY += headers_install 896 896 headers_install: include/linux/version.h 897 + @if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \ 898 + echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \ 899 + exit 1 ; fi 897 900 $(Q)unifdef -Ux /dev/null 898 901 $(Q)rm -rf $(INSTALL_HDR_PATH)/include 899 902 $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include ··· 1079 1076 @echo ' cscope - Generate cscope index' 1080 1077 @echo ' kernelrelease - Output the release version string' 1081 1078 @echo ' kernelversion - Output the version stored in Makefile' 1082 - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH' 1079 + @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ 1080 + echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ 1081 + fi 1083 1082 @echo ' (default: $(INSTALL_HDR_PATH))' 1084 1083 @echo '' 1085 1084 @echo 'Static analysers' 1086 1085 @echo ' checkstack - Generate a list of stack hogs' 1087 1086 @echo ' namespacecheck - Name space analysis on compiled kernel' 1088 - @echo ' headers_check - Sanity check on exported headers' 1087 + @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ 1088 + echo ' headers_check - Sanity check on exported headers'; \ 1089 + fi 1089 1090 @echo '' 1090 1091 @echo 'Kernel packaging:' 1091 1092 @$(MAKE) $(build)=$(package-dir) help