]> git.llucax.com Git - software/posixx.git/blob - doc/Makefile
Generalize basic_buffer's value_type
[software/posixx.git] / doc / Makefile
1
2 # sources from where to build the sources
3 DOC_SOURCES = $(shell find ../src -name '*.hpp')
4
5 # prefix for installing the binaries and headers
6 prefix=/usr/local
7
8
9 # install command
10 INSTALL = install -p -m 0644 -D
11
12
13 # install utility functions
14 install_msg = echo "  INSTALL $(1)"
15
16 install_group = @$(call install_msg,$(2)) && \
17         cd reference && \
18         for f in `find $(1) -type f`; do \
19                 $(call install,$$f,$(2)/$$f); \
20         done && \
21         cd .. && \
22         touch $@
23
24 ifneq ($(V), 1)
25 NICE_DOXY = @echo "  DOXYGEN"; (cat Doxyfile; echo "QUIET=YES") | doxygen -
26 NICE_CLEAN = @echo "  CLEAN"; $(RM)
27 install = $(INSTALL) $(1) $(2)
28 else
29 NICE_DOXY = doxygen
30 NICE_CLEAN = $(RM) -v
31 install = $(call install_msg,$(2)); $(INSTALL) $(1) $(2)
32 endif
33
34
35 default: all
36
37 all: doc
38
39 doc: .doc-stamp
40
41 .doc-stamp: include $(DOC_SOURCES) Doxyfile
42         $(NICE_DOXY)
43         @touch $@
44
45 install: install-man install-html
46
47 install-man: .install-man-stamp
48
49 .install-man-stamp: .doc-stamp
50         $(call install_group,man,$(prefix)/share/man)
51
52 install-html: .install-html-stamp
53
54 .install-html-stamp: .doc-stamp
55         $(call install_group,html,$(prefix)/share/doc/posixx/html)
56
57 include:
58         @mkdir -p include
59         @ln -fs ../../src include/posixx
60
61 clean:
62         $(NICE_CLEAN) -r reference include .*-stamp
63
64 .PHONY: default all doc install install-man install-doc clean
65