summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
blob: cda462809c5d7d156f2b9973d79d41dfa047802e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
SUBDIRS = api

old_EXTRA_DIST = DAEMON build_OS2.txt 					\
	camlib_devel.lyx 						\
	camlib_devel-portmon.eps camlib_devel-repeater.eps 		\
	camlib_devel.sgml camlib_devel.txt camlib_devel-y.eps 		\
	frontend_devel.lyx frontend_devel.sgml frontend_devel.txt 	\
	libgphoto2.3 libgphoto2_port.3

man_MANS = libgphoto2.3 libgphoto2_port.3

# doc_DATA = FAQ faq.xml
########################################################################
# Conditional rules, depending on tool availability
########################################################################

if HAVE_DOXYGEN

DOXYGEN_FILES =
DOXYGEN_STAMPS = $(DOXYGEN_OUTPUT_DIR).stamp

# FIXME: Depend on source files.
$(DOXYGEN_OUTPUT_DIR).stamp: Doxyfile
	doxygen Doxyfile
	echo > $@

$(HTML_APIDOC_DIR).tar.gz: $(DOXYGEN_OUTPUT_DIR).stamp
	(cd $(DOXYGEN_OUTPUT_DIR) && $(AMTAR) chof - $(HTML_APIDOC_DIR) | GZIP=--best gzip -c) > $@

DOC_APIDOC_HTML = apidocs.html

install-apidocs: $(DOXYGEN_OUTPUT_DIR).stamp
	$(INSTALL) -m 0755 -d $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)
	$(INSTALL) -m 0644 $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_DIR)/* $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)/

uninstall-apidocs:
	rm -f $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)/*
	rmdir $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)

clean-apidocs:
	rm -rf $(DOXYGEN_OUTPUT_DIR)
	rm -f $(DOXYGEN_OUTPUT_DIR).stamp
	rm -f $(HTML_APIDOC_DIR).tar.gz


# if we ever have more targets, move those out...

all-local: $(DOXYGEN_STAMPS)

install-data-local: install-apidocs

uninstall-local: uninstall-apidocs

clean-local: clean-apidocs

doc_EXTRA_DIST = $(HTML_APIDOC_DIR).tar.gz 

doc_DATA = $(DOXYGEN_FILES) README.apidocs

CLEANFILES = $(DOXYGEN_FILES) $(DOXYGEN_STAMPS)

endif


########################################################################
# Common part
########################################################################

EXTRA_DIST = $(doc_EXTRA_DIST) Doxyfile.in README.apidocs $(old_EXTRA_DIST)