selinux: fix Makefile dependencies of flask.h
PATCH 1/1 selinux: fix Makefile dependencies of flask.h
Make the flask.h target depend on the genheaders binary instead of classmap.h to ensure that it is rebuilt if any of the dependencies of genheaders are changed.
Notably this fixes flask.h not being rebuilt wheninitial_sid_to_string.h is modified.
--- security/selinux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/selinux/Makefile +2 -2
@@ -23,8 +23,8 @@ ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h - cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h + cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h targets += flask.h av_permissions.h -$(obj)/flask.h: $(src)/include/classmap.h FORCE +$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE $(call if_changed,flask)
Signature · 1 line
2.39.2
Quoted 10 lines · Ondrej Mosnacek
Make the
flask.htarget depend on the genheaders binary instead ofclassmap.hto ensure that it is rebuilt if any of the dependencies of genheaders are changed.Notably this fixes
flask.hnot being rebuilt wheninitial_sid_to_string.his modified.Fixes 8753f6bec352 ("selinux: generate flask headers during kernel build")Signed-off-by Ondrej Mosnacek <[email protected]>
Quoted 22 lines
--- security/selinux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)security/selinux/Makefile +2
-3@@ -23,8 +23,8 @@ ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h - cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h + cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h targets += flask.h av_permissions.h -$(obj)/flask.h: $(src)/include/classmap.h FORCE +$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE $(call if_changed,flask) --2.39.2
Paul Moore
maintainerQuoted 5 lines · Ondrej Mosnacek
Make the
flask.htarget depend on the genheaders binary instead ofclassmap.hto ensure that it is rebuilt if any of the dependencies of genheaders are changed.
Quoted 8 lines
Notably this fixes
flask.hnot being rebuilt wheninitial_sid_to_string.his modified.Fixes 8753f6bec352 ("selinux: generate flask headers during kernel build")Signed-off-by Ondrej Mosnacek <[email protected]>--- security/selinux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks Ondrej, I just merged this into selinux/next. You also inspired me to fix a build bug with av_permissions.h that has bit me once or twice :)
Signature · 1 line
paul-moore.com