AUTOMAKE_OPTIONS = 1.7

XSLTPROC = xsltproc --xinclude --nonet
XMLS = $(wildcard $(top_srcdir)/introspection/nm-*.xml)

OTHER_FILES= \
	$(top_builddir)/introspection/all.xml \
	$(top_srcdir)/introspection/generic-types.xml \
	$(top_srcdir)/introspection/errors.xml \
	$(top_srcdir)/introspection/vpn-errors.xml \
	$(top_srcdir)/tools/doc-generator.xsl \
	$(top_srcdir)/introspection/generic-types.xml

GENERATED_FILES = spec.html settings-spec.xml

if ENABLE_GTK_DOC

spec.html: $(XMLS) $(OTHER_FILES) html-build.stamp
	$(XSLTPROC) --path "$(top_builddir)/introspection:$(top_srcdir)/introspection" $(top_srcdir)/tools/doc-generator.xsl $(top_builddir)/introspection/all.xml > spec.html
	mkdir -p $(builddir)/html/
	cp spec.html $(builddir)/html/

settings-spec.xml: $(top_builddir)/tools/generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la
	rm -f $(builddir)/settings-spec.xml
	$(top_builddir)/tools/generate-settings-spec book $(builddir)/settings-spec.xml

all: $(GENERATED_FILES)

endif

# Top-level SGML file includes (depends on) settings-spec.xml
$(DOC_MAIN_SGML_FILE): settings-spec.xml

####################################

# The name of the module.
DOC_MODULE=NetworkManager

# The top-level SGML file.
DOC_MAIN_SGML_FILE=network-manager-docs.xml

DOC_SOURCE_DIR=$(srcdir)

# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml

# Extra options to supply to gtkdoc-mktmpl
MKTMPL_OPTIONS=

# Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
content_files = \
	version.xml \
	migrating-to-09.xml \
	$(NULL)

include $(top_srcdir)/gtk-doc.make

####################################

EXTRA_DIST += version.xml.in $(GENERATED_FILES)
CLEANFILES += html/* tmpl/* xml/* \
	NetworkManager-sections.txt \
	NetworkManager-overrides.txt \
	$(GENERATED_FILES)

