summary refs log tree commit diff
path: root/docs/api/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api/Makefile.am')
-rw-r--r--docs/api/Makefile.am36
1 files changed, 25 insertions, 11 deletions
diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am
index 3ca46033..5283f73f 100644
--- a/docs/api/Makefile.am
+++ b/docs/api/Makefile.am
@@ -11,7 +11,19 @@ OTHER_FILES= \
 	$(top_srcdir)/tools/doc-generator.xsl \
 	$(top_srcdir)/introspection/generic-types.xml
 
-GENERATED_FILES = spec.html settings-spec.xml
+GENERATED_FILES = spec.html
+
+if SETTING_DOCS_AVAILABLE
+
+settings-spec.xml: settings-spec.xsl $(top_builddir)/libnm/nm-setting-docs.xml
+	$(AM_V_GEN) xsltproc --output $@ $^
+
+# Top-level SGML file includes (depends on) settings-spec.xml
+$(DOC_MAIN_SGML_FILE): settings-spec.xml
+
+GENERATED_FILES += settings-spec.xml
+
+endif
 
 if ENABLE_GTK_DOC
 
@@ -20,17 +32,10 @@ spec.html: $(XMLS) $(OTHER_FILES) html-build.stamp
 	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.
@@ -47,6 +52,9 @@ MKDB_OPTIONS=--sgml-mode --output-format=xml
 # Extra options to supply to gtkdoc-mktmpl
 MKTMPL_OPTIONS=
 
+# Extra options to supply to gtkdoc-mkhtml
+MKHTML_OPTIONS=--path="$(abs_srcdir)"
+
 # Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
 content_files = \
 	version.xml \
@@ -57,9 +65,15 @@ include $(top_srcdir)/gtk-doc.make
 
 ####################################
 
-EXTRA_DIST += version.xml.in $(GENERATED_FILES)
+EXTRA_DIST += version.xml.in settings-spec.xsl $(GENERATED_FILES)
 CLEANFILES += html/* tmpl/* xml/* \
 	NetworkManager-sections.txt \
-	NetworkManager-overrides.txt \
-	$(GENERATED_FILES)
+	NetworkManager-overrides.txt
 
+if BUILD_SETTING_DOCS
+CLEANFILES += settings-spec.xml
+endif
+
+if ENABLE_GTK_DOC
+CLEANFILES += spec.html
+endif