aboutsummaryrefslogtreecommitdiffstats
path: root/src/man/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/man/Makefile')
-rw-r--r--src/man/Makefile59
1 files changed, 20 insertions, 39 deletions
diff --git a/src/man/Makefile b/src/man/Makefile
index 1c0d94244..526ed7fcb 100644
--- a/src/man/Makefile
+++ b/src/man/Makefile
@@ -2,44 +2,25 @@
2ROOT = ../.. 2ROOT = ../..
3-include $(ROOT)/config.mk 3-include $(ROOT)/config.mk
4 4
5all: firecfg.1.gz firejail.1.gz firejail-login.5.gz firejail-users.5.gz firejail-profile.5.gz firemon.1.gz jailcheck.1.gz 5MOD_DIR := $(ROOT)/src/man
6 6MANPAGES_IN := $(sort $(wildcard $(MOD_DIR)/*.in))
7#firecfg.1.gz: firecfg.txt 7MANPAGES_GZ := $(MANPAGES_IN:.in=.gz)
8# gawk -f ./preproc.awk -- $(MANFLAGS) < $< > firecfg.1 8TARGET = $(MANPAGES_GZ)
9# ./mkman.sh $(VERSION) firecfg.1 9
10# gzip -n9 firecfg.1 10.PHONY: all
11 11all: $(TARGET)
12# a small function to build a manpage 12
13define build 13# foo.1: foo.1.in
14 gawk -f ./preproc.awk -- $(MANFLAGS) < $1 > $2 14$(MOD_DIR)/%: $(MOD_DIR)/%.in $(ROOT)/config.mk
15 ./mkman.sh $(VERSION) ./$2 15 @printf 'Generating %s from %s\n' $@ $<
16 rm -f $2.gz 16 @gawk -f $(MOD_DIR)/preproc.awk -- $(MANFLAGS) <$< | \
17 gzip -n9 $2 17 $(MOD_DIR)/mkman.sh $(VERSION) >$@
18endef 18
19 19# foo.1.gz: foo.1
20firecfg.1.gz: firecfg.txt 20$(MOD_DIR)/%.gz: $(MOD_DIR)/%
21 $(call build,firecfg.txt,firecfg.1) 21 @printf 'Generating %s from %s\n' $@ $<
22 22 @rm -f $@
23firejail.1.gz: firejail.txt 23 @gzip -n9 $<
24 $(call build,firejail.txt,firejail.1)
25
26firejail-login.5.gz: firejail-login.txt
27 $(call build,firejail-login.txt,firejail-login.5)
28
29firejail-users.5.gz: firejail-users.txt
30 $(call build,firejail-users.txt,firejail-users.5)
31
32firejail-profile.5.gz: firejail-profile.txt
33 $(call build,firejail-profile.txt,firejail-profile.5)
34
35firemon.1.gz: firemon.txt
36 $(call build,firemon.txt,firemon.1)
37
38jailcheck.1.gz: jailcheck.txt
39 $(call build,jailcheck.txt,jailcheck.1)
40 24
41.PHONY: clean 25.PHONY: clean
42clean:; rm -fr *.1 *.5 *.gz 26clean:; rm -f *.1 *.5 *.gz
43
44.PHONY: distclean
45distclean: clean