[Lazarus] Leftover ppas.sh file

2009-07-14 Thread Graeme Geldenhuys

Hi,

Whenever I do a Quick Compile (Ctrl+Shift+F9 on my system), there is 
always a temp file remaining in the default output directory.


The file is ppas.sh on my Linux system.

Is there a reason why that file remains after the Quick Compiler and 
never gets deleted by Lazarus?  Or is this an oversight (cleanup bug)?



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Henry Vermaak
2009/7/14 Graeme Geldenhuys grae...@opensoft.homeip.net:
 Hi,

 Whenever I do a Quick Compile (Ctrl+Shift+F9 on my system), there is always
 a temp file remaining in the default output directory.

 The file is ppas.sh on my Linux system.

 Is there a reason why that file remains after the Quick Compiler and never
 gets deleted by Lazarus?  Or is this an oversight (cleanup bug)?

This file is created by fpc if you call it with -sh.  Assembler and
linker isn't called, so presumably that's where the quick compile
comes from.

Perhaps fpc needs to accept an argument to -sh that specifies the
script file it needs to create, then lazarus can specify it and delete
it afterwards.

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Graeme Geldenhuys

Thanks for the quick reply Henry.


Henry Vermaak wrote:


This file is created by fpc if you call it with -sh.  Assembler and
linker isn't called, so presumably that's where the quick compile
comes from.


That's correct - or at least that is how I understood it as well. But I 
did not know fpc creates that file.




Perhaps fpc needs to accept an argument to -sh that specifies the
script file it needs to create, then lazarus can specify it and delete
it afterwards.


So is this not maybe an FPC issue then? Why doesn't FPC clean-up after 
itself, or ask the OS for the temp dir location and use that instead?


Alternatively (but I don't think this is the right way to go), Lazarus 
could detect the Quick Compile command and delete the ppas.sh file 
afterwards. The file always seems to be created in the default output 
directory of the binary file.


But as I mentioned, if FPC is the one creating the file, surely it 
should be responsible for clean up afterwards.



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Mattias Gaertner
On Tue, 14 Jul 2009 10:08:01 +0100
Henry Vermaak henry.verm...@gmail.com wrote:

 2009/7/14 Graeme Geldenhuys grae...@opensoft.homeip.net:
  -- 8 --
 
  But as I mentioned, if FPC is the one creating the file, surely it
  should be responsible for clean up afterwards.
 
 The point of -sh is to create a script that can be called afterwards
 by the user.  I've used it many times when I've had linking problems.
 I don't think the name of the file should be hard-wired, though, then
 lazarus can specify a temp file and clean it up properly.

The IDE (mis)uses the -sh option to omit the slow linking stage.
If you know an option to omit creating the linker/assembler files as
well, we can add that.


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Graeme Geldenhuys

Mattias Gaertner wrote:


If you know an option to omit creating the linker/assembler files as
well, we can add that.


If such an option doesn't exist, maybe we can ask the FPC team to extend 
the compiler to support it?



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Mattias Gaertner
On Tue, 14 Jul 2009 13:29:34 +0200
Graeme Geldenhuys grae...@opensoft.homeip.net wrote:

 Mattias Gaertner wrote:
  
  If you know an option to omit creating the linker/assembler files as
  well, we can add that.
 
 If such an option doesn't exist, maybe we can ask the FPC team to
 extend the compiler to support it?

If no one answers maybe we can create a feature request.
If no one implements the feature request maybe we can add a feature
request for the IDE to delete the file.
If no one implements that feature request maybe we can ... 
wait a second.

Sorry, could not resist. ;)

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Henry Vermaak
2009/7/14 Mattias Gaertner nc-gaert...@netcologne.de:
 On Tue, 14 Jul 2009 13:29:34 +0200
 Graeme Geldenhuys grae...@opensoft.homeip.net wrote:

 Mattias Gaertner wrote:
 
  If you know an option to omit creating the linker/assembler files as
  well, we can add that.

 If such an option doesn't exist, maybe we can ask the FPC team to
 extend the compiler to support it?

 If no one answers maybe we can create a feature request.

I'd vote for an fpc feature request: a syntax checking option (like
php -l).  Or maybe just fix -Cn to not produce ppas.sh and link.res?

 If no one implements the feature request maybe we can add a feature
 request for the IDE to delete the file.

Assuming the name of the files (ppas.sh and link.res) might not be a good idea?

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Michael Van Canneyt



On Tue, 14 Jul 2009, Henry Vermaak wrote:


2009/7/14 Mattias Gaertner nc-gaert...@netcologne.de:

On Tue, 14 Jul 2009 13:29:34 +0200
Graeme Geldenhuys grae...@opensoft.homeip.net wrote:


Mattias Gaertner wrote:


If you know an option to omit creating the linker/assembler files as
well, we can add that.


If such an option doesn't exist, maybe we can ask the FPC team to
extend the compiler to support it?


If no one answers maybe we can create a feature request.


I'd vote for an fpc feature request: a syntax checking option (like
php -l).  Or maybe just fix -Cn to not produce ppas.sh and link.res?


The whole idea of -Cn is to have ppas.sh and link.res, so the link.res
can be examined, modified and then call the linker manually.




If no one implements the feature request maybe we can add a feature
request for the IDE to delete the file.


Assuming the name of the files (ppas.sh and link.res) might not be a good idea?


Why not ? It's always those names, and I believe on windows it's always ppas.bat

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leftover ppas.sh file

2009-07-14 Thread Henry Vermaak
2009/7/14 Michael Van Canneyt mich...@freepascal.org:

 The whole idea of -Cn is to have ppas.sh and link.res, so the link.res
 can be examined, modified and then call the linker manually.

I'd say that's what the -s* options are for.  -Cn and -E are aliases
and they seem to do the same thing as -sh, which seems rather daft.

 Why not ? It's always those names, and I believe on windows it's always
 ppas.bat

Because hard-coding file names gives me heartburn.  I'm not a lazarus
dev, though, so they are free to implement this how they like.

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus