2014-11-23 15:34:33

by Nicolas Iooss

[permalink] [raw]
Subject: [refpolicy] [PATCH] Create tmp directory when compiling a .mod.fc file in a modular way

When compiling modules using support/Makefile.devel (which is installed
in /usr/share/selinux/*/include/Makefile) with "make -j9", the build
fails because tmp/ does not exist.

Add the missing command to create tmp/ when running tmp/%.mod.fc target.

Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=530178
---
support/Makefile.devel | 1 +
1 file changed, 1 insertion(+)

diff --git a/support/Makefile.devel b/support/Makefile.devel
index b96e9b3d1caa..ae5293296194 100644
--- a/support/Makefile.devel
+++ b/support/Makefile.devel
@@ -158,6 +158,7 @@ tmp/%.mod: $(m4support) tmp/all_interfaces.conf %.te
$(verbose) $(CHECKMODULE) -m $(@:.mod=.tmp) -o $@

tmp/%.mod.fc: $(m4support) %.fc
+ @test -d $(@D) || mkdir -p $(@D)
$(verbose) $(M4) $(M4PARAM) $^ > $@

%.pp: tmp/%.mod tmp/%.mod.fc
--
2.1.3


2014-12-02 15:31:31

by cpebenito

[permalink] [raw]
Subject: [refpolicy] [PATCH] Create tmp directory when compiling a .mod.fc file in a modular way

On 11/23/2014 10:34 AM, Nicolas Iooss wrote:
> When compiling modules using support/Makefile.devel (which is installed
> in /usr/share/selinux/*/include/Makefile) with "make -j9", the build
> fails because tmp/ does not exist.
>
> Add the missing command to create tmp/ when running tmp/%.mod.fc target.
>
> Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=530178
> ---
> support/Makefile.devel | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/support/Makefile.devel b/support/Makefile.devel
> index b96e9b3d1caa..ae5293296194 100644
> --- a/support/Makefile.devel
> +++ b/support/Makefile.devel
> @@ -158,6 +158,7 @@ tmp/%.mod: $(m4support) tmp/all_interfaces.conf %.te
> $(verbose) $(CHECKMODULE) -m $(@:.mod=.tmp) -o $@
>
> tmp/%.mod.fc: $(m4support) %.fc
> + @test -d $(@D) || mkdir -p $(@D)
> $(verbose) $(M4) $(M4PARAM) $^ > $@
>
> %.pp: tmp/%.mod tmp/%.mod.fc

Merged.

--
Chris PeBenito
Tresys Technology, LLC
http://www.tresys.com | oss.tresys.com