diff options
author | Corentin Noël <corentin@elementary.io> | 2019-01-24 15:00:29 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2020-01-10 09:06:26 +0000 |
commit | f144fbc20df1aa21e666ef2256adbbc63ffcf131 (patch) | |
tree | 0acebe2d5fd962166732d4bf52a2a0baf9327e70 /docs | |
parent | 3de80c8eb0dca0b57a5dbdca20e754a7de7c053a (diff) |
Port to the meson build system
With much help from Martin Blanchard <tchaik@gmx.com> too, thanks to all.
https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Makefile.am | 6 | ||||
-rw-r--r-- | docs/api/Makefile.am | 129 | ||||
-rwxr-xr-x | docs/api/clean.sh | 12 | ||||
-rw-r--r-- | docs/api/dbus/Makefile.am | 25 | ||||
-rw-r--r-- | docs/api/dbus/meson.build | 27 | ||||
-rw-r--r-- | docs/api/dbus/spec-to-docbook.sh | 7 | ||||
-rw-r--r-- | docs/api/meson.build | 54 | ||||
-rw-r--r-- | docs/meson.build | 3 |
8 files changed, 91 insertions, 172 deletions
diff --git a/docs/Makefile.am b/docs/Makefile.am deleted file mode 100644 index bab850222..000000000 --- a/docs/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -NULL = - -SUBDIRS = \ - api - --include $(top_srcdir)/git.mk diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am deleted file mode 100644 index 2b81e9753..000000000 --- a/docs/api/Makefile.am +++ /dev/null @@ -1,129 +0,0 @@ -## Process this file with automake to produce Makefile.in - -SUBDIRS = dbus - -NULL = - -# We require automake 1.6 at least. -AUTOMAKE_OPTIONS = 1.6 - -# The name of the module, e.g. 'glib'. -DOC_MODULE=PackageKit - -# The top-level SGML file. -DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml - -# The directory containing the source code. -# gtk-doc will search all .c & .h files beneath here for inline comments -# documenting the functions and macros. -DOC_SOURCE_DIR=$(top_srcdir)/lib/packagekit-glib2 - -# Extra options to pass to gtkdoc-scangobj. Not normally needed. -SCANGOBJ_OPTIONS= - -# Extra options to supply to gtkdoc-scan. -SCAN_OPTIONS= - -# Extra options to supply to gtkdoc-mkdb. -MKDB_OPTIONS=--sgml-mode --output-format=xml - -# Extra options to supply to gtkdoc-mktmpl -MKTMPL_OPTIONS= - -# Extra options to supply to gtkdoc-fixref. Not normally needed. -FIXXREF_OPTIONS= - -# Used for dependencies. The docs will be rebuilt if any of these change. -HFILE_GLOB=$(top_srcdir)/lib/packagekit-glib2/pk-*.h -CFILE_GLOB=$(top_srcdir)/lib/packagekit-glib2/pk-*.c - -# Header files to ignore when scanning. -IGNORE_HFILES = \ - config.h \ - pk-marshal.h \ - pk-common-private.h \ - pk-debug.h \ - pk-offline-private.h \ - pk-spawn-polkit-agent.h \ - $(NULL) - -# Images to copy into HTML directory. -HTML_IMAGES = \ - spec/pk-structure.png \ - spec/pk-structure.svg \ - spec/pk-transactions.svg \ - spec/pk-transactions-set-locale.png \ - spec/pk-transactions-repair-required.png \ - spec/pk-transactions-failure.png \ - spec/pk-transactions-download.png \ - spec/pk-transactions-sig-install.png \ - spec/pk-transactions-success.png \ - spec/pk-transactions-auto-untrusted.png \ - spec/pk-transactions-trusted.png - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). -content_files = \ - version.xml \ - dbus/org.freedesktop.PackageKit.ref.xml \ - dbus/org.freedesktop.PackageKit.Transaction.ref.xml \ - spec/pk-backend-compiled.xml \ - spec/pk-backend-spawn.xml \ - spec/pk-concepts.xml \ - spec/pk-introduction.xml - - -# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded -# These files must be listed here *and* in content_files -expand_content_files= - -# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. -# Only needed if you are using gtkdoc-scangobj to dynamically query widget -# signals and properties. -AM_CPPFLAGS = \ - $(POLKIT_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - -I$(top_builddir)/lib/packagekit-glib2 \ - -I$(top_srcdir)/lib/packagekit-glib2 \ - $(NULL) - -PK_GLIB2_LIBS = \ - $(top_builddir)/lib/packagekit-glib2/libpackagekit-glib2.la \ - $(top_builddir)/lib/packagekit-glib2/libpackagekitprivate.a \ - $(NULL) - -GTKDOC_LIBS = \ - $(GLIB_LIBS) \ - $(DBUS_LIBS) \ - $(SQLITE_LIBS) \ - $(PK_GLIB2_LIBS) \ - $(POLKIT_LIBS) \ - $(NULL) - -# This includes the standard gtk-doc make rules, copied by gtkdocize. -include $(top_srcdir)/gtk-doc.make - -# Other files to distribute -EXTRA_DIST += version.xml.in - -CLEANFILES += \ - *-decl.txt \ - *-decl-list.txt \ - *-overrides.txt \ - *-undeclared.txt \ - *-undocumented.txt \ - *-unused.txt \ - *.types \ - *.args \ - *.hierarchy \ - *.interfaces \ - *.prerequisites \ - *.signals \ - *.stamp \ - tmpl - -DISTCLEANFILES = \ - org.freedesktop.PackageKit.ref.xml \ - org.freedesktop.PackageKit.Transaction.ref.xml - --include $(top_srcdir)/git.mk diff --git a/docs/api/clean.sh b/docs/api/clean.sh deleted file mode 100755 index 0f79e1c37..000000000 --- a/docs/api/clean.sh +++ /dev/null @@ -1,12 +0,0 @@ -rm -f *-decl.txt -rm -f *-decl-list.txt -rm -f *-overrides.txt -rm -f *-undeclared.txt -rm -f *-undocumented.txt -rm -f *-unused.txt -rm -f PackageKit-scan.* -rm -f PackageKit.types -rm -f html/*.html -rm -f html/*.png -rm -f tmpl/* - diff --git a/docs/api/dbus/Makefile.am b/docs/api/dbus/Makefile.am deleted file mode 100644 index 36e4b5634..000000000 --- a/docs/api/dbus/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ - -if ENABLE_GTK_DOC - -all : org.freedesktop.PackageKit.ref.xml org.freedesktop.PackageKit.Transaction.ref.xml - -org.freedesktop.PackageKit.ref.xml : $(top_srcdir)/src/org.freedesktop.PackageKit.xml $(top_srcdir)/docs/api/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)/docs/api/dbus/spec-to-docbook.xsl $< | tail -n +2 >> $@ - -org.freedesktop.PackageKit.Transaction.ref.xml : $(top_srcdir)/src/org.freedesktop.PackageKit.Transaction.xml $(top_srcdir)/docs/api/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)/docs/api/dbus/spec-to-docbook.xsl $< | tail -n +2 >> $@ - -endif - -EXTRA_DIST = spec-to-docbook.xsl dbus-introspect-docs.dtd - -CLEANFILES = \ - org.freedesktop.PackageKit.Transaction.ref.xml \ - org.freedesktop.PackageKit.ref.xml - -clean-local : - rm -f *~ *.ref.xml - --include $(top_srcdir)/git.mk diff --git a/docs/api/dbus/meson.build b/docs/api/dbus/meson.build new file mode 100644 index 000000000..842389bd3 --- /dev/null +++ b/docs/api/dbus/meson.build @@ -0,0 +1,27 @@ +spec_to_docbook = find_program('spec-to-docbook.sh') + +packagekit_ref_xml = custom_target( + 'org.freedesktop.PackageKit.ref.xml', + input: join_paths(meson.source_root(), 'src', 'org.freedesktop.PackageKit.xml'), + output: 'org.freedesktop.PackageKit.ref.xml', + build_by_default: true, + command: [ + spec_to_docbook, + files('spec-to-docbook.xsl'), + '@INPUT@', + '@OUTPUT@', + ], +) + +packagekit_transaction_ref_xml = custom_target( + 'org.freedesktop.PackageKit.Transaction.ref.xml', + input: join_paths(meson.source_root(), 'src', 'org.freedesktop.PackageKit.Transaction.xml'), + output: 'org.freedesktop.PackageKit.Transaction.ref.xml', + build_by_default: true, + command: [ + spec_to_docbook, + files('spec-to-docbook.xsl'), + '@INPUT@', + '@OUTPUT@', + ], +) diff --git a/docs/api/dbus/spec-to-docbook.sh b/docs/api/dbus/spec-to-docbook.sh new file mode 100644 index 000000000..c5d7f82c4 --- /dev/null +++ b/docs/api/dbus/spec-to-docbook.sh @@ -0,0 +1,7 @@ +#!/bin/sh +spec_to_docbook_xsl="$1" +input_file="$2" +output_file="$3" + +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\">" > ${output_file} +xsltproc ${spec_to_docbook_xsl} ${input_file} | tail -n +2 >> ${output_file} diff --git a/docs/api/meson.build b/docs/api/meson.build new file mode 100644 index 000000000..c46940a63 --- /dev/null +++ b/docs/api/meson.build @@ -0,0 +1,54 @@ +subdir('dbus') + +version_xml_config_data = configuration_data() +version_xml_config_data.set('VERSION', meson.project_version()) +version_xml = configure_file( + input: 'version.xml.in', + output: 'version.xml', + configuration: version_xml_config_data, +) + +gnome.gtkdoc( + 'PackageKit', + main_sgml: 'PackageKit-docs.sgml', + src_dir: packagekit_glib2_src_include, + include_directories: packagekit_glib2_includes, + ignore_headers: [ + 'config.h', + 'pk-marshal.h', + 'pk-common-private.h', + 'pk-debug.h', + 'pk-offline-private.h', + 'pk-spawn-polkit-agent.h', + ], + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gio_unix_dep, + config_dep, + ], + html_assets: [ + 'spec/pk-structure.png', + 'spec/pk-structure.svg', + 'spec/pk-transactions.svg', + 'spec/pk-transactions-set-locale.png', + 'spec/pk-transactions-repair-required.png', + 'spec/pk-transactions-failure.png', + 'spec/pk-transactions-download.png', + 'spec/pk-transactions-sig-install.png', + 'spec/pk-transactions-success.png', + 'spec/pk-transactions-auto-untrusted.png', + 'spec/pk-transactions-trusted.png', + ], + content_files: [ + version_xml, + 'spec/pk-backend-compiled.xml', + 'spec/pk-backend-spawn.xml', + 'spec/pk-concepts.xml', + 'spec/pk-introduction.xml', + packagekit_ref_xml, + packagekit_transaction_ref_xml, + ], + install: true, +) diff --git a/docs/meson.build b/docs/meson.build new file mode 100644 index 000000000..1a1d9bfe1 --- /dev/null +++ b/docs/meson.build @@ -0,0 +1,3 @@ +if get_option('gtk_doc') + subdir('api') +endif |