@eli-schwartz commented on this pull request.


In .gitignore:

> @@ -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. :)


In meson.build:

> +# 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, 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/873988712@github.com>