[Qbs] lexyacc: flex on windows doesn't work with spaces between arguments keys and values

Алексей Скородумов 2350266 at gmail.com
Tue Feb 7 11:33:41 CET 2017


Flex on windows (version 2.5.4a, from GnuWin32 project
<http://gnuwin32.sourceforge.net/packages/flex.htm>) doesn't accept
arguments with spaces. For example:

 C:\GnuWin32\bin\flex.exe -P scanner -o
C:\GnuWin32\bin\flex.exe: can't open scanner

The same command works fine if there are no spaces between arguments keys
and values.

I fixed this by changing lexyacc.qbs (line 28):

if (product.moduleProperty("lex_yacc", "uniqueSymbolPrefix"))
    args.push("-P", input.baseName, "-o", output.filePath);

if (product.moduleProperty("lex_yacc", "uniqueSymbolPrefix"))
    args.push("-P" + input.baseName, "-o" + output.filePath);

This works for flex 2.5.4a on Windows and for lex 2.6.0 on Linux.

Hope this can be useful for others and may be devs can apply the fix in
mainstream repo as well.

Kind regards,
Aleksei Skorodumov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20170207/8ffae5c9/attachment.html>

More information about the Qbs mailing list