47 lines
1.0 KiB
Makefile
47 lines
1.0 KiB
Makefile
.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 > $@
|
|
cat $@
|
|
|
|
full_map.txt: map.ge ## Generating full_map.txt with graph-easy
|
|
graph-easy --boxart < $< > $@
|
|
cat $@
|
|
|
|
########## Man Pages ##########
|
|
|
|
mandir = $(HOME)/.local/man/man6
|
|
|
|
kralizec_docs != grep -rl "^section:" kralizec
|
|
kralmans = $(kralizec_docs:kralizec/%/README.md=$(mandir)/%.6)
|
|
|
|
krov_docs != grep -rl "^section:" krov
|
|
krovmans = $(krov_docs:krov/%/README.md=$(mandir)/%.6)
|
|
|
|
$(mandir)/%.6: kralizec/%/README.md
|
|
lowdown -stman $< > $@
|
|
|
|
$(mandir)/%.6: krov/%/README.md
|
|
lowdown -stman $< > $@
|
|
|
|
$(mandir):
|
|
mkdir -p $@
|
|
|
|
$(kralmans) $(krovmans) :| $(mandir)
|
|
|
|
.PHONY: pages
|
|
pages: $(kralmans) $(krovmans)
|
|
$(info $(kralmans))
|
|
@test ! $(command -v mandb) || mandb --user-db
|
|
$(info Open DMZ's man pages with 'man 6 <tab>')
|
|
|
|
##########
|
|
|
|
clean:
|
|
$(RM) $(kralmans) $(krovmans)
|