doc: Fix dist not working

automake's documentation says that it works depth-first, but it doesn't
actually go depth first when dist'ing a directory. So our .ref.xml files
aren't generated when we try to get them added to the dist.

Fix this with a big hammer by moving the generation to the current
directory, rather than spending any more time working with automake.
Can't wait for the meson port.
This commit is contained in:
Bastien Nocera 2018-10-25 13:02:22 +02:00
parent 7c17075ac0
commit 8913f60347
7 changed files with 33 additions and 38 deletions

View file

@ -52,7 +52,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = upower-glib.pc
# xsltproc barfs on 'make distcheck'; disable for now
DISTCHECK_CONFIGURE_FLAGS=--disable-man-pages --enable-gtk-doc \
DISTCHECK_CONFIGURE_FLAGS=--enable-man-pages --enable-gtk-doc \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
--with-udevrulesdir='$${libdir}/udev/rules.d-distcheck'

View file

@ -253,7 +253,6 @@ tools/Makefile
doc/Makefile
doc/version.xml
doc/man/Makefile
doc/dbus/Makefile
rules/Makefile
libupower-glib/Makefile
libupower-glib/up-version.h

View file

@ -1,5 +1,5 @@
SUBDIRS = man dbus
SUBDIRS = man
NULL =
@ -50,15 +50,40 @@ MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra options to supply to gtkdoc-mktmpl
MKTMPL_OPTIONS=
org.freedesktop.UPower.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.xml $(top_srcdir)/doc/spec-to-docbook.xsl
if $(AM_V_P); then set -x; else echo " GEN $@"; fi
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/spec-to-docbook.xsl $< | tail -n +2 >> $@
org.freedesktop.UPower.Device.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.Device.xml $(top_srcdir)/doc/spec-to-docbook.xsl
if $(AM_V_P); then set -x; else echo " GEN $@"; fi
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/spec-to-docbook.xsl $< | tail -n +2 >> $@
org.freedesktop.UPower.KbdBacklight.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.KbdBacklight.xml $(top_srcdir)/doc/spec-to-docbook.xsl
if $(AM_V_P); then set -x; else echo " GEN $@"; fi
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/spec-to-docbook.xsl $< | tail -n +2 >> $@
org.freedesktop.UPower.Wakeups.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.Wakeups.xml $(top_srcdir)/doc/spec-to-docbook.xsl
if $(AM_V_P); then set -x; else echo " GEN $@"; fi
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/spec-to-docbook.xsl $< | tail -n +2 >> $@
EXTRA_DIST = spec-to-docbook.xsl dbus-introspect-docs.dtd
BUILT_SOURCES = \
org.freedesktop.UPower.ref.xml \
org.freedesktop.UPower.Device.ref.xml \
org.freedesktop.UPower.KbdBacklight.ref.xml
# Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
content_files = \
version.xml \
man/upower.xml \
man/upowerd.xml \
man/UPower.xml \
dbus/org.freedesktop.UPower.ref.xml \
dbus/org.freedesktop.UPower.Device.ref.xml \
dbus/org.freedesktop.UPower.KbdBacklight.ref.xml \
$(BUILT_SOURCES) \
$(NULL)
# Images to copy into HTML directory
@ -84,8 +109,6 @@ DISTCLEANFILES = \
if ENABLE_GTK_DOC
include $(top_srcdir)/gtk-doc.make
else
EXTRA_DIST =
endif
# Version information for marking the documentation

View file

@ -1,27 +0,0 @@
all : org.freedesktop.UPower.ref.xml org.freedesktop.UPower.Device.ref.xml org.freedesktop.UPower.KbdBacklight.ref.xml org.freedesktop.UPower.Wakeups.ref.xml
org.freedesktop.UPower.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.xml $(top_srcdir)/doc/dbus/spec-to-docbook.xsl
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 >> $@
org.freedesktop.UPower.Device.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.Device.xml $(top_srcdir)/doc/dbus/spec-to-docbook.xsl
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 >> $@
org.freedesktop.UPower.KbdBacklight.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.KbdBacklight.xml $(top_srcdir)/doc/dbus/spec-to-docbook.xsl
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 >> $@
org.freedesktop.UPower.Wakeups.ref.xml : $(top_srcdir)/dbus/org.freedesktop.UPower.Wakeups.xml $(top_srcdir)/doc/dbus/spec-to-docbook.xsl
echo "<?xml version=\"1.0\"?>""<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\">" > $@
$(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 >> $@
EXTRA_DIST = spec-to-docbook.xsl dbus-introspect-docs.dtd
MAINTAINERCLEANFILES = *.ref.xml
clean-local :
rm -f *~ *.ref.xml
-include $(top_srcdir)/git.mk

View file

@ -64,9 +64,9 @@
UPower daemon.
</para>
</partintro>
<xi:include href="dbus/org.freedesktop.UPower.ref.xml"/>
<xi:include href="dbus/org.freedesktop.UPower.Device.ref.xml"/>
<xi:include href="dbus/org.freedesktop.UPower.KbdBacklight.ref.xml"/>
<xi:include href="org.freedesktop.UPower.ref.xml"/>
<xi:include href="org.freedesktop.UPower.Device.ref.xml"/>
<xi:include href="org.freedesktop.UPower.KbdBacklight.ref.xml"/>
</reference>
<reference id="libupower-glib">