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