Makefile.am revision afd1d9c54fd02de632716d177c7369d104022813
1## Process this file with automake to produce Makefile.in
2
3# The name of the module.
4DOC_MODULE=glib
5
6# The top-level SGML file.
7DOC_MAIN_SGML_FILE=glib-docs.sgml
8
9# The directory containing the source code
10DOC_SOURCE_DIR=../../..
11
12# Extra options to supply to gtkdoc-fixref
13FIXXREF_OPTIONS=
14
15# Headers to ignore
16IGNORE_HFILES=			\
17	gobject 		\
18	config.h 		\
19	gmoduleconf.h		\
20	gunidecomp.h		\
21	gunichartables.h	\
22	glibconfig-sysdefs.h
23
24tmpl_sources =				\
25	tmpl/allocators.sgml		\
26	tmpl/arrays.sgml		\
27	tmpl/arrays_byte.sgml		\
28	tmpl/arrays_pointer.sgml	\
29	tmpl/async_queues.sgml		\
30	tmpl/byte_order.sgml		\
31	tmpl/caches.sgml		\
32	tmpl/completion.sgml		\
33	tmpl/datalist.sgml		\
34	tmpl/datasets.sgml		\
35	tmpl/date.sgml			\
36	tmpl/error_reporting.sgml	\
37	tmpl/glib-unused.sgml		\
38	tmpl/hash_tables.sgml		\
39	tmpl/hooks.sgml			\
40	tmpl/iochannels.sgml		\
41	tmpl/limits.sgml		\
42	tmpl/linked_lists_double.sgml	\
43	tmpl/linked_lists_single.sgml	\
44	tmpl/macros.sgml		\
45	tmpl/macros_misc.sgml		\
46	tmpl/main.sgml			\
47	tmpl/memory.sgml		\
48	tmpl/memory_chunks.sgml		\
49	tmpl/messages.sgml		\
50	tmpl/misc_utils.sgml		\
51	tmpl/modules.sgml		\
52	tmpl/numerical.sgml		\
53	tmpl/quarks.sgml		\
54	tmpl/queue.sgml			\
55	tmpl/random_numbers.sgml	\
56	tmpl/relations.sgml		\
57	tmpl/scanner.sgml		\
58	tmpl/string_chunks.sgml		\
59	tmpl/string_utils.sgml		\
60	tmpl/strings.sgml		\
61	tmpl/thread_pools.sgml		\
62	tmpl/threads.sgml		\
63	tmpl/timers.sgml		\
64	tmpl/trash_stack.sgml		\
65	tmpl/trees-binary.sgml		\
66	tmpl/trees-nary.sgml		\
67	tmpl/type_conversion.sgml	\
68	tmpl/types.sgml			\
69	tmpl/unicode.sgml		\
70	tmpl/warnings.sgml		\
71	tmpl/windows.sgml
72
73
74####################################
75# Everything below here is generic #
76####################################
77
78TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
79
80EXTRA_DIST = 				\
81	$(DOC_MAIN_SGML_FILE)		\
82	$(DOC_MODULE)-sections.txt	\
83	$(DOC_MODULE)-overrides.txt
84
85if ENABLE_GTK_DOC
86all-local: html/index.html
87
88$(DOC_MODULE)-decl.txt: 
89	$(MAKE) scan
90
91$(tmpl_sources): $(DOC_MODULE)-decl.txt $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
92	$(MAKE) templates
93
94sgml/$(DOC_MODULE)-doc.bottom: $(tmpl_sources) $(DOC_MODULE)-decl.txt
95	$(MAKE) sgml
96
97html/index.html: sgml/$(DOC_MODULE)-doc.bottom $(DOC_MAIN_SGML_FILE)
98	$(MAKE) html
99endif
100
101scan:
102	-(cd $(srcdir) \
103	&& gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" )
104
105templates: 
106	cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
107
108sgml:
109	cd $(srcdir) \
110	&& gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
111
112html:
113	test -d $(srcdir)/html || mkdir $(srcdir)/html
114	-cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
115	@echo '-- Fixing Crossreferences' 
116	gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIOJNS)
117
118clean-local:
119	rm -f *~ *.bak *.signals *-unused.txt
120
121maintainer-clean-local: clean
122	cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
123
124install-data-local:
125	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
126	(installfiles=`echo $(srcdir)/html/*.html`; \
127	if test "$$installfiles" = '$(srcdir)/html/*.html'; \
128	then echo '-- Nothing to install' ; \
129	else \
130	  for i in $$installfiles; do \
131	    echo '-- Installing '$$i ; \
132	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
133	  done; \
134	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
135	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
136	fi)
137
138#
139# Require gtk-doc when making dist
140#
141if ENABLE_GTK_DOC
142dist-check-gtkdoc:
143else
144dist-check-gtkdoc:
145	@echo "*** gtk-doc must be installed and enabled in order to make dist
146	@false
147endif
148
149dist-hook: dist-check-gtkdoc
150	mkdir $(distdir)/html
151	mkdir $(distdir)/sgml
152	mkdir $(distdir)/tmpl
153	-cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
154	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
155	-cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
156	-cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml
157
158.PHONY : html sgml templates scan
159