GNOME Bugzilla – Bug 778971
g-ir-scanner splits CFLAGS/CPPFLAGS/LDFLAGS incorrectly
Last modified: 2017-03-21 09:10:34 UTC
Created attachment 346279 [details] [review] Use shlex.split() for env variable splitting str.split() does not handle quoting, so if you have spaces in your CFLAGS, it will be split incorrectly. For instance: CFLAGS="'-I/opt/some dir' -DFOO=bar" >>> os.environ['CFLAGS'].split() ["'-I/opt/some", "dir'", '-DFOO=bar'] >>> shlex.split(os.environ['CFLAGS']) ['-I/opt/some dir', '-DFOO=bar'] The attached patch fixes this.
Review of attachment 346279 [details] [review]: Thanks; it's indeed correct.