upower/doc/Makefile.am
Bastien Nocera 8913f60347 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.
2018-10-25 13:12:35 +02:00

117 lines
3.7 KiB
Makefile

SUBDIRS = man
NULL =
AUTOMAKE_OPTIONS = 1.7
# The name of the module.
DOC_MODULE=UPower
# The top-level SGML file.
DOC_MAIN_SGML_FILE=upower-docs.xml
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS=--ignore-headers=config.h --rebuild-types --rebuild-sections
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR=../libupower-glib
# Used for dependencies
HFILE_GLOB=
#$(top_srcdir)/policy/*.h
CFILE_GLOB=
#$(top_srcdir)/policy/*.c
# Headers to ignore
IGNORE_HFILES= \
config.h \
$(NULL)
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
-I$(top_srcdir)/libupower-glib \
-I$(top_builddir)/libupower-glib \
$(NULL)
UPOWER_GLIB_LIBS = \
$(top_builddir)/libupower-glib/libupower-glib.la \
$(NULL)
GTKDOC_LIBS = \
$(UPOWER_GLIB_LIBS) \
$(NULL)
# Extra options to supply to gtkdoc-mkdb
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 \
$(BUILT_SOURCES) \
$(NULL)
# Images to copy into HTML directory
HTML_IMAGES = \
$(NULL)
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=
MAINTAINERCLEANFILES = \
*~ \
Makefile.in \
UPower.types \
UPower-*.txt
DISTCLEANFILES = \
org.freedesktop.UPower.Device.ref.xml \
org.freedesktop.UPower.KbdBacklight.ref.xml \
org.freedesktop.UPower.ref.xml \
upowerd.xml \
upower.xml \
UPower.xml
if ENABLE_GTK_DOC
include $(top_srcdir)/gtk-doc.make
endif
# Version information for marking the documentation
EXTRA_DIST += version.xml.in
-include $(top_srcdir)/git.mk