mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:59:17 +02:00
codetools: fpmake.pas
git-svn-id: trunk@20333 -
This commit is contained in:
parent
a045057513
commit
0dfa9a2f3f
@ -34,30 +34,24 @@ program fpmake;
|
|||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, fpmkunit2;
|
SysUtils, fpmkunit;
|
||||||
|
|
||||||
procedure AddDependencies(T: TTarget);
|
procedure AddUnitDependency(P: TPackage; T: TTarget; Filename: string);
|
||||||
var
|
var
|
||||||
Info: TSearchRec;
|
UnitName: String;
|
||||||
Ext: String;
|
|
||||||
begin
|
begin
|
||||||
if FindFirst('*',faAnyFile,Info)=0 then
|
if Filename='' then exit;
|
||||||
begin
|
UnitName:=copy(Filename,1,length(Filename)-length(ExtractFileExt(Filename)));
|
||||||
repeat
|
T.Dependencies.AddUnit(UnitName);
|
||||||
if (Info.Name<>T.Name) then begin
|
P.Targets.AddUnit(Filename);
|
||||||
Ext:=ExtractFileExt(Info.Name);
|
end;
|
||||||
if (Ext='.pas') or (Ext='.pp') then
|
|
||||||
//T.Dependencies.AddUnit(copy(Info.Name,1,length(Info.Name)-length(Ext)))
|
procedure AddUnitDependencies(P: TPackage; T: TTarget; Filenames: array of const);
|
||||||
//writeln(copy(Info.Name,1,length(Info.Name)-length(Ext)))
|
var
|
||||||
else if Ext='.inc' then
|
i: Integer;
|
||||||
T.Dependencies.AddInclude(Info.Name)
|
begin
|
||||||
else if Ext='.lpk' then
|
for i:=low(Filenames) to high(Filenames) do
|
||||||
T.Dependencies.Add(Info.Name);
|
AddUnitDependency(P,T,AnsiString(Filenames[i].VAnsiString));
|
||||||
end;
|
|
||||||
until FindNext(Info)<>0;
|
|
||||||
writeln();
|
|
||||||
end;
|
|
||||||
FindClose(Info);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -66,12 +60,66 @@ var
|
|||||||
begin
|
begin
|
||||||
with Installer do begin
|
with Installer do begin
|
||||||
P:=AddPackage('codetools');
|
P:=AddPackage('codetools');
|
||||||
|
P.Version:='1.0-0';
|
||||||
|
P.Author:='Mattias Gaertner';
|
||||||
|
P.License:='GPL-2 or any later';
|
||||||
|
P.Description:='CodeTools - '
|
||||||
|
+'tools and functions to parse, browse and edit pascal sources';
|
||||||
P.OSes:=AllOSes;
|
P.OSes:=AllOSes;
|
||||||
T:=P.Targets.AddUnit('allcodetoolunits.pp');
|
T:=P.Targets.AddUnit('allcodetoolunits.pp');
|
||||||
T.Options:='-gl';
|
T.Options.Add('-gl');
|
||||||
// AddUnit gives error: Unknown target in dependencies for allcodetoolunits: keywordfunclists
|
T.Dependencies.AddInclude('codetools.inc');
|
||||||
//T.Dependencies.AddUnit('keywordfunclists');
|
AddUnitDependencies(P,T,[
|
||||||
AddDependencies(T);
|
'basiccodetools.pas',
|
||||||
|
'cachecodetools.pas',
|
||||||
|
'ccodeparsertool.pas',
|
||||||
|
'codeatom.pas',
|
||||||
|
'codebeautifier.pas',
|
||||||
|
'codecache.pas',
|
||||||
|
'codecompletiontool.pas',
|
||||||
|
'codegraph.pas',
|
||||||
|
'codeindex.pas',
|
||||||
|
'codetemplatestool.pas',
|
||||||
|
'codetoolmanager.pas',
|
||||||
|
'codetoolmemmanager.pas',
|
||||||
|
'codetoolsconfig.pas',
|
||||||
|
'codetoolsstrconsts.pas',
|
||||||
|
'codetoolsstructs.pas',
|
||||||
|
'codetree.pas',
|
||||||
|
'customcodetool.pas',
|
||||||
|
'definetemplates.pas',
|
||||||
|
'directivestree.pas',
|
||||||
|
'directorycacher.pas',
|
||||||
|
'eventcodetool.pas',
|
||||||
|
'expreval.pas',
|
||||||
|
'extractproctool.pas',
|
||||||
|
'fileprocs.pas',
|
||||||
|
'finddeclarationcache.pas',
|
||||||
|
'finddeclarationtool.pas',
|
||||||
|
'findoverloads.pas',
|
||||||
|
'h2pastool.pas',
|
||||||
|
'identcompletiontool.pas',
|
||||||
|
'keywordfunclists.pas',
|
||||||
|
'laz_dom.pas',
|
||||||
|
'laz_xmlcfg.pas',
|
||||||
|
'laz_xmlread.pas',
|
||||||
|
'laz_xmlstreaming.pas',
|
||||||
|
'laz_xmlwrite.pas',
|
||||||
|
'lfmtrees.pas',
|
||||||
|
'linkscanner.pas',
|
||||||
|
'methodjumptool.pas',
|
||||||
|
'multikeywordlisttool.pas',
|
||||||
|
'nonpascalcodetools.pas',
|
||||||
|
'pascalparsertool.pas',
|
||||||
|
'pascalreadertool.pas',
|
||||||
|
'ppucodetools.pas',
|
||||||
|
'ppugraph.pas',
|
||||||
|
'ppuparser.pas',
|
||||||
|
'resourcecodetool.pas',
|
||||||
|
'sourcechanger.pas',
|
||||||
|
'sourcelog.pas',
|
||||||
|
'stdcodetools.pas',
|
||||||
|
'']);
|
||||||
Run;
|
Run;
|
||||||
end;
|
end;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user