python/sepolgen: refpolicy installs its Makefile in include/Makefile

When running "make install-headers" on refpolicy,
/usr/share/selinux/refpolicy/Makefile does not exist but
/usr/share/selinux/refpolicy/include/Makefile does. Use it when
available.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2019-01-05 20:37:58 +01:00 committed by Petr Lautrbach
parent e1f2db5887
commit 916640d786

View File

@ -70,7 +70,10 @@ def attribute_info():
def refpolicy_makefile():
chooser = PathChooser("/etc/selinux/sepolgen.conf")
return chooser("Makefile")
result = chooser("Makefile")
if not os.path.exists(result):
result = chooser("include/Makefile")
return result
def headers():
chooser = PathChooser("/etc/selinux/sepolgen.conf")