mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 20:50:42 +02:00
* use outputexedir for link.res location
This commit is contained in:
parent
be864a992e
commit
32d3653596
@ -206,7 +206,6 @@ unit files;
|
|||||||
locallibrarysearchpath : TSearchPathList;
|
locallibrarysearchpath : TSearchPathList;
|
||||||
|
|
||||||
path, { path where the module is find/created }
|
path, { path where the module is find/created }
|
||||||
outpath,
|
|
||||||
modulename, { name of the module in uppercase }
|
modulename, { name of the module in uppercase }
|
||||||
objfilename, { fullname of the objectfile }
|
objfilename, { fullname of the objectfile }
|
||||||
asmfilename, { fullname of the assemblerfile }
|
asmfilename, { fullname of the assemblerfile }
|
||||||
@ -812,7 +811,6 @@ end;
|
|||||||
stringdispose(staticlibfilename);
|
stringdispose(staticlibfilename);
|
||||||
stringdispose(sharedlibfilename);
|
stringdispose(sharedlibfilename);
|
||||||
stringdispose(exefilename);
|
stringdispose(exefilename);
|
||||||
stringdispose(outpath);
|
|
||||||
stringdispose(path);
|
stringdispose(path);
|
||||||
{ Create names }
|
{ Create names }
|
||||||
fsplit(fn,p,n,e);
|
fsplit(fn,p,n,e);
|
||||||
@ -829,7 +827,6 @@ end;
|
|||||||
if (OutputExeDir<>'') then
|
if (OutputExeDir<>'') then
|
||||||
p:=OutputExeDir;
|
p:=OutputExeDir;
|
||||||
end;
|
end;
|
||||||
outpath:=stringdup(p);
|
|
||||||
objfilename:=stringdup(p+n+target_info.objext);
|
objfilename:=stringdup(p+n+target_info.objext);
|
||||||
asmfilename:=stringdup(p+n+target_info.asmext);
|
asmfilename:=stringdup(p+n+target_info.asmext);
|
||||||
ppufilename:=stringdup(p+n+target_info.unitext);
|
ppufilename:=stringdup(p+n+target_info.unitext);
|
||||||
@ -1182,7 +1179,6 @@ end;
|
|||||||
staticlibfilename:=nil;
|
staticlibfilename:=nil;
|
||||||
sharedlibfilename:=nil;
|
sharedlibfilename:=nil;
|
||||||
exefilename:=nil;
|
exefilename:=nil;
|
||||||
outpath:=nil;
|
|
||||||
{ Dos has the famous 8.3 limit :( }
|
{ Dos has the famous 8.3 limit :( }
|
||||||
{$ifdef SHORTASMPREFIX}
|
{$ifdef SHORTASMPREFIX}
|
||||||
asmprefix:=stringdup(FixFileName('as'));
|
asmprefix:=stringdup(FixFileName('as'));
|
||||||
@ -1276,7 +1272,6 @@ end;
|
|||||||
stringdispose(staticlibfilename);
|
stringdispose(staticlibfilename);
|
||||||
stringdispose(sharedlibfilename);
|
stringdispose(sharedlibfilename);
|
||||||
stringdispose(exefilename);
|
stringdispose(exefilename);
|
||||||
stringdispose(outpath);
|
|
||||||
stringdispose(path);
|
stringdispose(path);
|
||||||
stringdispose(modulename);
|
stringdispose(modulename);
|
||||||
stringdispose(mainsource);
|
stringdispose(mainsource);
|
||||||
@ -1352,7 +1347,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.109 1999-11-12 11:03:50 peter
|
Revision 1.110 1999-11-16 23:39:04 peter
|
||||||
|
* use outputexedir for link.res location
|
||||||
|
|
||||||
|
Revision 1.109 1999/11/12 11:03:50 peter
|
||||||
* searchpaths changed to stringqueue object
|
* searchpaths changed to stringqueue object
|
||||||
|
|
||||||
Revision 1.108 1999/11/06 14:34:20 peter
|
Revision 1.108 1999/11/06 14:34:20 peter
|
||||||
|
@ -79,7 +79,7 @@ begin
|
|||||||
WriteResponseFile:=False;
|
WriteResponseFile:=False;
|
||||||
|
|
||||||
{ Open link.res file }
|
{ Open link.res file }
|
||||||
LinkRes.Init(Info.ResName);
|
LinkRes.Init(outputexedir+Info.ResName);
|
||||||
|
|
||||||
{ Write path to search libraries }
|
{ Write path to search libraries }
|
||||||
HPath:=current_module^.locallibrarysearchpath.First;
|
HPath:=current_module^.locallibrarysearchpath.First;
|
||||||
@ -172,13 +172,13 @@ begin
|
|||||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||||
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
||||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||||
Replace(cmdstr,'$RES',current_module^.outpath^+Info.ResName);
|
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||||
Replace(cmdstr,'$STRIP',StripStr);
|
Replace(cmdstr,'$STRIP',StripStr);
|
||||||
success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
|
success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
|
||||||
|
|
||||||
{ Remove ReponseFile }
|
{ Remove ReponseFile }
|
||||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||||
RemoveFile(current_module^.outpath^+Info.ResName);
|
RemoveFile(outputexedir+Info.ResName);
|
||||||
|
|
||||||
MakeExecutable:=success; { otherwise a recursive call to link method }
|
MakeExecutable:=success; { otherwise a recursive call to link method }
|
||||||
end;
|
end;
|
||||||
@ -186,7 +186,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 1999-11-12 11:03:50 peter
|
Revision 1.5 1999-11-16 23:39:04 peter
|
||||||
|
* use outputexedir for link.res location
|
||||||
|
|
||||||
|
Revision 1.4 1999/11/12 11:03:50 peter
|
||||||
* searchpaths changed to stringqueue object
|
* searchpaths changed to stringqueue object
|
||||||
|
|
||||||
Revision 1.3 1999/11/04 10:55:31 peter
|
Revision 1.3 1999/11/04 10:55:31 peter
|
||||||
|
@ -78,7 +78,7 @@ begin
|
|||||||
WriteResponseFile:=False;
|
WriteResponseFile:=False;
|
||||||
|
|
||||||
{ Open link.res file }
|
{ Open link.res file }
|
||||||
LinkRes.Init(Info.ResName);
|
LinkRes.Init(outputexedir+Info.ResName);
|
||||||
|
|
||||||
{ Write path to search libraries }
|
{ Write path to search libraries }
|
||||||
HPath:=current_module^.locallibrarysearchpath.First;
|
HPath:=current_module^.locallibrarysearchpath.First;
|
||||||
@ -171,13 +171,13 @@ begin
|
|||||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||||
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
||||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||||
Replace(cmdstr,'$RES',current_module^.outpath^+Info.ResName);
|
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||||
Replace(cmdstr,'$STRIP',StripStr);
|
Replace(cmdstr,'$STRIP',StripStr);
|
||||||
success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
|
success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
|
||||||
|
|
||||||
{ Remove ReponseFile }
|
{ Remove ReponseFile }
|
||||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||||
RemoveFile(current_module^.outpath^+Info.ResName);
|
RemoveFile(outputexedir+Info.ResName);
|
||||||
|
|
||||||
MakeExecutable:=success; { otherwise a recursive call to link method }
|
MakeExecutable:=success; { otherwise a recursive call to link method }
|
||||||
end;
|
end;
|
||||||
@ -288,7 +288,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 1999-11-12 11:03:50 peter
|
Revision 1.5 1999-11-16 23:39:04 peter
|
||||||
|
* use outputexedir for link.res location
|
||||||
|
|
||||||
|
Revision 1.4 1999/11/12 11:03:50 peter
|
||||||
* searchpaths changed to stringqueue object
|
* searchpaths changed to stringqueue object
|
||||||
|
|
||||||
Revision 1.3 1999/11/04 10:55:31 peter
|
Revision 1.3 1999/11/04 10:55:31 peter
|
||||||
|
@ -268,7 +268,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ Open link.res file }
|
{ Open link.res file }
|
||||||
LinkRes.Init(Info.ResName);
|
LinkRes.Init(outputexedir+Info.ResName);
|
||||||
|
|
||||||
{ Write path to search libraries }
|
{ Write path to search libraries }
|
||||||
HPath:=current_module^.locallibrarysearchpath.First;
|
HPath:=current_module^.locallibrarysearchpath.First;
|
||||||
@ -383,14 +383,14 @@ begin
|
|||||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||||
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
||||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||||
Replace(cmdstr,'$RES',current_module^.outpath^+Info.ResName);
|
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||||
Replace(cmdstr,'$STRIP',StripStr);
|
Replace(cmdstr,'$STRIP',StripStr);
|
||||||
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
||||||
success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
|
success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
|
||||||
|
|
||||||
{ Remove ReponseFile }
|
{ Remove ReponseFile }
|
||||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||||
RemoveFile(current_module^.outpath^+Info.ResName);
|
RemoveFile(outputexedir+Info.ResName);
|
||||||
|
|
||||||
MakeExecutable:=success; { otherwise a recursive call to link method }
|
MakeExecutable:=success; { otherwise a recursive call to link method }
|
||||||
end;
|
end;
|
||||||
@ -413,7 +413,7 @@ begin
|
|||||||
SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
|
SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
|
||||||
Replace(cmdstr,'$EXE',current_module^.sharedlibfilename^);
|
Replace(cmdstr,'$EXE',current_module^.sharedlibfilename^);
|
||||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||||
Replace(cmdstr,'$RES',current_module^.outpath^+Info.ResName);
|
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||||
success:=DoExec(FindUtil(binstr),cmdstr,true,false);
|
success:=DoExec(FindUtil(binstr),cmdstr,true,false);
|
||||||
|
|
||||||
{ Strip the library ? }
|
{ Strip the library ? }
|
||||||
@ -426,7 +426,7 @@ begin
|
|||||||
|
|
||||||
{ Remove ReponseFile }
|
{ Remove ReponseFile }
|
||||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||||
RemoveFile(current_module^.outpath^+Info.ResName);
|
RemoveFile(outputexedir+Info.ResName);
|
||||||
|
|
||||||
MakeSharedLibrary:=success; { otherwise a recursive call to link method }
|
MakeSharedLibrary:=success; { otherwise a recursive call to link method }
|
||||||
end;
|
end;
|
||||||
@ -435,7 +435,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 1999-11-12 11:03:50 peter
|
Revision 1.5 1999-11-16 23:39:04 peter
|
||||||
|
* use outputexedir for link.res location
|
||||||
|
|
||||||
|
Revision 1.4 1999/11/12 11:03:50 peter
|
||||||
* searchpaths changed to stringqueue object
|
* searchpaths changed to stringqueue object
|
||||||
|
|
||||||
Revision 1.3 1999/11/05 13:15:00 florian
|
Revision 1.3 1999/11/05 13:15:00 florian
|
||||||
|
@ -376,7 +376,7 @@ begin
|
|||||||
WriteResponseFile:=False;
|
WriteResponseFile:=False;
|
||||||
|
|
||||||
{ Open link.res file }
|
{ Open link.res file }
|
||||||
LinkRes.Init(Info.ResName);
|
LinkRes.Init(outputexedir+Info.ResName);
|
||||||
|
|
||||||
{ Write path to search libraries }
|
{ Write path to search libraries }
|
||||||
HPath:=current_module^.locallibrarysearchpath.First;
|
HPath:=current_module^.locallibrarysearchpath.First;
|
||||||
@ -459,7 +459,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
||||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||||
Replace(cmdstr,'$RES',current_module^.outpath^+Info.ResName);
|
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||||
Replace(cmdstr,'$STRIP',StripStr);
|
Replace(cmdstr,'$STRIP',StripStr);
|
||||||
Replace(cmdstr,'$HEAPMB',tostr((maxheapsize+1048575) shr 20));
|
Replace(cmdstr,'$HEAPMB',tostr((maxheapsize+1048575) shr 20));
|
||||||
{Size of the stack when an EMX program runs in OS/2.}
|
{Size of the stack when an EMX program runs in OS/2.}
|
||||||
@ -476,7 +476,7 @@ begin
|
|||||||
|
|
||||||
{ Remove ReponseFile }
|
{ Remove ReponseFile }
|
||||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||||
RemoveFile(current_module^.outpath^+Info.ResName);
|
RemoveFile(outputexedir+Info.ResName);
|
||||||
|
|
||||||
MakeExecutable:=success; { otherwise a recursive call to link method }
|
MakeExecutable:=success; { otherwise a recursive call to link method }
|
||||||
end;
|
end;
|
||||||
@ -485,7 +485,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 1999-11-12 11:03:50 peter
|
Revision 1.4 1999-11-16 23:39:04 peter
|
||||||
|
* use outputexedir for link.res location
|
||||||
|
|
||||||
|
Revision 1.3 1999/11/12 11:03:50 peter
|
||||||
* searchpaths changed to stringqueue object
|
* searchpaths changed to stringqueue object
|
||||||
|
|
||||||
Revision 1.2 1999/11/04 10:55:31 peter
|
Revision 1.2 1999/11/04 10:55:31 peter
|
||||||
|
@ -654,7 +654,7 @@ begin
|
|||||||
WriteResponseFile:=False;
|
WriteResponseFile:=False;
|
||||||
|
|
||||||
{ Open link.res file }
|
{ Open link.res file }
|
||||||
LinkRes.Init(Info.ResName);
|
LinkRes.Init(outputexedir+Info.ResName);
|
||||||
|
|
||||||
{ Write path to search libraries }
|
{ Write path to search libraries }
|
||||||
HPath:=current_module^.locallibrarysearchpath.First;
|
HPath:=current_module^.locallibrarysearchpath.First;
|
||||||
@ -767,7 +767,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
Replace(cmdstr,'$EXE',current_module^.exefilename^);
|
||||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||||
Replace(cmdstr,'$RES',current_module^.outpath^+Info.ResName);
|
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||||
Replace(cmdstr,'$APPTYPE',AppTypeStr);
|
Replace(cmdstr,'$APPTYPE',AppTypeStr);
|
||||||
Replace(cmdstr,'$RELOC',RelocStr);
|
Replace(cmdstr,'$RELOC',RelocStr);
|
||||||
Replace(cmdstr,'$IMAGEBASE',ImageBaseStr);
|
Replace(cmdstr,'$IMAGEBASE',ImageBaseStr);
|
||||||
@ -789,7 +789,7 @@ begin
|
|||||||
{ Remove ReponseFile }
|
{ Remove ReponseFile }
|
||||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||||
begin
|
begin
|
||||||
RemoveFile(current_module^.outpath^+Info.ResName);
|
RemoveFile(outputexedir+Info.ResName);
|
||||||
RemoveFile('base.$$$');
|
RemoveFile('base.$$$');
|
||||||
RemoveFile('exp.$$$');
|
RemoveFile('exp.$$$');
|
||||||
end;
|
end;
|
||||||
@ -839,7 +839,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Replace(cmdstr,'$EXE',current_module^.sharedlibfilename^);
|
Replace(cmdstr,'$EXE',current_module^.sharedlibfilename^);
|
||||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||||
Replace(cmdstr,'$RES',current_module^.outpath^+Info.ResName);
|
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||||
Replace(cmdstr,'$APPTYPE',AppTypeStr);
|
Replace(cmdstr,'$APPTYPE',AppTypeStr);
|
||||||
Replace(cmdstr,'$RELOC',RelocStr);
|
Replace(cmdstr,'$RELOC',RelocStr);
|
||||||
Replace(cmdstr,'$IMAGEBASE',ImageBaseStr);
|
Replace(cmdstr,'$IMAGEBASE',ImageBaseStr);
|
||||||
@ -861,7 +861,7 @@ begin
|
|||||||
{ Remove ReponseFile }
|
{ Remove ReponseFile }
|
||||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||||
begin
|
begin
|
||||||
RemoveFile(current_module^.outpath^+Info.ResName);
|
RemoveFile(outputexedir+Info.ResName);
|
||||||
RemoveFile('base.$$$');
|
RemoveFile('base.$$$');
|
||||||
RemoveFile('exp.$$$');
|
RemoveFile('exp.$$$');
|
||||||
end;
|
end;
|
||||||
@ -1056,7 +1056,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 1999-11-15 15:01:56 pierre
|
Revision 1.8 1999-11-16 23:39:04 peter
|
||||||
|
* use outputexedir for link.res location
|
||||||
|
|
||||||
|
Revision 1.7 1999/11/15 15:01:56 pierre
|
||||||
+ Pavel's changes to support reloc section in exes
|
+ Pavel's changes to support reloc section in exes
|
||||||
|
|
||||||
Revision 1.6 1999/11/12 11:03:50 peter
|
Revision 1.6 1999/11/12 11:03:50 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user