|
@@ -451,6 +451,7 @@ Type
|
|
FRemove: String;
|
|
FRemove: String;
|
|
FTarget: String;
|
|
FTarget: String;
|
|
FUnixPaths: Boolean;
|
|
FUnixPaths: Boolean;
|
|
|
|
+ FSourceExt : String;
|
|
function GetBaseInstallDir: String;
|
|
function GetBaseInstallDir: String;
|
|
function GetBinInstallDir: String;
|
|
function GetBinInstallDir: String;
|
|
function GetCompiler: String;
|
|
function GetCompiler: String;
|
|
@@ -481,6 +482,7 @@ Type
|
|
Property Mode : TCompilerMode Read FMode Write FMode;
|
|
Property Mode : TCompilerMode Read FMode Write FMode;
|
|
Property UnixPaths : Boolean Read FUnixPaths Write FUnixPaths;
|
|
Property UnixPaths : Boolean Read FUnixPaths Write FUnixPaths;
|
|
Property Options : String Read FOptions Write FOptions; // Default compiler options.
|
|
Property Options : String Read FOptions Write FOptions; // Default compiler options.
|
|
|
|
+ Property SourceExt : String Read FSourceExt Write FSourceExt;
|
|
// paths etc.
|
|
// paths etc.
|
|
Property Prefix : String Read FPrefix Write SetPrefix;
|
|
Property Prefix : String Read FPrefix Write SetPrefix;
|
|
Property BaseInstallDir : String Read GetBaseInstallDir Write SetBaseInstallDir;
|
|
Property BaseInstallDir : String Read GetBaseInstallDir Write SetBaseInstallDir;
|
|
@@ -898,6 +900,7 @@ Const
|
|
KeyBinInstallDir = 'BinInstallDir';
|
|
KeyBinInstallDir = 'BinInstallDir';
|
|
KeyDocInstallDir = 'DocInstallDir';
|
|
KeyDocInstallDir = 'DocInstallDir';
|
|
KeyExamplesInstallDir = 'ExamplesInstallDir';
|
|
KeyExamplesInstallDir = 'ExamplesInstallDir';
|
|
|
|
+ KeySourceExt = 'SourceExt';
|
|
|
|
|
|
// Callback for Sysutils getapplicationname.
|
|
// Callback for Sysutils getapplicationname.
|
|
|
|
|
|
@@ -1483,6 +1486,7 @@ begin
|
|
{$else}
|
|
{$else}
|
|
UnixPaths:=False;
|
|
UnixPaths:=False;
|
|
{$endif}
|
|
{$endif}
|
|
|
|
+ FSourceExt:=PPExt;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TCustomDefaults.Assign(ASource: TPersistent);
|
|
procedure TCustomDefaults.Assign(ASource: TPersistent);
|
|
@@ -1512,7 +1516,10 @@ begin
|
|
FRemove:=D.FRemove;
|
|
FRemove:=D.FRemove;
|
|
FTarget:=D.FTarget;
|
|
FTarget:=D.FTarget;
|
|
FUnixPaths:=D.FUnixPaths;
|
|
FUnixPaths:=D.FUnixPaths;
|
|
- end;
|
|
|
|
|
|
+ FSourceExt:=D.SourceExt;
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ Inherited;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TCustomDefaults.LocalInit(Const AFileName : String);
|
|
procedure TCustomDefaults.LocalInit(Const AFileName : String);
|
|
@@ -1630,6 +1637,7 @@ begin
|
|
Values[KeyExamplesInstallDir]:=FExamplesInstallDir;
|
|
Values[KeyExamplesInstallDir]:=FExamplesInstallDir;
|
|
Values[KeyRemove]:=FRemove;
|
|
Values[KeyRemove]:=FRemove;
|
|
Values[KeyTarget]:=FTarget;
|
|
Values[KeyTarget]:=FTarget;
|
|
|
|
+ Values[KeySourceExt]:=FSourceExt;
|
|
end;
|
|
end;
|
|
L.SaveToStream(S);
|
|
L.SaveToStream(S);
|
|
Finally
|
|
Finally
|
|
@@ -1685,6 +1693,9 @@ begin
|
|
FBinInstallDir:=Values[KeyBinInstallDir];
|
|
FBinInstallDir:=Values[KeyBinInstallDir];
|
|
FDocInstallDir:=Values[KeyDocInstallDir];
|
|
FDocInstallDir:=Values[KeyDocInstallDir];
|
|
FExamplesInstallDir:=Values[KeyExamplesInstallDir];
|
|
FExamplesInstallDir:=Values[KeyExamplesInstallDir];
|
|
|
|
+ FSourceExt:=Values[KeySourceExt];
|
|
|
|
+ If (FSourceExt='') then
|
|
|
|
+ FSourceExt:=PPExt;
|
|
end;
|
|
end;
|
|
Finally
|
|
Finally
|
|
L.Free;
|
|
L.Free;
|
|
@@ -2983,10 +2994,10 @@ begin
|
|
begin
|
|
begin
|
|
SFN:=SD+Target.SourceFileName;
|
|
SFN:=SD+Target.SourceFileName;
|
|
If (ExtractFileExt(SFN)='') then
|
|
If (ExtractFileExt(SFN)='') then
|
|
- if FileExists(SFN+'.pp') then
|
|
|
|
- SFN:=SFN+'.pp'
|
|
|
|
|
|
+ if FileExists(SFN+PPUExt) then
|
|
|
|
+ SFN:=SFN+PPUExt
|
|
else
|
|
else
|
|
- SFN:=SFN+'.pas';
|
|
|
|
|
|
+ SFN:=SFN+PASExt;
|
|
Log(vldebug, SDebugCheckingSAgainstS, [OFN, SFN]);
|
|
Log(vldebug, SDebugCheckingSAgainstS, [OFN, SFN]);
|
|
Result:=FileNewer(SFN,OFN);
|
|
Result:=FileNewer(SFN,OFN);
|
|
// here we should check file timestamps.
|
|
// here we should check file timestamps.
|
|
@@ -3751,7 +3762,9 @@ begin
|
|
E:=ExtractFileExt(N);
|
|
E:=ExtractFileExt(N);
|
|
N:=ExtractFileName(N);
|
|
N:=ExtractFileName(N);
|
|
If (E<>'') then
|
|
If (E<>'') then
|
|
- N:=Copy(N,1,Length(N)-Length(E));
|
|
|
|
|
|
+ N:=Copy(N,1,Length(N)-Length(E))
|
|
|
|
+ else
|
|
|
|
+ E:=Defaults.SourceExt;
|
|
inherited SetName(N);
|
|
inherited SetName(N);
|
|
FExtension:=E;
|
|
FExtension:=E;
|
|
FDirectory:=D;
|
|
FDirectory:=D;
|
|
@@ -3804,7 +3817,11 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TTarget.GetArchiveFiles(List: TStrings; APrefix : String; AnOS : TOS);
|
|
procedure TTarget.GetArchiveFiles(List: TStrings; APrefix : String; AnOS : TOS);
|
|
|
|
+
|
|
begin
|
|
begin
|
|
|
|
+ APrefix:=APrefix+Directory;
|
|
|
|
+ If (APrefix<>'') then
|
|
|
|
+ APrefix:=IncludeTrailingPathDelimiter(APrefix);
|
|
If (OS=[]) or (AnOS in OS) then
|
|
If (OS=[]) or (AnOS in OS) then
|
|
begin
|
|
begin
|
|
List.Add(APrefix+SourceFileName);
|
|
List.Add(APrefix+SourceFileName);
|