fpmake - append compiler options

classic Classic list List threaded Threaded
5 messages Options
L-9
Reply | Threaded
Open this post in threaded view
|

fpmake - append compiler options

L-9
Using fpmake, how does one append a compiler option like

-dSOMEDEFINE

Or

-xxSomeOptionNotIntegratedYet

I will put this info in the FPMAKE wiki page if it is possible to do.

Regards,
L505
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake - append compiler options

Michael Van Canneyt


On Sat, 26 Jan 2008, L wrote:

> Using fpmake, how does one append a compiler option like
>
> -dSOMEDEFINE
>
> Or
>
> -xxSomeOptionNotIntegratedYet

3 ways:

var
  T : TTarget;
  P : TPackage;

T.Options:='-dSOMEDEFINE';
or
P.Options:='-dSOMEDEFINE';
or
Defaults.Options:='-dSOMEDEFINE';

Maybe in time, we'll add a 'Defines' property.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
L-9
Reply | Threaded
Open this post in threaded view
|

Re: fpmake - append compiler options

L-9
In reply to this post by L-9
I wrote:
> Using fpmake, how does one append a compiler option like
>
> -dSOMEDEFINE
>

Solution:
Target.options:= '-dSOMEDEFINE';
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
L-9
Reply | Threaded
Open this post in threaded view
|

fpmake - compiled unit cleaning

L-9
Michael wrote:
> 3 ways:

Thanks.. added compiler option info to the fpmake wiki page.


Now I'm wondering..when I use "fpmake clean" it doesn't clean any units that were compiled implicitly.. i.e. units that were not called in with AddUnit, but compiled because they were in uses clause of units.  Is this by design that one cannot clean implicitly compiled units, and any ideas how I could clean those units too. Or should one always add all units explicitly with AddUnit that one wants to clean? I'm thinking it may be tedious to AddUnit every "uses" implicit unit and I might be missing some easy way to do that.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake - compiled unit cleaning

Peter Vreman
> Michael wrote:
>> 3 ways:
>
> Thanks.. added compiler option info to the fpmake wiki page.
>
>
> Now I'm wondering..when I use "fpmake clean" it doesn't clean any units that were compiled
> implicitly.. i.e. units that were not called in with AddUnit, but compiled because they were in
> uses clause of units.  Is this by design that one cannot clean implicitly compiled units, and any
> ideas how I could clean those units too. Or should one always add all units explicitly with
> AddUnit that one wants to clean? I'm thinking it may be tedious to AddUnit every "uses" implicit
> unit and I might be missing some easy way to do that.

You have to add all units. Otherwise fpmake does not know that they need to be packed for
distribution.

There is a special AddImplicitUnit() for implicit build units. See e.g. winunits-jedi/fpmake.pp
for a nice trick how to use a buildjwa.pp having also correct dependencies so fpmake can check if
a recompile of the build unit is required.


Peter


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal