selinux: move genheaders to security/selinux/

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>
This commit is contained in:
Masahiro Yamada 2024-09-07 02:29:14 +09:00 committed by Paul Moore
parent 541b57e313
commit 3b70b66e03
7 changed files with 10 additions and 8 deletions

View File

@ -20,6 +20,9 @@ set -e
# yard. Stale files stay in this file for a while (for some release cycles?), # 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. # 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 *.spec
rm -f lib/test_fortify.log rm -f lib/test_fortify.log

View File

@ -1,2 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
subdir-y := mdp genheaders subdir-y := mdp

View File

@ -1,2 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
genheaders

View File

@ -1,3 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
hostprogs-always-y += genheaders
HOST_EXTRACFLAGS += -I$(srctree)/security/selinux/include

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
av_permissions.h av_permissions.h
flask.h flask.h
/genheaders

View 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 # see the note above, replace the $targets and 'flask.h' rule with the lines
# below: # below:
# targets += $(genhdrs) # targets += $(genhdrs)
# $(addprefix $(obj)/,$(genhdrs)) &: scripts/selinux/... # $(addprefix $(obj)/,$(genhdrs)) &: $(obj)/genheaders FORCE
targets += flask.h targets += flask.h
$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE $(obj)/flask.h: $(obj)/genheaders FORCE
$(call if_changed,genhdrs) $(call if_changed,genhdrs)
hostprogs := genheaders
HOST_EXTRACFLAGS += -I$(srctree)/security/selinux/include