summaryrefslogtreecommitdiff
path: root/test cases/frameworks/10 gtk-doc/doc
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-05-11 09:18:47 -0400
committerXavier Claessens <xclaesse@gmail.com>2021-05-12 15:54:37 -0400
commit4e312c19e693a69b0650ce6c8a8903163c959996 (patch)
tree6f0eee6b0281536078d9b105a4985f504c9b930b /test cases/frameworks/10 gtk-doc/doc
parent44acefd8365c0ccca428e5ef69153c059aa8e575 (diff)
downloadmeson-4e312c19e693a69b0650ce6c8a8903163c959996.tar.gz
gnome: Fix gtkdoc generation
install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was relying on that behaviour, but it has always been broken in the case the source or build directory contains spaces. Fix this by changing get_include_args() to substitue paths directly which will then get escaped correctly. Add a unit test that builds GObject documentation which is where this issue has been spotted. Fixes: #8744
Diffstat (limited to 'test cases/frameworks/10 gtk-doc/doc')
-rw-r--r--test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml2
-rw-r--r--test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt16
-rw-r--r--test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types4
-rw-r--r--test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build6
4 files changed, 26 insertions, 2 deletions
diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
index 95f73efdf..6ccd087dc 100644
--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
@@ -35,7 +35,7 @@
</partintro>
<xi:include href="xml/foo.xml"/>
<xi:include href="../../include/bar.xml"/>
- <xi:include href="xml/foo-version.xml"/>
+ <xi:include href="xml/version.xml"/>
</reference>
</book>
diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
new file mode 100644
index 000000000..d14c8dab0
--- /dev/null
+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
@@ -0,0 +1,16 @@
+<SECTION>
+<FILE>foo</FILE>
+<TITLE>FooObj</TITLE>
+FooObj
+FooObjClass
+foo_do_something
+</SECTION>
+
+<SECTION>
+<FILE>version</FILE>
+<TITLE>version</TITLE>
+FOO_MAJOR_VERSION
+FOO_MINOR_VERSION
+FOO_MICRO_VERSION
+</SECTION>
+
diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
new file mode 100644
index 000000000..0a9c046f3
--- /dev/null
+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
@@ -0,0 +1,4 @@
+% This include is useless it's a regression test for https://github.com/mesonbuild/meson/issues/8744
+#include <foo.h>
+
+foo_obj_get_type
diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
index 149c6e956..f4b3724db 100644
--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
@@ -1,5 +1,9 @@
gnome.gtkdoc('foobar',
- src_dir : inc,
+ src_dir : [inc, '.'],
main_sgml : 'foobar-docs.sgml',
content_files : [docbook, version_xml],
+ dependencies: foo_dep,
+ # Manually written types file for regression test:
+ # https://github.com/mesonbuild/meson/issues/8744
+ gobject_typesfile: 'foobar.types',
install : true)