Re: [fpc-pascal] set output directory for resources

2007-05-07 Thread Vincent Snijders

Peter Vreman schreef:

Vincent Snijders schreef:

Hi,

If I compile a unit which contains {$R wincemenures.res} a file named
wincemenures.or is created in the source directory, even if I have set
-FU or -FE. What parameter do I need to pass to the compile to move the
.or file to the unit output directory?

Nobody answered, so I decided to dive into the compiler source myself
and I think always the source directory is used.

Attached patch changes this to the output directory of the currently
compiled module. Is this ok?


ok



Committed in r7276. Can it be merged to the fixes branch?

Vincent
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] set output directory for resources

2007-05-07 Thread Graeme Geldenhuys

On 5/7/07, Vincent Snijders [EMAIL PROTECTED] wrote:


Committed in r7276. Can it be merged to the fixes branch?



That would be great...


--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] set output directory for resources

2007-05-03 Thread Florian Klaempfl
Vincent Snijders schrieb:
 Vincent Snijders schreef:
 Hi,

 If I compile a unit which contains {$R wincemenures.res} a file named
 wincemenures.or is created in the source directory, even if I have set
 -FU or -FE. What parameter do I need to pass to the compile to move
 the .or file to the unit output directory?
 
 Nobody answered, so I decided to dive into the compiler source myself
 and I think always the source directory is used.
 
 Attached patch changes this to the output directory of the currently
 compiled module. Is this ok?

Looks ok.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] set output directory for resources

2007-05-03 Thread Peter Vreman
 Vincent Snijders schreef:
 Hi,

 If I compile a unit which contains {$R wincemenures.res} a file named
 wincemenures.or is created in the source directory, even if I have set
 -FU or -FE. What parameter do I need to pass to the compile to move the
 .or file to the unit output directory?

 Nobody answered, so I decided to dive into the compiler source myself
 and I think always the source directory is used.

 Attached patch changes this to the output directory of the currently
 compiled module. Is this ok?

ok



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] set output directory for resources

2007-05-02 Thread Vincent Snijders

Vincent Snijders schreef:

Hi,

If I compile a unit which contains {$R wincemenures.res} a file named 
wincemenures.or is created in the source directory, even if I have set 
-FU or -FE. What parameter do I need to pass to the compile to move the 
.or file to the unit output directory?


Nobody answered, so I decided to dive into the compiler source myself 
and I think always the source directory is used.


Attached patch changes this to the output directory of the currently 
compiled module. Is this ok?


Vincent
Index: comprsrc.pas
===
--- comprsrc.pas(revision 7246)
+++ comprsrc.pas(working copy)
@@ -89,9 +89,9 @@
  
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
end;
   srcfilepath:=ExtractFilePath(current_module.mainsource^);
+  
resobj:=current_module.outputpath^+ChangeFileExt(ExtractFileName(fname),target_info.resobjext);
   if not path_absolute(fname) then
 fname:=srcfilepath+fname;
-  resobj:=ChangeFileExt(fname,target_info.resobjext);
   s:=target_res.rescmd;
   ObjUsed:=(pos('$OBJ',s)0);
   Replace(s,'$OBJ',maybequoted(resobj));
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] set output directory for resources

2007-05-02 Thread Michael Van Canneyt


On Wed, 2 May 2007, Vincent Snijders wrote:

 Vincent Snijders schreef:
  Hi,
  
  If I compile a unit which contains {$R wincemenures.res} a file named
  wincemenures.or is created in the source directory, even if I have set -FU
  or -FE. What parameter do I need to pass to the compile to move the .or file
  to the unit output directory?
 
 Nobody answered, so I decided to dive into the compiler source myself and I
 think always the source directory is used.
 
 Attached patch changes this to the output directory of the currently compiled
 module. Is this ok?

Yes, it seems to me that this is OK. This should normally obey -FU or -FE.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal