Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-08

fpcmake question

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

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 -

Darius Blaszijk
to Graeme Geldenhuys

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

Earlier message 30 lines
----- Original Message ----- From: "Graeme Geldenhuys" To: "FPC-Pascal users discussions" 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 - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Peter Vreman
to Graeme Geldenhuys: Is the following allowed in a Makefile.fpc [target] units=unit1 unit2 unit3 dirs_linux=x11
Show quoted text 17 lines
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

Graeme Geldenhuys
to Peter Vreman

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 -

Peter Vreman wrote 14 lines
> 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