fpcmake question

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

fpcmake question

Graeme Geldenhuys-2
Is the following allowed in a Makefile.fpc

[target]
units=unit1 unit2 unit3
dirs_linux=x11
dirs_freebsd=x11
dirs_win32=win32

I have read the docs and know the "dirs" is a valid setting in the
"target" section.   But I have seen somewhere an example where they
included the platform as well in the dirs line, but I can seem to find
any such option mentioned in the fpcmake docs.

Is the above valid?

On Linux and FreeBSD, make will also be run in the "x11" directory.
On Win32, make will be run in the "win32" directory instead.

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

Re: fpcmake question

Darius Blaszyk
Can't answer that one for you (perhaps just try?). But I would suggest you
try using prerules to set a variable. The LCLPLATFORM is such a variable in
the lazarus makefiles;

[prerules]
#
# LCL Platform
ifndef LCL_PLATFORM
ifneq ($(findstring $(OS_TARGET),win32 win64),)
LCL_PLATFORM=win32
else
LCL_PLATFORM=gtk
override COMPILER_UNITDIR+=../lcl/nonwin32
endif
endif
export LCL_PLATFORM


The just use it like $(LCL_PLATFORM).

Ofcourse you need to adjust it for your use.

HTH

Darius


----- Original Message -----
From: "Graeme Geldenhuys" <[hidden email]>
To: "FPC-Pascal users discussions" <[hidden email]>
Sent: Tuesday, August 29, 2006 3:53 PM
Subject: [fpc-pascal] fpcmake question


> Is the following allowed in a Makefile.fpc
>
> [target]
> units=unit1 unit2 unit3
> dirs_linux=x11
> dirs_freebsd=x11
> dirs_win32=win32
>
> I have read the docs and know the "dirs" is a valid setting in the
> "target" section.   But I have seen somewhere an example where they
> included the platform as well in the dirs line, but I can seem to find
> any such option mentioned in the fpcmake docs.
>
> Is the above valid?
>
> On Linux and FreeBSD, make will also be run in the "x11" directory.
> On Win32, make will be run in the "win32" directory instead.
>
> Regards,
>  - Graeme -
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal 

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

Re: fpcmake question

Peter Vreman
In reply to this post by Graeme Geldenhuys-2
> Is the following allowed in a Makefile.fpc
>
> [target]
> units=unit1 unit2 unit3
> dirs_linux=x11
> dirs_freebsd=x11
> dirs_win32=win32
>
> I have read the docs and know the "dirs" is a valid setting in the
> "target" section.   But I have seen somewhere an example where they
> included the platform as well in the dirs line, but I can seem to find
> any such option mentioned in the fpcmake docs.
>
> Is the above valid?
>
> On Linux and FreeBSD, make will also be run in the "x11" directory.
> On Win32, make will be run in the "win32" directory instead.

Correct



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

Re: fpcmake question

Graeme Geldenhuys-2
Thanks Darius & Peter.

I took your advice Darius, and just tried it, and it works.... Using
the dirs_<platform> looks more simplified and easier to read than the
variable method. Well, for me at least - and I only needed it in one
place.

Is the FPC Programmer's Manual somewhere in SubVersion, so I could
update the docs to mention this feature?  Or is this privately
maintained by Michaƫl Van Canneyt.
[http://community.freepascal.org:10000/docs-html/prog/prog.html]

Regards,
  - Graeme -


On 8/30/06, Peter Vreman <[hidden email]> wrote:

> > Is the following allowed in a Makefile.fpc
> >
> > [target]
> > units=unit1 unit2 unit3
> > dirs_linux=x11
> > dirs_freebsd=x11
> > dirs_win32=win32
> >
> > Is the above valid?
> >
> > On Linux and FreeBSD, make will also be run in the "x11" directory.
> > On Win32, make will be run in the "win32" directory instead.
>
> Correct


--
There's no place like 127.0.0.1

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