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

Eli Schwartz notifications at xxxxx
Sun Jan 23 14:02:53 UTC 2022


@eli-schwartz requested changes 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@'],

This is utterly wrong, then. :p

Please use `command: [find_program('scripts/gen-api-gtkdoc.py'), ......]` since find_program will make the script path be actually correct, and also for the record it handles scripts with shebangs for you for windows/Linux portability.

> @@ -0,0 +1,128 @@
+configure_file(input: 'geany.1.in',
+               output: 'geany.1',
+               install: true,
+               install_dir: join_paths(join_paths(prefix, get_option('mandir'), 'man1')),
+               configuration: cdata)
+
+if rst2pdf.found()
+    custom_target('pdf-manual',
+                   input: ['geany.txt'],
+                   output: ['geany- at 0@.pdf'.format(cdata.get('VERSION'))],
+                   command: [rst2pdf, '@INPUT@', '-o', '@OUTPUT@'],
+                   build_by_default: true)
+endif
+
+tarball = run_command('test', '-f', 'geany.html')

Please specify `check: false`, because meson recently starts warning that the default is, unexpectedly, false and may change in future versions of meson.

Better yet, if your minimum version of meson allows it, use the `fs` module to check whether files exist without running external processes. :)

> +    dep_doxygen = declare_dependency(sources: ['plugins.dox',
+                                               'pluginsignals.c',
+                                               'pluginsymbols.c',
+                                               'stash-example.c',
+                                               'stash-gui-example.c'])
+
+    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@'],

Meson's command kwarg does not accept shell commands, only execve() commands. If you need the former, use `['sh', '-c', '...']` or a python script.

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

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


More information about the Github-comments mailing list