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