improve VERBOSE handling
[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 ifeq ($(VERBOSE),0)
16         @echo "[$@]"
17 endif
18         $(MAKECMDPREFIX)echo "/$(JAVADOC_DIR)/" > $@
19         $(MAKECMDPREFIX)echo "/$(HTML_DIR)/" >> $@
20         $(MAKECMDPREFIX)echo "/$(MAN_DIR)/" >> $@
21         $(MAKECMDPREFIX)echo "/$(LATEX_DIR)/" >> $@
22         $(MAKECMDPREFIX)echo "/$(TMP_DOX_FILE)" >> $@
23         $(MAKECMDPREFIX)echo "/$(PDF_NAME)" >> $@
24
25 all: clean $(DOX_FILE)
26 ifeq ($(VERBOSE),0)
27         @echo "[$@]"
28 endif
29         $(MAKECMDPREFIX)sed \
30           -e "s/__PLUGIN_VER__/$(PLUGIN_VER)/" \
31           -e "s/__LIBNAME__/$(LIBNAME)/" \
32           "$(DOX_FILE)" > "$(TMP_DOX_FILE)"
33         $(MAKECMDPREFIX)doxygen "$(TMP_DOX_FILE)"
34         $(MAKECMDPREFIX)rm "$(TMP_DOX_FILE)"
35         $(MAKECMDPREFIX)$(MAKE) -s -C $(LATEX_DIR) all > /dev/null 2>&1
36         $(MAKECMDPREFIX)mv "$(LATEX_DIR)/refman.pdf" "$(PDF_NAME)"
37         $(MAKECMDPREFIX)rm -fr "$(LATEX_DIR)"
38
39 clean:
40 ifeq ($(VERBOSE),0)
41         @echo "[$@]"
42 endif
43         $(MAKECMDPREFIX)rm -fr "$(JAVADOC_DIR)" "$(HTML_DIR)" "$(LATEX_DIR)" "$(MAN_DIR)" \
44                 "$(TMP_DOX_FILE)" "$(PDF_NAME)"