[Lazarus] IDE macro $MakeExe when cross-compiling
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Apr 12 22:41:31 CEST 2012
On Thu, 12 Apr 2012 12:00:40 +0200
cobines <cobines at gmail.com> wrote:
> Hello.
>
> I'm trying to invoke svn2revisioninc before compiling, so I entered
> this command in project options:
>
> $(LazarusDir)$MakeDir(tools)$MakeExe(svn2revisioninc) .. myrevision.inc
>
> It works OK if host OS is the same as target, but when cross-compiling
> from Linux to Windows I get:
>
> $ lazbuild --os=win32 project1.lpi
> primary config path: /home/devel/.lazarus
> [TExternalToolList.Run]
> CmdLine="/home/devel/lazarus/tools/svn2revisioninc.exe ..
> myrevision.inc" WorkDir="/tmp/"
> TExternalToolList.Run Failed to run tool file
> "/home/devel/lazarus/tools/svn2revisioninc.exe" does not exist
> Stack trace:
> $082E1EFC line 232 of lazfileutils.pas
> $0817B333 line 346 of exttooldialog.pas
> $0804F258 line 1386 of lazbuild.lpr
> $0816982C line 4076 of compileroptions.pp
> $0804AF67 line 770 of lazbuild.lpr
> $08048E10 line 317 of lazbuild.lpr
> $0804D7F8 line 1162 of lazbuild.lpr
> $0804F2B1 line 1407 of lazbuild.lpr
> $B75A8E46
> ...
>
> Nevermind the crash but the macros are not consistent:
> $MakeDir macro produced / path delimiter not \.
> $MakeExe produced .exe and not empty string.
>
> Is this a bug or should I not use these macros when cross-compiling?
> Is there a different way I can achieve this?
I extended the macro:
To get the file name of the host OS use $MakeExe(ide,filename).
To get the file name of a specific OS use $MakeExe(os,filename).
Mattias
More information about the Lazarus
mailing list