[fpc-devel] Paramstr trailing spaces, bug or not?

Sergei Gorelkin sergei_gorelkin at mail.ru
Fri Dec 23 14:25:39 CET 2011


23.12.2011 16:18, Marco van de Voort пишет:
>> - syswin.inc code looks like any number of delimiters between parameters
>>    are skipped.
>
> .. unless quoted.
>
>> - this extra whitespace is added by the makefile, suggesting some buggy/incorrect processing in
>> make.exe or makefile itself.
>
> It could be that the makefile logic quotes every argument on windows, in
> case of spaces. We would need a kind of strace tool for Windows to find out.
>
... it is the trailing backslash escaping the following character (C style).
I could reproduce the issue, by using the following command in 'packages' directory:

make install PP=f:\trunk\compiler\ppc386.exe PREFIX="f:\lazarus\fpc\2.7.1\"

Note the quotes, and also note where they end up in output:

make -C fcl-base install
make[1]: Entering directory `F:/trunk/packages/fcl-base'
.\fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i386 -o 
-Fu../../rtl/units/i386-win32 -o -Fu../../packages/hash/units/i386-win32 -o 
-Fu../../packages/paszlib/units/i386-win32 -o -Fu../../packages/fcl-process/units/i386-win32 -o 
-Fu../../packages/fpmkunit/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 
--compiler=f:/trunk/compiler/ppc386.exe --prefix=f:\lazarus\fpc\2.7.1" 
--unitinstalldir=f:\lazarus\fpc\2.7.1"/units/i386-win32/fcl-base
The installer encountered the following error:
Failed to create directory "f:\lazarus\fpc\2.7.1 
--unitinstalldir=f:\lazarus\fpc\2.7.1\units\i386-win32\fcl-base\units\i386-win32\fcl-base\"
make[1]: *** [install] Error 1

Without quotes the result is basically the same:

.\fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i386 -o 
-Fu../../rtl/units/i386-win32 -o -Fu../../packages/hash/units/i386-win32 -o 
-Fu../../packages/paszlib/units/i386-win32 -o -Fu../../packages/fcl-process/units/i386-win32 -o 
-Fu../../packages/fpmkunit/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 
--compiler=f:/trunk/compiler/ppc386.exe --prefix=f:\lazarus\fpc\2.7.1\ 
--unitinstalldir=f:\lazarus\fpc\2.7.1\/units/i386-win32/fcl-base
The installer encountered the following error:
Failed to create directory "f:\lazarus\fpc\2.7.1 
--unitinstalldir=f:\lazarus\fpc\2.7.1\\units\i386-win32\fcl-base\units\i386-win32\fcl-base\"

Finally, when trailing backslash is duplicated, everything runs successfully.

Sergei



More information about the fpc-devel mailing list