diff --git a/Makefile b/Makefile index 5aa07da475bc..b65cfe3bcba8 100644 --- a/Makefile +++ b/Makefile @@ -1019,9 +1019,11 @@ ifdef CONFIG_TRIM_UNUSED_KSYMS "$(MAKE) -f $(srctree)/Makefile vmlinux" endif -# standalone target for easier testing -include/generated/autoksyms.h: FORCE - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh true +autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h) + +$(autoksyms_h): + $(Q)mkdir -p $(dir $@) + $(Q)touch $@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) @@ -1065,7 +1067,7 @@ include/config/kernel.release: include/config/auto.conf FORCE # in parallel PHONY += scripts scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \ - asm-generic gcc-plugins + asm-generic gcc-plugins $(autoksyms_h) $(Q)$(MAKE) $(build)=$(@) # Things we need to do before we recursively start building the kernel @@ -1095,7 +1097,7 @@ endif # that need to depend on updated CONFIG_* values can be checked here. prepare2: prepare3 prepare-compiler-check outputmakefile asm-generic -prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ +prepare1: prepare2 $(version_h) $(autoksyms_h) include/generated/utsrelease.h \ include/config/auto.conf $(cmd_crmodverdir) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index cb3ec53a7c29..eb139a17383c 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -38,8 +38,6 @@ nconfig: $(obj)/nconf # for external use. silentoldconfig: $(obj)/conf $(Q)mkdir -p include/config include/generated - $(Q)test -e include/generated/autoksyms.h || \ - touch include/generated/autoksyms.h $< $(silent) --$@ $(Kconfig) localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf