50adf6c98edc82e17f7afdc82f2b2fc24ef1720b
[olsrd.git] / lib / pud / wireformat / doc / Makefile
1 include ../Makefile.inc
2 include ../../Makefile.inc
3
4 HTML_DIR = html
5 MAN_DIR = man
6 LATEX_DIR = latex
7 PDF_NAME = $(LIBNAME).pdf
8 DOX_FILE = doxygen.conf
9 TMP_DOX_FILE = $(DOX_FILE).temp
10
11 .PHONY: .gitignore all clean
12
13 .gitignore:
14         @echo "[$@]"
15         @echo "/$(HTML_DIR)/" > $@
16         @echo "/$(MAN_DIR)/" >> $@
17         @echo "/$(LATEX_DIR)/" >> $@
18         @echo "/$(TMP_DOX_FILE)" >> $@
19         @echo "/$(PDF_NAME)" >> $@
20
21 all: clean $(DOX_FILE)
22         @echo "[$@]"
23         @sed \
24           -e "s/__PLUGIN_VER__/$(PLUGIN_VER)/" \
25           -e "s/__LIBNAME__/$(LIBNAME)/" \
26           "$(DOX_FILE)" > "$(TMP_DOX_FILE)"
27         @doxygen "$(TMP_DOX_FILE)"
28         @rm "$(TMP_DOX_FILE)"
29         @$(MAKE) -s -C $(LATEX_DIR) all > /dev/null 2>&1
30         @mv "$(LATEX_DIR)/refman.pdf" "$(PDF_NAME)"
31         @rm -fr "$(LATEX_DIR)"
32
33 clean:
34         @echo "[$@]"
35         @rm -fr "$(HTML_DIR)" "$(LATEX_DIR)" "$(MAN_DIR)" "$(TMP_DOX_FILE)" "$(PDF_NAME)"