From 328587ad9c176ccd320c1797f204228eedd44ff2 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sun, 24 Aug 2014 17:00:25 -0400 Subject: [PATCH] doc: Make asciidoc extra optional. Completely separate man page generation from the main build to satisfy travis-ci behaviour. Signed-off-by: Loui Chang --- README.md | 3 ++- build/Makefile | 6 ------ doc/Makefile | 12 ++++++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 doc/Makefile diff --git a/README.md b/README.md index f0bc319..a741c97 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly ##### Documentation * [Asciidoc](http://asciidoc.org/index.html) Only required for regenerating manpages. -* Run `make doc` in the build directory after editing the asciidoc to regenerate the manpages. +* Run `make` in the doc directory after editing the asciidoc to regenerate the manpages. +* Asciidoc files and generated manpages will need to be commited together. ### Compiling 1. `cd build/` diff --git a/build/Makefile b/build/Makefile index d4928d3..3e2de83 100644 --- a/build/Makefile +++ b/build/Makefile @@ -69,12 +69,6 @@ toxic: $(OBJ) doc: $(MANFILES:%=$(DOC_DIR)/%) -$(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__ $< - clean: rm -rf *.d *.o toxic rm -rf $(MANFILES) diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..2d313d2 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,12 @@ +MANFILES = toxic.1 toxic.conf.5 + +# Targets +doc: $(MANFILES) + +%: %.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__ $< + +.PHONY: doc