Hi,

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
E:/Project/default/compiler.MSVC2013-amd64.c9ce5223/lexyacc/scannerlex.yy.c
E:/Project/scanner.l
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):

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

new:
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
_______________________________________________
Qbs mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to