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