@eli-schwartz commented on this pull request.


In doc/meson.build:

> +    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, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/2761/review/860377769@github.com>