summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-12-07 19:51:41 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 19:05:19 +0530
commitdaf5d25083221c065ff8667fc7ee72ffbf9d5d07 (patch)
treef6dbca651846bbce92882146c4d9c585d4797771
parentb9693d3ad11cb6861cfb088223e791f1eb50385b (diff)
downloadgobject-introspection-daf5d25083221c065ff8667fc7ee72ffbf9d5d07.tar.gz
meson: Sort globbed files before printing
This ensures stability in the output, because the underlying implementation uses readdir() and the output will depend on the filesystem. This also works around a bug where g-ir-scanner's source scanner was #include-ing gmarshal.h before any other header which resulted in all marshaling symbols to be skipped from the introspection because of syntax errors.
-rw-r--r--gir/meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/gir/meson.build b/gir/meson.build
index e1d0119f..52838f23 100644
--- a/gir/meson.build
+++ b/gir/meson.build
@@ -62,7 +62,10 @@ endif
globber = '''
from glob import glob
-for f in glob('@0@'):
+# Sort the glob for stable results. Also ensures that gmarshal.h is not
+# #include-ed by scannerparser.y first because it does not include glib.h
+# itself, which leaves several defines unresolved.
+for f in sorted(glob('@0@')):
print(f)
'''