diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-01-07 18:45:45 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-01-22 23:43:33 +0900 |
commit | c83b16cefd78f55071840e1159ead9fe62747769 (patch) | |
tree | f103dd2763d7d48a7bfa070480a8db8082751329 /scripts/Makefile | |
parent | 93c656de8da8b53317bd88ecb7cce592310995d8 (diff) |
kbuild: rust: move rust/target.json to scripts/
scripts/ is a better place to generate files used treewide.
With target.json moved to scripts/, you do not need to add target.json
to no-clean-files or MRPROPER_FILES.
'make clean' does not visit scripts/, but 'make mrproper' does.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/Makefile')
-rw-r--r-- | scripts/Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/Makefile b/scripts/Makefile index 1575af84d557..0e0ae3c06ed7 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -10,8 +10,14 @@ hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable hostprogs-always-$(CONFIG_ASN1) += asn1_compiler hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert -hostprogs-always-$(CONFIG_RUST) += generate_rust_target +always-$(CONFIG_RUST) += target.json +filechk_rust_target = $< < include/config/auto.conf + +$(obj)/target.json: scripts/generate_rust_target include/config/auto.conf FORCE + $(call filechk,rust_target) + +hostprogs += generate_rust_target generate_rust_target-rust := y HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include |