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

Eli Schwartz notifications at xxxxx
Sun Feb 6 04:15:04 UTC 2022


@eli-schwartz commented on this pull request.



> @@ -20,6 +20,8 @@ Makefile.in
 /ABOUT-NLS
 /aclocal.m4
 /autom4te.cache
+/build/
+/build-*/

Incidentally this is NOT necessary, because a builddir can be named anything (and you don't even match the recommended one which is `builddir/`.

Meanwhile Meson itself always knows which directory you create as a builddir, so it just creates the file `builddir/.gitignore` with the contents `*` for you. :)

> +# actually constant, just match autconf
+pcconf.set('exec_prefix', '${prefix}')
+pcconf.set('datadir', '${datarootdir}')
+pcconf.set('localedir', join_paths('${datarootdir}', 'locale'))
+
+# needed programs
+sh = find_program('sh')
+cp = find_program('cp')
+ln = find_program('ln')
+python = find_program('python3')
+# These two are truly optional
+rst2html = find_program('rst2html', required: false)
+rst2pdf = find_program('rst2pdf', required: false)
+git = find_program('git', required: false)
+if git.found()
+	ret = run_command(git, 'rev-parse', '--short', '--revs-only', 'HEAD', check: false)

I think you probably don't want this to be `check: false` because in the bizarro case that git errors out here you don't want this to be set to an empty string, though you might indeed want to check that the filesystem entry `.git` exists rather than assuming the current directory is a git checkout simply because git is installed.

The empty string is not the same as your current fallback of `-1`.

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

Message ID: <geany/geany/pull/2761/review/873988712 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220205/268b27d1/attachment-0001.htm>


More information about the Github-comments mailing list