1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-20 05:06:35 +02:00

Make asciidoc 'optional'

Run `make doc` in the build directory after editing the asciidoc to
regenerate the manpages. Changes to asciidoc source and generated man
pages will need to be commited together.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
Loui Chang
2014-08-24 16:34:16 -04:00
parent 690f0221b5
commit 1a8fdb1b99
4 changed files with 12 additions and 10 deletions

View File

@ -67,14 +67,13 @@ toxic: $(OBJ)
@$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c
@$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d
doc: $(MANFILES)
doc: $(MANFILES:%=$(DOC_DIR)/%)
%: $(DOC_DIR)/%.asc
@echo " Generating man page $@"
$(DOC_DIR)/%: $(DOC_DIR)/%.asc
@echo " Generating man page $(@F)"
@a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \
-a manmanual="toxic manual" -a mansource=toxic \
-a manversion=$(VERSION) -a datadir=$(DATADIR) $<
@mv $(DOC_DIR)/$@ .
-a manversion=__VERSION__ -a datadir=__DATADIR__ $<
clean:
rm -rf *.d *.o toxic
@ -84,4 +83,4 @@ clean:
-include $(CFG_DIR)/targets/*.mk
.PHONY: clean all
.PHONY: clean all doc