summaryrefslogtreecommitdiff
path: root/doc/reference/librygel-core/Makefile.am
blob: b93f363ef40a7e35dc183e2d8a38451f924804e0 (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
if ENABLE_VALADOC

include $(top_srcdir)/common.am
include $(top_srcdir)/src/librygel-core/filelist.am

# Note that LIBRYGEL_CORE_NONVAPI_SOURCE_FILES all (should) use the internal keyword
# so they are not shown as part of the public API.
VALA_SOURCE_FILES = $(LIBRYGEL_CORE_VAPI_SOURCE_FILES) \
		$(LIBRYGEL_CORE_NONVAPI_SOURCE_FILES)

VALA_SOURCE_FILES_WITH_PATHS = $(addprefix $(top_srcdir)/src/librygel-core/, $(VALA_SOURCE_FILES))

VALADOC_FLAGS = --force \
	--vapidir $(top_srcdir)/src/librygel-core \
	$(RYGEL_COMMON_VALAFLAGS_PKG) \
	$(LIBRYGEL_CORE_VALAFLAGS_PKG) \
	--pkg gio-2.0 \
	--target-glib=2.32 \
	--vapidir=$(rygeldir) \
	--pkg rygel-build-config \
	-b $(top_srcdir)/src/librygel-core \
	--package-name librygel-core \
	--package-version 2.0 \
	$(VALA_SOURCE_FILES_WITH_PATHS)

valadoc: $(VALA_SOURCE_FILES_WITH_PATHS)
	$(AM_V_GEN)$(VALADOC) \
		-o valadoc \
		$(VALADOC_FLAGS)

gtkdoc: $(VALA_SOURCE_FILES_WITH_PATHS)
	@rm -rf gtkdoc
	$(AM_V_GEN)$(VALADOC) \
		-X $(top_srcdir)/src/librygel-core/rygel-core.h \
		-X -l -X $(top_builddir)/src/librygel-core/.libs/librygel-core-2.0.so \
		-o gtkdoc \
		--doclet gtkdoc \
		$(VALADOC_FLAGS)

clean-local:
	rm -rf valadoc gtkdoc

uninstall-hook:
	rm -rf $(DESTDIR)$(datadir)/gtk-doc/html/librygel-core

# The chmod corrects the directory permissions so that distcheck can remove the installed files.
install-data-hook: gtkdoc
	$(MKDIR_P) $(DESTDIR)$(datadir)/gtk-doc/html/librygel-core
	cp -d -R $(srcdir)/gtkdoc/html $(DESTDIR)$(datadir)/gtk-doc/html/librygel-core
	chmod -R u+w $(DESTDIR)$(datadir)/gtk-doc/html/librygel-core

all: valadoc gtkdoc

EXTRA_DIST = gtkdoc valadoc

endif