From 1b24d4db47203201bf38badd14eaa6ac95b180ca Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 7 Nov 2022 19:52:21 +0100 Subject: [PATCH] docs/api: fix ugly things in Makefile Turns out automake doesn't like either that we add dependencies to a target conditionally. Not sure why, but it's a tasteless thing to do nevertheless: gtk-doc.make:174: warning: $(DOC_MAIN_SGML_FILE) was already defined in condition BUILD_DOCS, which is included in condition TRUE ... docs/api/Makefile.am:112: 'gtk-doc.make' included from here docs/api/Makefile.am:14: ... '$(DOC_MAIN_SGML_FILE)' previously defined here In any case, the dependency is wrong in the first place -- the source document doesn't depend on other source. The target (which is a stamp file, since the xslt processor produces multiple files) does! Moreover, there's a dependency of the stamp file on $(content_files) already, so including GENERATED_FILES (like we already do) in content_files should be sufficient. While at that, deal with other not-so-nice things; don't extend "all" target needlessly and don't define a target conditionally. (cherry picked from commit 4c49d67cc8122e545e6835a93bd1c89103ef54b3) --- docs/api/Makefile.am | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am index c89dbc4494..359e91fd8f 100644 --- a/docs/api/Makefile.am +++ b/docs/api/Makefile.am @@ -2,25 +2,12 @@ AUTOMAKE_OPTIONS = 1.7 XSLTPROC = xsltproc --xinclude --nonet XMLS = $(wildcard $(top_srcdir)/introspection/nm-*.xml) - GENERATED_FILES = if BUILD_DOCS - -settings-spec.xml: settings-spec.xsl $(top_builddir)/man/nm-settings-docs-dbus.xml - $(AM_V_GEN) (! test -f $@ || chmod u+w $@) && xsltproc --output $@ $^ - -# Top-level SGML file includes (depends on) settings-spec.xml -$(DOC_MAIN_SGML_FILE): settings-spec.xml - GENERATED_FILES += settings-spec.xml - -all: $(GENERATED_FILES) - endif -#################################### - # The name of the module. DOC_MODULE=NetworkManager @@ -130,7 +117,8 @@ setup-build.stamp: fi $(AM_V_at)touch setup-build.stamp -#################################### +settings-spec.xml: settings-spec.xsl $(top_builddir)/man/nm-settings-docs-dbus.xml + $(AM_V_GEN) (! test -f $@ || chmod u+w $@) && xsltproc --output $@ $^ EXTRA_DIST += \ version.xml.in \