Disable clean, scripts, oldconfig, prepare targets for kernel-devel rpms Signed-off-by: Thomas Backlund <tmb@mageia.org> --- Makefile | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff -Nurp linux-5.16.3/Makefile linux-5.16.3-mrp/Makefile --- linux-5.16.3/Makefile 2022-01-27 15:05:03.782197431 +0200 +++ linux-5.16.3-mrp/Makefile 2022-01-27 15:06:08.614387396 +0200 @@ -612,11 +612,14 @@ ifdef config-build include $(srctree)/arch/$(SRCARCH)/Makefile export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT -config: outputmakefile scripts_basic FORCE - $(Q)$(MAKE) $(build)=scripts/kconfig $@ +config: -%config: outputmakefile scripts_basic FORCE - $(Q)$(MAKE) $(build)=scripts/kconfig $@ +%config: + +# empty targets to keep dkms happy without need for depending on +# bison and flex as kernel-devel rpms are already fully prepared +oldconfig: +syncconfig: else #!config-build # =========================================================================== @@ -1177,8 +1180,7 @@ include/config/kernel.release: FORCE # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts -scripts: scripts_basic scripts_dtc - $(Q)$(MAKE) $(build)=$(@) +scripts: # Things we need to do before we recursively start building the kernel # or the modules are listed in "prepare". @@ -1192,12 +1194,10 @@ archprepare: outputmakefile archheaders asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \ include/generated/autoconf.h remove-stale-files -prepare0: archprepare - $(Q)$(MAKE) $(build)=scripts/mod - $(Q)$(MAKE) $(build)=. +prepare0: # All the preparing.. -prepare: prepare0 +prepare: PHONY += remove-stale-files remove-stale-files: @@ -1493,20 +1493,10 @@ endif # CONFIG_MODULES # make distclean Remove editor backup files, patch leftover files and the like # Directories & files removed with 'make clean' -CLEAN_FILES += include/ksym vmlinux.symvers modules-only.symvers \ - modules.builtin modules.builtin.modinfo modules.nsdeps \ - compile_commands.json .thinlto-cache +CLEAN_FILES += "" # Directories & files removed with 'make mrproper' -MRPROPER_FILES += include/config include/generated \ - arch/$(SRCARCH)/include/generated .tmp_objdiff \ - debian snap tar-install \ - .config .config.old .version \ - Module.symvers \ - certs/signing_key.pem certs/signing_key.x509 \ - certs/x509.genkey \ - vmlinux-gdb.py \ - *.spec +MRPROPER_FILES += "" # clean - Delete most, but leave enough to build external modules # @@ -1522,15 +1512,13 @@ clean: archclean vmlinuxclean resolve_bt # mrproper - Delete all generated files, including .config # -mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) -mrproper-dirs := $(addprefix _mrproper_,scripts) +mrproper: +mrproper-dirs := PHONY += $(mrproper-dirs) mrproper $(mrproper-dirs): - $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) -mrproper: clean $(mrproper-dirs) - $(call cmd,rmfiles) +mrproper: # distclean #