dmzconf/Makefile

59 lines
1.4 KiB
Makefile
Raw Normal View History

2024-12-03 02:42:15 +00:00
.PHONY: help
help: ## Print the help message
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
sort | \
column -s ':' -t
map.txt: map.ge ## Making map.txt
grep -v '# unimportant' $< | graph-easy --boxart > $@
2024-12-03 02:42:15 +00:00
cat $@
2024-12-03 02:42:15 +00:00
full_map.txt: map.ge ## Generating full_map.txt with graph-easy
2024-12-02 15:00:00 +00:00
graph-easy --boxart < $< > $@
2024-12-03 02:42:15 +00:00
cat $@
2024-12-05 14:29:34 +00:00
########## Man Pages ##########
mandir = $(HOME)/.local/man/man6
kralizec_docs != grep -rl "^section:" kralizec
kralmans = $(kralizec_docs:kralizec/%/README.md=$(mandir)/%.6)
2024-12-05 16:06:07 +00:00
$(mandir)/%.6: kralizec/%/README.md
lowdown -stman $< > $@
2024-12-05 14:29:34 +00:00
krov_docs != grep -rl "^section:" krov
krovmans = $(krov_docs:krov/%/README.md=$(mandir)/%.6)
2024-12-05 16:06:07 +00:00
$(mandir)/%.6: krov/%/README.md
2024-12-05 14:29:34 +00:00
lowdown -stman $< > $@
2024-12-06 21:39:45 +00:00
splint_docs != grep -rl "^section:" splintrs
splintmans = $(splint_docs:splintrs/%/README.md=$(mandir)/%.6)
$(mandir)/%.6: splintrs/%/README.md
lowdown -stman $< > $@
2024-12-05 16:06:07 +00:00
setup_docs != grep -rl "^section:" setup
setupmans = $(setup_docs:setup/%.md=$(mandir)/%.6)
$(mandir)/%.6: setup/%.md
2024-12-05 14:29:34 +00:00
lowdown -stman $< > $@
$(mandir):
mkdir -p $@
2024-12-06 21:39:45 +00:00
$(kralmans) $(krovmans) $(splintmans) $(setupmans) :| $(mandir)
2024-12-05 14:29:34 +00:00
.PHONY: pages
2024-12-06 21:39:45 +00:00
pages: $(kralmans) $(krovmans) $(setupmans) $(splintmans)
2024-12-05 14:29:34 +00:00
$(info $(kralmans))
@test ! $(command -v mandb) || mandb --user-db
2024-12-05 15:33:38 +00:00
$(info Open DMZ's man pages with 'man 6 <tab>')
2024-12-05 14:29:34 +00:00
##########
clean:
$(RM) $(kralmans) $(krovmans)