implemented compilation of simple packages

git-svn-id: trunk@4072 -
This commit is contained in:
mattias 2003-04-17 11:40:41 +00:00
parent 4ac981d4de
commit 26ea00db8d
7 changed files with 197 additions and 83 deletions

View File

@ -80,8 +80,10 @@ type
const
ParsedCompilerSearchPaths = [pcosUnitPath,pcosIncludePath,
pcosObjectPath,pcosLibraryPath];
ParsedCompilerFilenames = [pcosOutputDir,pcosCompilerPath];
ParsedCompilerFiles = ParsedCompilerSearchPaths+ParsedCompilerFilenames;
ParsedCompilerFilenames = [pcosCompilerPath];
ParsedCompilerDirectories = [pcosOutputDir];
ParsedCompilerFiles =
ParsedCompilerSearchPaths+ParsedCompilerFilenames+ParsedCompilerDirectories;
type
TLocalSubstitutionEvent = function(const s: string): string of object;
@ -240,13 +242,14 @@ type
function MakeOptionsString: String;
function MakeOptionsString(const MainSourceFileName: string): String; virtual;
function CustomOptionsAsString: string;
function ParseSearchPaths(const switch, paths: String): String;
function ParseOptions(const Delim, Switch, OptionStr: string): string;
function ConvertSearchPathToCmdLine(const switch, paths: String): String;
function ConvertOptionsToCmdLine(const Delim, Switch, OptionStr: string): string;
function GetXMLConfigPath: String; virtual;
function CreateTargetFilename(const MainSourceFileName: string): string; virtual;
procedure GetInheritedCompilerOptions(var OptionsList: TList); virtual;
function GetOwnerName: string; virtual;
function GetInheritedOption(Option: TInheritedCompilerOption): string; virtual;
function GetInheritedOption(Option: TInheritedCompilerOption;
RelativeToBaseDir: boolean): string; virtual;
function MergeLinkerOptions(const OldOptions, AddOptions: string): string;
function MergeCustomOptions(const OldOptions, AddOptions: string): string;
function GetDefaultMainSourceFileName: string; virtual;
@ -1063,10 +1066,10 @@ end;
{------------------------------------------------------------------------------
function TBaseCompilerOptions.GetInheritedOption(
Option: TInheritedCompilerOption): string;
Option: TInheritedCompilerOption; RelativeToBaseDir: boolean): string;
------------------------------------------------------------------------------}
function TBaseCompilerOptions.GetInheritedOption(
Option: TInheritedCompilerOption): string;
Option: TInheritedCompilerOption; RelativeToBaseDir: boolean): string;
var
OptionsList: TList;
i: Integer;
@ -1114,6 +1117,10 @@ begin
fInheritedOptGraphStamps:=CompilerGraphStamp;
end;
Result:=fInheritedOptions[Option];
if RelativeToBaseDir then begin
if Option in [icoUnitPath,icoIncludePath,icoObjectPath,icoLibraryPath] then
Result:=CreateRelativeSearchPath(Result,BaseDirectory);
end;
end;
{------------------------------------------------------------------------------
@ -1528,13 +1535,13 @@ Processor specific options:
if PassLinkerOptions then begin
CurLinkerOptions:=ParsedOpts.GetParsedValue(pcosLinkerOptions);
if (CurLinkerOptions<>'') then
switches := switches + ' ' + ParseOptions(' ','-k', CurLinkerOptions);
switches := switches + ' ' + ConvertOptionsToCmdLine(' ','-k', CurLinkerOptions);
end;
// inherited Linker options
InhLinkerOpts:=GetInheritedOption(icoLinkerOptions);
InhLinkerOpts:=GetInheritedOption(icoLinkerOptions,true);
if InhLinkerOpts<>'' then
switches := switches + ' ' + ParseOptions(' ','-k', InhLinkerOpts);
switches := switches + ' ' + ConvertOptionsToCmdLine(' ','-k', InhLinkerOpts);
{ ---------------- Other Tab -------------------- }
@ -1602,42 +1609,44 @@ Processor specific options:
// include path
CurIncludePath:=ParsedOpts.GetParsedValue(pcosIncludePath);
if (CurIncludePath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fi', CurIncludePath);
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fi', CurIncludePath);
// inherited include path
InhIncludePath:=GetInheritedOption(icoIncludePath);
InhIncludePath:=GetInheritedOption(icoIncludePath,true);
if (InhIncludePath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fi', InhIncludePath);
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fi', InhIncludePath);
// library path
CurLibraryPath:=ParsedOpts.GetParsedValue(pcosLibraryPath);
if (CurLibraryPath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fl', CurLibraryPath);
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fl', CurLibraryPath);
// inherited library path
InhLibraryPath:=GetInheritedOption(icoLibraryPath);
InhLibraryPath:=GetInheritedOption(icoLibraryPath,true);
if (InhLibraryPath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fl', InhLibraryPath);
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fl', InhLibraryPath);
// object path
CurObjectPath:=ParsedOpts.GetParsedValue(pcosObjectPath);
if (CurObjectPath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fo', CurObjectPath);
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fo', CurObjectPath);
// inherited object path
InhObjectPath:=GetInheritedOption(icoObjectPath);
InhObjectPath:=GetInheritedOption(icoObjectPath,true);
if (InhObjectPath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fo', InhObjectPath);
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fo', InhObjectPath);
// unit path
CurUnitPath:=ParsedOpts.GetParsedValue(pcosUnitPath);
if (CurUnitPath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fu', CurUnitPath);
// always add the current directory to the unit path, so that the compiler
// checks for changed files in the directory
CurUnitPath:=CurUnitPath+';.';
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fu', CurUnitPath);
// inherited unit path
InhUnitPath:=GetInheritedOption(icoUnitPath);
InhUnitPath:=GetInheritedOption(icoUnitPath,true);
if (InhUnitPath <> '') then
switches := switches + ' ' + ParseSearchPaths('-Fu', InhUnitPath);
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fu', InhUnitPath);
{ CompilerPath - Nothing needs to be done with this one }
@ -1711,7 +1720,7 @@ Processor specific options:
Switches:=Switches+' '+CurCustomOptions;
// inherited custom options
InhCustomOptions:=GetInheritedOption(icoCustomOptions);
InhCustomOptions:=GetInheritedOption(icoCustomOptions,true);
if InhCustomOptions<>'' then
Switches:=Switches+' '+InhCustomOptions;
@ -1733,9 +1742,10 @@ begin
end;
{------------------------------------------------------------------------------}
{ TBaseCompilerOptions ParseSearchPaths }
{ TBaseCompilerOptions ConvertSearchPathToCmdLine }
{------------------------------------------------------------------------------}
function TBaseCompilerOptions.ParseSearchPaths(const switch, paths: String): String;
function TBaseCompilerOptions.ConvertSearchPathToCmdLine(
const switch, paths: String): String;
var
tempsw, SS, Delim: String;
M: Integer;
@ -1779,9 +1789,9 @@ begin
end;
{------------------------------------------------------------------------------
TBaseCompilerOptions ParseOptions
TBaseCompilerOptions ConvertOptionsToCmdLine
------------------------------------------------------------------------------}
function TBaseCompilerOptions.ParseOptions(const Delim, Switch,
function TBaseCompilerOptions.ConvertOptionsToCmdLine(const Delim, Switch,
OptionStr: string): string;
var Startpos, EndPos: integer;
begin
@ -1813,10 +1823,9 @@ begin
CopySecondaryConfigFile(fn);
end;
{------------------------------------------------------------------------------}
{ TBaseCompilerOptions Clear }
{------------------------------------------------------------------------------}
{------------------------------------------------------------------------------
TBaseCompilerOptions Clear
------------------------------------------------------------------------------}
procedure TBaseCompilerOptions.Clear;
begin
fOptionsString := '';
@ -2570,20 +2579,16 @@ begin
AncestorNode.SelectedIndex:=AncestorNode.ImageIndex;
with CompilerOpts do begin
AddChildNode('unit path',
CreateRelativeSearchPath(GetInheritedOption(icoUnitPath),
BaseDirectory),icoUnitPath);
GetInheritedOption(icoUnitPath,true),icoUnitPath);
AddChildNode('include path',
CreateRelativeSearchPath(GetInheritedOption(icoIncludePath),
BaseDirectory),icoIncludePath);
GetInheritedOption(icoIncludePath,true),icoIncludePath);
AddChildNode('object path',
CreateRelativeSearchPath(GetInheritedOption(icoObjectPath),
BaseDirectory),icoObjectPath);
GetInheritedOption(icoObjectPath,true),icoObjectPath);
AddChildNode('library path',
CreateRelativeSearchPath(GetInheritedOption(icoLibraryPath),
BaseDirectory),icoLibraryPath);
AddChildNode('linker options',GetInheritedOption(icoLinkerOptions),
GetInheritedOption(icoLibraryPath,true),icoLibraryPath);
AddChildNode('linker options',GetInheritedOption(icoLinkerOptions,true),
icoLinkerOptions);
AddChildNode('custom options',GetInheritedOption(icoCustomOptions),
AddChildNode('custom options',GetInheritedOption(icoCustomOptions,true),
icoCustomOptions);
end;
AncestorNode.Expanded:=true;
@ -4158,6 +4163,14 @@ begin
if (BaseDirectory<>'') and (not FilenameIsAbsolute(s)) then
s:=BaseDirectory+s;
end
else if Option in ParsedCompilerDirectories then begin
// make directory absolute
s:=TrimFilename(s);
BaseDirectory:=GetParsedValue(pcosBaseDir);
if (BaseDirectory<>'') and (not FilenameIsAbsolute(s)) then
s:=BaseDirectory+s;
s:=AppendPathDelim(s);
end
else if Option in ParsedCompilerSearchPaths then begin
// make search paths absolute
BaseDirectory:=GetParsedValue(pcosBaseDir);

View File

@ -43,9 +43,10 @@ uses
Classes, LazarusIDEStrConsts, LCLType, LclLinux, Compiler, StdCtrls, Forms,
Buttons, Menus, ComCtrls, Spin, ProjectDefs, Project, SysUtils, FileCtrl,
Controls, Graphics, ExtCtrls, Dialogs, LazConf, CompReg, CodeToolManager,
Splash, ObjectInspector, PropEdits, SynEditKeyCmds, OutputFilter, IDEDefs,
MsgView, EnvironmentOpts, EditorOptions, IDEComp, FormEditor, CompilerOptions,
KeyMapping, IDEProcs, UnitEditor, Debugger, IDEOptionDefs, CodeToolsDefines;
Splash, TransferMacros, ObjectInspector, PropEdits, SynEditKeyCmds,
OutputFilter, IDEDefs, MsgView, EnvironmentOpts, EditorOptions, IDEComp,
FormEditor, CompilerOptions, KeyMapping, IDEProcs, UnitEditor, Debugger,
IDEOptionDefs, CodeToolsDefines;
type
// The IDE is at anytime in a specific state:
@ -336,7 +337,8 @@ type
public
ToolStatus: TIDEToolStatus;
CurrentParsedCompilerOption: TParsedCompilerOptions;
MacroList: TTransferMacroList;
function FindUnitFile(const AFilename: string): string; virtual; abstract;
procedure GetCurrentUnit(var ActiveSourceEditor:TSourceEditor;
var ActiveUnitInfo:TUnitInfo); virtual; abstract;

View File

@ -428,6 +428,7 @@ type
procedure UpdateEditorRect;
procedure GetInheritedCompilerOptions(var OptionsList: TList);
function GetCompileSourceFilename: string;
function GetOutputDirectory: string;
// files
function FindPkgFile(const AFilename: string;
ResolveLinks, IgnoreRemoved: boolean): TPkgFile;
@ -2063,6 +2064,14 @@ begin
Result:=ChangeFileExt(ExtractFilename(Filename),'.pas');
end;
function TLazPackage.GetOutputDirectory: string;
begin
if HasDirectory then begin
Result:=CompilerOptions.ParsedOpts.GetParsedValue(pcosOutputDir);
end else
Result:='';
end;
{ TPkgComponent }
procedure TPkgComponent.SetPkgFile(const AValue: TPkgFile);

View File

@ -792,9 +792,11 @@ begin
PackageType:=lptDesignTime;
Installed:=pitStatic;
CompilerOptions.UnitOutputDirectory:='';
UsageOptions.UnitPath:='';
// add lazarus registration unit path
UsageOptions.UnitPath:='$(LazarusDir)/packager/units';
// add files
// add registering units
AddFile('inc/process.pp','Process',pftUnit,[pffHasRegisterProc],cpBase);
AddFile('db/db.pp','DB',pftUnit,[pffHasRegisterProc],cpBase);
@ -819,7 +821,7 @@ begin
Installed:=pitStatic;
CompilerOptions.UnitOutputDirectory:='';
// add files
// add registering units
AddFile('menus.pp','Menus',pftUnit,[pffHasRegisterProc],cpLCL);
AddFile('buttons.pp','Buttons',pftUnit,[pffHasRegisterProc],cpLCL);
AddFile('stdctrls.pp','StdCtrls',pftUnit,[pffHasRegisterProc],cpLCL);

View File

@ -50,6 +50,7 @@ uses
InputHistory, IDEDefs, UComponentManMain, Project, ComponentReg,
PackageEditor, AddToPackageDlg, PackageDefs, PackageLinks, PackageSystem,
OpenInstalledPkgDlg, PkgGraphExplorer, BrokenDependenciesDlg, CompilerOptions,
ExtToolDialog, ExtToolEditDlg,
BasePkgManager, MainBar;
type
@ -904,6 +905,9 @@ function TPkgManager.DoCompilePackage(APackage: TLazPackage;
Flags: TPkgCompileFlags): TModalResult;
var
PathList: TList;
PkgCompileTool: TExternalToolOptions;
OutputDir: String;
SrcFilename: String;
begin
Result:=mrCancel;
@ -929,6 +933,16 @@ begin
exit;
end;
// create the output directory
OutputDir:=APackage.GetOutputDirectory;
if not ForceDirectory(OutputDir) then begin
Result:=MessageDlg('Unable to create directory',
'Unable to create output directory "'+OutputDir+'"'#13
+'for package '+APackage.IDAsString+'.',
mtError,[mbCancel,mbAbort],0);
exit;
end;
// save everything
Result:=MainIDE.DoSaveForBuild;
if Result<>mrOk then exit;
@ -941,9 +955,28 @@ begin
// create package main source file
Result:=DoSavePackageMainSource(APackage,Flags);
if Result<>mrOk then exit;
SrcFilename:=CreateRelativePath(OutputDir+APackage.GetCompileSourceFilename,
APackage.Directory);
// create external tool to run the compiler
PkgCompileTool:=TExternalToolOptions.Create;
PkgCompileTool.Title:='Compiling package '+APackage.IDAsString;
PkgCompileTool.Filename:=APackage.CompilerOptions.CompilerPath;
PkgCompileTool.ScanOutputForFPCMessages:=true;
PkgCompileTool.ScanOutputForMakeMessages:=true;
PkgCompileTool.WorkingDirectory:=APackage.Directory;
PkgCompileTool.CmdLineParams:=APackage.CompilerOptions.MakeOptionsString
+' '+SrcFilename;
// clear old errors
SourceNotebook.ClearErrorLines;
// compile package
Result:=EnvironmentOptions.ExternalTools.Run(PkgCompileTool,MainIDE.MacroList);
// clean up
PkgCompileTool.Free;
MainIDE.DoCheckFilesOnDisk;
Result:=mrOk;
end;
@ -961,16 +994,20 @@ var
CurUnitName: String;
RegistrationCode: String;
fs: TFileStream;
HeaderSrc: String;
OutputDir: String;
begin
// check if package is ready for saving
if not APackage.HasDirectory then begin
Result:=MessageDlg('Package has no directory',
'Package "'+APackage.IDAsString+'" has no valid directory.',
OutputDir:=APackage.GetOutputDirectory;
if not DirectoryExists(OutputDir) then begin
Result:=MessageDlg('Directory not found',
'Package "'+APackage.IDAsString+'" has no valid output directory:'#13
+'"'+OutputDir+'"',
mtError,[mbCancel,mbAbort],0);
exit;
end;
SrcFilename:=APackage.Directory+APackage.GetCompileSourceFilename;
SrcFilename:=OutputDir+APackage.GetCompileSourceFilename;
// backup old file
Result:=MainIDE.DoBackupFile(SrcFilename,false);
@ -1014,7 +1051,15 @@ begin
// create source
Src:='interface'+e
HeaderSrc:=
'{ This file was automatically created by Lazarus. Do not edit!'+e
+' This source is only used to compile and install'+e
+' the package '+APackage.IDAsString+'.'+e
+'}'+e
+e;
Src:='unit '+APackage.Name+';'+e
+e
+'interface'+e
+e
+'uses'+e
+' '+UsedUnits+', LazarusPackageIntf;'+e
@ -1031,12 +1076,7 @@ begin
+'end.'+e;
Src:=CodeToolBoss.SourceChangeCache.BeautifyCodeOptions.
BeautifyStatement(Src,0);
Src:='{ This file was automatically created by Lazarus. Do not edit!'+e
+' This source is only used to compile and install'+e
+' the package '+APackage.IDAsString+'.'+e
+'}'+e
+e
+Src;
Src:=HeaderSrc+Src;
// save source
try

View File

@ -1,5 +1,5 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/21]
# Don't edit, this file is generated by FPCMake Version 1.1 [2003/03/28]
#
default: all
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
@ -58,6 +58,9 @@ ifdef inUnix
PATHSEP=/
else
PATHSEP:=$(subst /,\,/)
ifdef inCygWin
PATHSEP=/
endif
endif
ifdef PWD
BASEDIR:=$(subst \,/,$(shell $(PWD)))
@ -139,6 +142,16 @@ ifndef OS_TARGET
OS_TARGET:=$(shell $(FPC) -iTO)
endif
endif
ifndef CPU_TARGET
ifdef CPU_TARGET_DEFAULT
CPU_TARGET=$(CPU_TARGET_DEFAULT)
endif
endif
ifndef OS_TARGET
ifdef OS_TARGET_DEFAULT
OS_TARGET=$(OS_TARGET_DEFAULT)
endif
endif
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
ifneq ($(FULL_TARGET),$(FULL_SOURCE))
@ -782,7 +795,8 @@ override REQUIRE_PACKAGES=rtl rtl fcl
ifeq ($(OS_TARGET),linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
@ -795,6 +809,7 @@ endif
ifeq ($(OS_TARGET),win32)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
@ -807,7 +822,8 @@ endif
ifeq ($(OS_TARGET),freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
@ -820,7 +836,8 @@ endif
ifeq ($(OS_TARGET),netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
@ -853,7 +870,8 @@ endif
ifeq ($(OS_TARGET),openbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
@ -915,30 +933,56 @@ ifdef UNITDIR_PASZLIB
override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
endif
endif
ifdef REQUIRE_PACKAGES_INET
PACKAGEDIR_INET:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /inet/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_INET),)
ifneq ($(wildcard $(PACKAGEDIR_INET)/$(OS_TARGET)),)
UNITDIR_INET=$(PACKAGEDIR_INET)/$(OS_TARGET)
ifdef REQUIRE_PACKAGES_NETDB
PACKAGEDIR_NETDB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /netdb/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_NETDB),)
ifneq ($(wildcard $(PACKAGEDIR_NETDB)/$(OS_TARGET)),)
UNITDIR_NETDB=$(PACKAGEDIR_NETDB)/$(OS_TARGET)
else
UNITDIR_INET=$(PACKAGEDIR_INET)
UNITDIR_NETDB=$(PACKAGEDIR_NETDB)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_INET)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_INET) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_INET)/$(FPCMADE)
$(PACKAGEDIR_NETDB)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_NETDB) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_NETDB)/$(FPCMADE)
endif
else
PACKAGEDIR_INET=
UNITDIR_INET:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /inet/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_INET),)
UNITDIR_INET:=$(firstword $(UNITDIR_INET))
PACKAGEDIR_NETDB=
UNITDIR_NETDB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /netdb/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_NETDB),)
UNITDIR_NETDB:=$(firstword $(UNITDIR_NETDB))
else
UNITDIR_INET=
UNITDIR_NETDB=
endif
endif
ifdef UNITDIR_INET
override COMPILER_UNITDIR+=$(UNITDIR_INET)
ifdef UNITDIR_NETDB
override COMPILER_UNITDIR+=$(UNITDIR_NETDB)
endif
endif
ifdef REQUIRE_PACKAGES_LIBASYNC
PACKAGEDIR_LIBASYNC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libasync/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_LIBASYNC),)
ifneq ($(wildcard $(PACKAGEDIR_LIBASYNC)/$(OS_TARGET)),)
UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC)/$(OS_TARGET)
else
UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_LIBASYNC)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_LIBASYNC) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBASYNC)/$(FPCMADE)
endif
else
PACKAGEDIR_LIBASYNC=
UNITDIR_LIBASYNC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libasync/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_LIBASYNC),)
UNITDIR_LIBASYNC:=$(firstword $(UNITDIR_LIBASYNC))
else
UNITDIR_LIBASYNC=
endif
endif
ifdef UNITDIR_LIBASYNC
override COMPILER_UNITDIR+=$(UNITDIR_LIBASYNC)
endif
endif
ifdef REQUIRE_PACKAGES_FCL
@ -1416,6 +1460,7 @@ fpc_baseinfo:
@$(ECHO) Rm........ $(RMPROG)
@$(ECHO) GInstall.. $(GINSTALL)
@$(ECHO) Echo...... $(ECHO)
@$(ECHO) Shell..... $(SHELL)
@$(ECHO) Date...... $(DATE)
@$(ECHO) FPCMake... $(FPCMAKE)
@$(ECHO) PPUMove... $(PPUMOVE)

View File

@ -46,3 +46,6 @@ makefile: Makefile.fpc
-$(FPCMAKE) -w
makefiles: makefile
# end.