summaryrefslogtreecommitdiff
path: root/docs/Makefile.am
blob: 5dc9de2f9de4daef0b026bb865ab24cd0e1b8c04 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
distclean_dirs = \
	caribou \
	gtk-doc \
	$(NULL)

docs = \
	caribou-doc \
	caribou-gtk-doc \
	$(NULL)

upload_docs = \
	upload-docs-c-caribou \
	upload-docs-vala-caribou \
	$(NULL)

cariboudocdir=$(datadir)/devhelp/references/caribou
caribouimgdir=$(datadir)/devhelp/references/caribou/img

caribougtkdocdir=$(datadir)/gtk-doc/html/caribou

common_doc_files = \
	*.css \
	*.png \
	*.js \
	index.htm \
	*.html \
	$(NULL)

cariboudoc_DATA = \
	caribou/caribou/caribou.devhelp2 \
	$(addprefix caribou/caribou/,$(common_doc_files)) \
	$(NULL)

caribougtkdoc_DATA = gtk-doc/caribou/html/*

caribouimg_DATA = \
	$(NULL)

$(cariboudoc_DATA) $(caribouimg_DATA): caribou-doc.stamp
$(caribougtkdoc_DATA): caribou-gtk-doc.stamp

valadoc_flags = \
	--force \
	--package-version $(PACKAGE_VERSION) \
	--no-protected \
	$(NULL)

# caribou documentation
caribou_doc_files_blacklist = \
	$(NULL)
# this expands the list of files, so we can filter out elements
caribou_doc_files_all = \
	$(wildcard $(top_srcdir)/libcaribou/*.vala) \
	$(NULL)
# FIXME: sort the files manually to work around the native doclet portion of
# bgo#662784
caribou_doc_files = \
	$(sort \
	$(filter-out $(caribou_doc_files_blacklist),$(caribou_doc_files_all)))
caribou_doc_deps = \
	x11 \
	xtst \
	gdk-3.0 \
	gio-2.0 \
	gee-1.0 \
	libxklavier \
	external-libs \
	gdk-x11-3.0 \
	libxml-2.0 \
	$(NULL)
valadoc_flags_caribou = \
	$(valadoc_flags) \
	-X $(top_srcdir)/libcaribou/caribou.h \
	$(addprefix --pkg=,$(caribou_doc_deps)) \
	--vapidir=$(top_srcdir)/libcaribou \
	$(caribou_doc_files) \
	$(NULL)

caribou-doc.stamp: $(caribou_doc_files)
	$(AM_V_GEN)$(VALADOC) \
		-o caribou/ \
		--doclet=devhelp \
		$(valadoc_flags_caribou) \
		$(NULL)
	@touch $@

caribou-gtk-doc.stamp: $(caribou_doc_files)
	$(AM_V_GEN)$(VALADOC) \
		-X -l -X $(top_builddir)/libcaribou/.libs/libcaribou.so \
		-o gtk-doc/caribou \
		--doclet=gtkdoc \
		$(valadoc_flags_caribou) \
		$(NULL)
	@touch $@

stamps = $(addsuffix .stamp, $(docs))

all: $(stamps)

CLEANFILES = $(stamps)

distclean-local: distclean-docs
distclean-docs:
	rm -rf $(distclean_dirs)

-include $(top_srcdir)/git.mk