Commit | Line | Data |
---|---|---|
8dd68dca NR |
1 | # Requires variable: NAME |
2 | ||
3 | .PHONY: doc clean mrpropre mrproper | |
4 | ||
5 | doc: VERSION Doxyfile | |
6 | @if doxygen -v >/dev/null 2>&1; then \ | |
7 | echo Adding VERSION number to Doxyfile...; \ | |
8 | tmp=`mktemp`; \ | |
9 | grep -v '^PROJECT_NUMBER' Doxyfile > "$$tmp"; \ | |
10 | cat "$$tmp" > Doxyfile; \ | |
11 | rm -f "$$tmp"; \ | |
12 | echo "PROJECT_NUMBER = `cat VERSION`" >> Doxyfile; \ | |
13 | echo doxygen; \ | |
14 | doxygen; \ | |
15 | else \ | |
16 | echo "man pages generation: pandoc required" >&2; \ | |
17 | false; \ | |
18 | fi; \ | |
19 | ||
20 | clean: | |
21 | @( \ | |
22 | echo Removing VERSION number from Doxyfile...; \ | |
23 | tmp=`mktemp`; \ | |
24 | grep -v '^PROJECT_NUMBER' Doxyfile > "$$tmp"; \ | |
25 | cat "$$tmp" > Doxyfile; \ | |
26 | rm -f "$$tmp"; \ | |
27 | ); | |
28 | ||
29 | mrproper: mrpropre | |
30 | mrpropre: | |
31 | rm -rf doc/html doc/latex doc/man | |
32 | rmdir doc 2>/dev/null || true | |
33 |