mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 12:00:42 +02:00
updatemakefiles: check if fpcmake supports new version
git-svn-id: branches/fixes_1_8@54968 -
This commit is contained in:
parent
0295183849
commit
cfed9d353d
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
@ -15,9 +15,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -29,7 +26,6 @@
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
|
@ -33,7 +33,8 @@ program updatemakefiles;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
Classes, sysutils, FileProcs, DefineTemplates, LazFileUtils, Laz2_XMLCfg;
|
||||
Classes, sysutils, FileProcs, DefineTemplates, LazFileUtils, Laz2_XMLCfg,
|
||||
FileUtil;
|
||||
|
||||
var
|
||||
LazarusDir: String;
|
||||
@ -138,6 +139,24 @@ begin
|
||||
FindCloseUTF8(FileInfo);
|
||||
end;
|
||||
|
||||
procedure CheckFPCMake;
|
||||
const
|
||||
LastTarget = 'aarch64-darwin';
|
||||
var
|
||||
FPCMake: String;
|
||||
Lines: TStringList;
|
||||
begin
|
||||
FPCMake:=FindDefaultExecutablePath('fpcmake');
|
||||
if FPCMake='' then
|
||||
raise Exception.Create('missing fpcmake');
|
||||
Lines:=RunTool(FPCMake,'-TAll -v');
|
||||
if Pos(' '+LastTarget,Lines.Text)<1 then begin
|
||||
writeln(Lines.Text);
|
||||
raise Exception.Create('fpcmake does not support target '+LastTarget+'. Did you set PATH to the devel version of fpcmake?');
|
||||
end;
|
||||
Lines.Free;
|
||||
end;
|
||||
|
||||
var
|
||||
LPKFiles: TStringList;
|
||||
LazbuildOut: TStringList;
|
||||
@ -148,6 +167,7 @@ begin
|
||||
writeln('Usage: ./tools/updatemakefiles');
|
||||
exit;
|
||||
end;
|
||||
CheckFPCMake;
|
||||
LazarusDir:=CleanAndExpandDirectory(GetCurrentDirUTF8);
|
||||
if ExtractFileName(ChompPathDelim(LazarusDir))='tools' then
|
||||
LazarusDir:=ExtractFilePath(ChompPathDelim(LazarusDir));
|
||||
|
Loading…
Reference in New Issue
Block a user