[Github-comments] [geany/geany] WIP: Meson build system (#2761)

Eli Schwartz notifications at xxxxx
Sun Jan 23 22:06:57 UTC 2022


@eli-schwartz commented on this pull request.



> +    custom_target('doxygen.stamp',
+                  input: dox,
+                  output: ['doxygen.stamp'],
+                  command: [doxygen, '@INPUT@', '&&', 'touch', '@OUTPUT@'],
+                  depends: libgeany,
+                  build_by_default: true)
+    doxy_xml = custom_target('doxygen-gi.stamp',
+                             input: doxgi,
+                             output: ['doxygen-gi.stamp'],
+                             command: [doxygen, '@INPUT@', '&&', 'touch', '@OUTPUT@'],
+                             depends: libgeany,
+                             build_by_default: true)
+    custom_target('gtkdoc headers',
+                  input : [doxy_xml],
+                  output: ['geany-gtkdoc.h', 'geany-sciwrappers-gtkdoc.h'],
+                  command: [python, '../scripts/gen-api-gtkdoc.py', join_paths(meson.current_build_dir(), 'xml'), '-d', '.', '-o', '@OUTPUT0@', '--sci-output', '@OUTPUT1@'],

When you run `cd builddir/ && ninja`, ninja is being run from the build directory.

And then a ninja rule contains the literal string `../scripts/gen-api-gtkdoc.py`, as you wrote.

find_program() will indeed make it relative to the doc/ folder where this meson.build is located, because find_program converts strings (passed as argv1 to the python executable) into found programs. Thus, the current working directory of the ***python*** program is the build directory.

`install_data()` accepts a str object and interprets it as a file path, hence install_data() converts strings into found resources and makes them relative to meson.build.

So does any other meson function where the context of the function specifies that the string argument should be interpreted as files/directories.

Again, this is not the case for `command`, which specifies that the first element `python` of the command is a file (program) and the remaining elements of the command such as `'../scripts/gen-api-gtkdoc.py'` are unknown and unknowable strings passed without modification.

Those unknown and unknowable strings, `'../'` included, are then interpreted by the python program, which happens to assume they represent a filepath.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2761#discussion_r790337180
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/2761/review/860377769 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220123/6810a7d8/attachment-0001.htm>


More information about the Github-comments mailing list