Skip to contentSkip to conversation

Create tmp directory when compiling a .mod.fc file in a modular way

PATCH New Nicolas Iooss 2 participants 2 messages Nov 23, 2014 – Dec 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(+)
support/Makefile.devel +1 -0
index b96e9b3d1caa..ae5293296194 100644
@@ -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
Signature · 1 line
2.1.3
#1 lore raw

PATCH 1/1 Create tmp directory when compiling a .mod.fc file in a modular way

Quoted 16 lines · Nicolas Iooss

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(+)
support/Makefile.devel +0 -0
index b96e9b3d1caa..ae5293296194 100644

support/Makefile.devel tmp/%.mod: $(m4support) tmp/all_interfaces.conf %.te · line 164

Quoted 7 lines
support/Makefile.devel +1 -0
@@ -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.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com