]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selinux: move genheaders to security/selinux/
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 6 Sep 2024 17:29:14 +0000 (02:29 +0900)
committerPaul Moore <paul@paul-moore.com>
Thu, 3 Oct 2024 20:07:51 +0000 (16:07 -0400)
This tool is only used in security/selinux/Makefile.

Move it to security/selinux/ so that 'make clean' can clean it up.

Please note 'make clean' does not clean scripts/ because tools under
scripts/ are often used for external module builds. Obviously, genheaders
is not the case here.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Paul Moore <paul@paul-moore.com>
scripts/remove-stale-files
scripts/selinux/Makefile
scripts/selinux/genheaders/.gitignore [deleted file]
scripts/selinux/genheaders/Makefile [deleted file]
security/selinux/.gitignore
security/selinux/Makefile
security/selinux/genheaders.c [moved from scripts/selinux/genheaders/genheaders.c with 100% similarity]

index 8fc55a749ccc30b3f9e442df763ced798c3391f2..6e39fa8540df2f6da9d8a1d1e90e105243b495a2 100755 (executable)
@@ -20,6 +20,9 @@ set -e
 # yard. Stale files stay in this file for a while (for some release cycles?),
 # then will be really dead and removed from the code base entirely.
 
+# moved to security/selinux/genheaders
+rm -f scripts/selinux/genheaders/genheaders
+
 rm -f *.spec
 
 rm -f lib/test_fortify.log
index 59494e14989b57f2b50b4625ebe04e05d23e39ec..4b1308fa5732351691b1f853d59d8c648eef0c6f 100644 (file)
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-subdir-y := mdp genheaders
+subdir-y := mdp
diff --git a/scripts/selinux/genheaders/.gitignore b/scripts/selinux/genheaders/.gitignore
deleted file mode 100644 (file)
index 5fcadd3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-genheaders
diff --git a/scripts/selinux/genheaders/Makefile b/scripts/selinux/genheaders/Makefile
deleted file mode 100644 (file)
index 866f60e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-hostprogs-always-y += genheaders
-HOST_EXTRACFLAGS += -I$(srctree)/security/selinux/include
index 168fae13ca5a9bdca305084a6a62d1163ed429e8..01c0df8ab009cf2c17c4eac56c0e3ae4594fe0e8 100644 (file)
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
 av_permissions.h
 flask.h
+/genheaders
index c47519ed81565eb409330ffa39d22724f2ed3ac0..86f0575f670da66a9dc57e13a236d6a5551af38e 100644 (file)
@@ -36,7 +36,10 @@ quiet_cmd_genhdrs = GEN     $(addprefix $(obj)/,$(genhdrs))
 # see the note above, replace the $targets and 'flask.h' rule with the lines
 # below:
 #  targets += $(genhdrs)
-#  $(addprefix $(obj)/,$(genhdrs)) &: scripts/selinux/...
+#  $(addprefix $(obj)/,$(genhdrs)) &: $(obj)/genheaders FORCE
 targets += flask.h
-$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE
+$(obj)/flask.h: $(obj)/genheaders FORCE
        $(call if_changed,genhdrs)
+
+hostprogs := genheaders
+HOST_EXTRACFLAGS += -I$(srctree)/security/selinux/include