OSDN Git Service

iov_iter: Fix iov_iter_extract_pages() with zero-sized entries
[tomoyo/tomoyo-test1.git] / Makefile
index ceffb58..73f23fa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 VERSION = 6
 PATCHLEVEL = 5
 SUBLEVEL = 0
-EXTRAVERSION = -rc3
+EXTRAVERSION =
 NAME = Hurr durr I'ma ninja sloth
 
 # *DOCUMENTATION*
@@ -467,6 +467,7 @@ export rust_common_flags := --edition=2021 \
                            -Dclippy::let_unit_value -Dclippy::mut_mut \
                            -Dclippy::needless_bitwise_bool \
                            -Dclippy::needless_continue \
+                           -Dclippy::no_mangle_with_rust_abi \
                            -Wclippy::dbg_macro
 
 KBUILD_HOSTCFLAGS   := $(KBUILD_USERHOSTCFLAGS) $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
@@ -1203,7 +1204,7 @@ prepare0: archprepare
 # All the preparing..
 prepare: prepare0
 ifdef CONFIG_RUST
-       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh -v
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh
        $(Q)$(MAKE) $(build)=rust
 endif
 
@@ -1461,20 +1462,6 @@ modules: modules_prepare
 modules_prepare: prepare
        $(Q)$(MAKE) $(build)=scripts scripts/module.lds
 
-export modules_sign_only :=
-
-ifeq ($(CONFIG_MODULE_SIG),y)
-PHONY += modules_sign
-modules_sign: modules_install
-       @:
-
-# modules_sign is a subset of modules_install.
-# 'make modules_install modules_sign' is equivalent to 'make modules_install'.
-ifeq ($(filter modules_install,$(MAKECMDGOALS)),)
-modules_sign_only := y
-endif
-endif
-
 endif # CONFIG_MODULES
 
 ###
@@ -1566,7 +1553,6 @@ help:
        @echo  '  mrproper        - Remove all generated files + config + various backup files'
        @echo  '  distclean       - mrproper + remove editor backup and patch files'
        @echo  ''
-       @echo  'Configuration targets:'
        @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
        @echo  ''
        @echo  'Other generic targets:'
@@ -1717,7 +1703,7 @@ $(DOC_TARGETS):
 # "Is Rust available?" target
 PHONY += rustavailable
 rustavailable:
-       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh -v && echo "Rust is available!"
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh && echo "Rust is available!"
 
 # Documentation target
 #
@@ -1751,11 +1737,6 @@ rustfmt:
 rustfmtcheck: rustfmt_flags = --check
 rustfmtcheck: rustfmt
 
-# IDE support targets
-PHONY += rust-analyzer
-rust-analyzer:
-       $(Q)$(MAKE) $(build)=rust $@
-
 # Misc
 # ---------------------------------------------------------------------------
 
@@ -1816,6 +1797,7 @@ help:
        @echo  '  modules         - default target, build the module(s)'
        @echo  '  modules_install - install the module'
        @echo  '  clean           - remove generated files in module directory only'
+       @echo  '  rust-analyzer   - generate rust-project.json rust-analyzer support file'
        @echo  ''
 
 ifndef CONFIG_MODULES
@@ -1833,10 +1815,24 @@ endif # KBUILD_EXTMOD
 # ---------------------------------------------------------------------------
 # Modules
 
-PHONY += modules modules_install modules_prepare
+PHONY += modules modules_install modules_sign modules_prepare
 
 modules_install:
-       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst \
+       sign-only=$(if $(filter modules_install,$(MAKECMDGOALS)),,y)
+
+ifeq ($(CONFIG_MODULE_SIG),y)
+# modules_sign is a subset of modules_install.
+# 'make modules_install modules_sign' is equivalent to 'make modules_install'.
+modules_sign: modules_install
+       @:
+else
+modules_sign:
+       @echo >&2 '***'
+       @echo >&2 '*** CONFIG_MODULE_SIG is disabled. You cannot sign modules.'
+       @echo >&2 '***'
+       @false
+endif
 
 ifdef CONFIG_MODULES
 
@@ -1950,6 +1946,11 @@ quiet_cmd_tags = GEN     $@
 tags TAGS cscope gtags: FORCE
        $(call cmd,tags)
 
+# IDE support targets
+PHONY += rust-analyzer
+rust-analyzer:
+       $(Q)$(MAKE) $(build)=rust $@
+
 # Script to generate missing namespace dependencies
 # ---------------------------------------------------------------------------