mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-20 10:49:05 +02:00
fpmake: default pas2js.cfg -Fu for rtl.js
This commit is contained in:
parent
5d1e874c9e
commit
b4b7b4a6aa
20
fpmake.pp
20
fpmake.pp
@ -17,7 +17,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure CreateConfigFile(CfgFile,BaseDir : String);
|
Procedure CreateConfigFile(CfgFile,BaseDir : String; rtl_js_dir: string = '');
|
||||||
|
|
||||||
Var
|
Var
|
||||||
F : Text;
|
F : Text;
|
||||||
@ -45,7 +45,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if (BaseDir<>'') then
|
if (BaseDir<>'') then
|
||||||
BaseDir:=ExcludeTrailingPathDelimiter(BaseDir);
|
BaseDir:=IncludeTrailingPathDelimiter(BaseDir);
|
||||||
Addln('#');
|
Addln('#');
|
||||||
Addln('# Minimal config file for pas2js compiler');
|
Addln('# Minimal config file for pas2js compiler');
|
||||||
Addln('#');
|
Addln('#');
|
||||||
@ -61,9 +61,14 @@ begin
|
|||||||
Addln('#-vw');
|
Addln('#-vw');
|
||||||
Addln('');
|
Addln('');
|
||||||
if FilenameIsAbsolute(BaseDir) then
|
if FilenameIsAbsolute(BaseDir) then
|
||||||
Addln('-Fu'+BaseDir+'/*')
|
Addln('-Fu'+BaseDir+'*')
|
||||||
else
|
else
|
||||||
Addln('-Fu$CfgDir/'+ExcludeLeadingPathDelimiter(BaseDir)+'/*');
|
Addln('-Fu$CfgDir'+PathDelim+BaseDir+'*');
|
||||||
|
if rtl_js_dir<>'' then
|
||||||
|
if FilenameIsAbsolute(rtl_js_dir) then
|
||||||
|
AddLn('-Fu'+rtl_js_dir)
|
||||||
|
else
|
||||||
|
AddLn('-Fu$CfgDir'+PathDelim+rtl_js_dir);
|
||||||
Addln('');
|
Addln('');
|
||||||
Addln('#IFDEF nodejs');
|
Addln('#IFDEF nodejs');
|
||||||
Addln('-Jirtl.js');
|
Addln('-Jirtl.js');
|
||||||
@ -194,7 +199,8 @@ begin
|
|||||||
rmCompile,rmBuild:
|
rmCompile,rmBuild:
|
||||||
begin
|
begin
|
||||||
if not FileExists(BD+'pas2js.cfg') then
|
if not FileExists(BD+'pas2js.cfg') then
|
||||||
CreateConfigFile(BD+'pas2js.cfg',SetDirSeparators('../../packages'));
|
CreateConfigFile(BD+'pas2js.cfg',SetDirSeparators('../../packages'),
|
||||||
|
SetDirSeparators('../../compiler/utils/pas2js/dist/'));
|
||||||
end;
|
end;
|
||||||
rmInstall,rmArchive,rmZipInstall:
|
rmInstall,rmArchive,rmZipInstall:
|
||||||
begin
|
begin
|
||||||
@ -233,7 +239,3 @@ begin
|
|||||||
Run;
|
Run;
|
||||||
end;
|
end;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user