Skip to contentSkip to conversation

secilc: do not build secilc man page if it is up to date

PATCH Applied Nicolas Iooss 2 participants 2 messages Nov 14, 2016 – Nov 15, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 secilc: do not build secilc man page if it is up to date

When running "make all" several times in the root directory of the project, the following lines always appear (and the command takes some seconds to complete on my system with a slow hard drive):

xmlto man secilc.8.xml
Note: Writing secilc.8

This is because "make man" always builds secilc.8 even though secilc.8.xml has not been modified. Introduce an intermediate target to avoid this behavior.

---
 secilc/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
secilc/Makefile +3 -1
index 9bea186ba0b9..40254ce44caf 100644
@@ -25,7 +25,9 @@ $(SECILC): $(SECILC_OBJS)
 test: $(SECILC)
 	./$(SECILC) test/policy.cil
 
-man: $(MANPAGE).xml
+man: $(MANPAGE)
+
+$(MANPAGE): $(MANPAGE).xml
 	$(XMLTO) man $(MANPAGE).xml
 
 install: all man
Signature · 1 line
2.10.2
#1 lore raw
Quoted 4 lines · Nicolas Iooss

When running "make all" several times in the root directory of the project, the following lines always appear (and the command takes some seconds to complete on my system with a slow hard drive):

Quoted 8 lines

xmlto man secilc.8.xml
Note: Writing secilc.8

This is because "make man" always builds secilc.8 even though secilc.8.xml has not been modified. Introduce an intermediate target to avoid this behavior.

Thanks, applied.

Quoted 20 lines
---
 secilc/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
secilc/Makefile +3 -1
index 9bea186ba0b9..40254ce44caf 100644
@@ -25,7 +25,9 @@ $(SECILC): $(SECILC_OBJS)
 test: $(SECILC)
 	./$(SECILC) test/policy.cil
 
-man: $(MANPAGE).xml
+man: $(MANPAGE)
+
+$(MANPAGE): $(MANPAGE).xml
 	$(XMLTO) man $(MANPAGE).xml
 
 install: all man