Sign in Join

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

Mailing lists / lazarus / 2010-06

Exists a macro to FPC path to file?

13 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Marcos Douglas

I need use the sources of FPC/Lazarus in external HD. So, the FPC path is changed in differents computers.
Is possible to use a macro to point to FPC path (in variable of system) at fpc.cfg file?

eg:

Instead this:

-FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/ -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/* -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/rtl

use this:

-Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/
-Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/*
-Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/rtl

I already use the PPC_CONFIG_PATH variable to fpc.cfg file. Would be a variable to FPC path...

Thanks,
Marcos Douglas

Reply by email

Michael Van Canneyt
to Marcos Douglas
Marcos Douglas wrote 21 lines
I need use the sources of FPC/Lazarus in external HD. So, the FPC path is changed in differents computers. Is possible to use a macro to point to FPC path (in variable of system) at fpc.cfg file? eg: Instead this: -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/ -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/* -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/rtl use this: -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/ -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/* -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/rtl I already use the PPC_CONFIG_PATH variable to fpc.cfg file. Would be a variable to FPC path...

If the compiler does not recognize a variable, it will search for it in the environment. So all you must do is set the variable in the environment.

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
If the compiler does not recognize a variable, it will search for it in the environment. So all you must do is set the variable in the environment.

Umm, I learned something new today - that's very handy to know. I hope this is documented somewhere. ;-)

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Marcos Douglas
to Michael Van Canneyt: If the compiler does not recognize a variable, it will search for it in the environment.…
Michael Van Canneyt wrote 29 lines
On Mon, 21 Jun 2010, Marcos Douglas wrote: > I need use the sources of FPC/Lazarus in external HD. So, the FPC path > is changed in differents computers. > Is possible to use a macro to point to FPC path (in variable of > system) at fpc.cfg file? > > eg: > > Instead this: > > -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/ > -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/* > -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/rtl > > use this: > > -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/ > -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/* > -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/rtl > > I already use the PPC_CONFIG_PATH variable to fpc.cfg file. Would be a > variable to FPC path... If the compiler does not recognize a variable, it will search for it in the environment. So all you must do is set the variable in the environment.

Did not work.

I created PPC_SOURCE_PATH variable at the system.
PPC_SOURCE_PATH = c:\freepascal\fpc\2.5.1

In fpc.cfg, I replaced:
-Fu$PPC_SOURCE_PATH/$FPCVERSION/units/$FPCTARGET/

Error on compile. The Lazarus not found the system unit... and I did not use the macro at Enviroment/Options of Lazarus. I replace only in fpc.cfg, for now.

Marcos Douglas

Reply by email

Michael Van Canneyt
to Marcos Douglas
Marcos Douglas wrote 43 lines
On Mon, Jun 21, 2010 at 11:42 AM, Michael Van Canneyt wrote: > > > On Mon, 21 Jun 2010, Marcos Douglas wrote: > >> I need use the sources of FPC/Lazarus in external HD. So, the FPC path >> is changed in differents computers. >> Is possible to use a macro to point to FPC path (in variable of >> system) at fpc.cfg file? >> >> eg: >> >> Instead this: >> >> -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/ >> -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/* >> -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/rtl >> >> use this: >> >> -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/ >> -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/* >> -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/rtl >> >> I already use the PPC_CONFIG_PATH variable to fpc.cfg file. Would be a >> variable to FPC path... > > If the compiler does not recognize a variable, it will search for it in > the environment. So all you must do is set the variable in the environment. > Did not work. I created PPC_SOURCE_PATH variable at the system. PPC_SOURCE_PATH = c:\freepascal\fpc\2.5.1 In fpc.cfg, I replaced: -Fu$PPC_SOURCE_PATH/$FPCVERSION/units/$FPCTARGET/ Error on compile. The Lazarus not found the system unit... and I did not use the macro at Enviroment/Options of Lazarus. I replace only in fpc.cfg, for now.

Strange.
Apparently it happens only when substituting the {$I %VARIABLE%}. I assumed it happens also in the config file :/

Well, maybe this is an easy-to-implement feature :-)

Michael.

Reply by email

Marcos Douglas
to Michael Van Canneyt: Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I assumed it…
Michael Van Canneyt wrote 5 lines
Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I assumed it happens also in the config file :/ Well, maybe this is an easy-to-implement feature :-)

Well... dosen't work :/
Maybe this is very easy to implement, but with who I can talk about it?

Hans-Peter Diettrich wrote 10 lines
Marcos Douglas schrieb: > I created PPC_SOURCE_PATH variable at the system. > PPC_SOURCE_PATH = c:\freepascal\fpc\2.5.1 > > In fpc.cfg, I replaced: > -Fu$PPC_SOURCE_PATH/$FPCVERSION/units/$FPCTARGET/ Now you have the version (2.5.1) twice in -Fu - no wonder that it doesn't work.

Yes, you right. But I commited mistake only here. In my system the variable PPC_SOURCE_PATH is equal to c:\freepascal\fpc ... sorry for that...
Well.. still not working :/

Marcos Douglas.

Reply by email

Marcos Douglas
to Michael Van Canneyt: Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I assumed it…
Michael Van Canneyt wrote 5 lines
Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I assumed it happens also in the config file :/ Well, maybe this is an easy-to-implement feature :-)

Do not exists a system variable for FPC like PPC_CONFIG_PATH exists for fpc.cfg file? It is more simple, for me.

Thanks,
Marcos Douglas.

Reply by email

jarcmaster
to Marcos Douglas

hi, how do I UNSUSCRIBE from this?

Marcos Douglas wrote 21 lines
On Mon, Jun 21, 2010 at 12:25 PM, Michael Van Canneyt wrote: > > Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I > assumed it happens also in the config file :/ > > Well, maybe this is an easy-to-implement feature :-) Do not exists a system variable for FPC like PPC_CONFIG_PATH exists for fpc.cfg file? It is more simple, for me. Thanks, Marcos Douglas. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100621/ec24a48f/attachment.html>

Reply by email

Marcos Douglas
to Marcos Douglas: On Mon, Jun 21, 2010 at 12:25 PM, Michael Van Canneyt Do not exists a system variable for…
Marcos Douglas wrote 10 lines
On Mon, Jun 21, 2010 at 12:25 PM, Michael Van Canneyt wrote: > > Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I > assumed it happens also in the config file :/ > > Well, maybe this is an easy-to-implement feature :-) Do not exists a system variable for FPC like PPC_CONFIG_PATH exists for fpc.cfg file? It is more simple, for me.

If this feature do not exists, where I could write this sugestion? Here, in Lazarus list, or there is a formal place to do that?

Thanks,
Marcos Douglas.

Reply by email

Mattias Gaertner
to Marcos Douglas
Show quoted text 14 lines
On Mon, Jun 21, 2010 at 4:36 PM, Marcos Douglas wrote: > On Mon, Jun 21, 2010 at 12:25 PM, Michael Van Canneyt > wrote: >> >> Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I >> assumed it happens also in the config file :/ >> >> Well, maybe this is an easy-to-implement feature :-) > > Do not exists a system variable for FPC like PPC_CONFIG_PATH exists > for fpc.cfg file? It is more simple, for me. If this feature do not exists, where I could write this sugestion? Here, in Lazarus list, or there is a formal place to do that?

FPC extensions can be added as feature requests to the fpc bug tracker. Or ask on the fpc lists.

Mattias

Reply by email

Marcos Douglas
to Mattias Gaertner
Mattias Gaertner wrote 21 lines
On Tue, 22 Jun 2010 10:28:26 -0300 Marcos Douglas wrote: > On Mon, Jun 21, 2010 at 4:36 PM, Marcos Douglas wrote: > > On Mon, Jun 21, 2010 at 12:25 PM, Michael Van Canneyt > > wrote: > >> > >> Strange. Apparently it happens only when substituting the {$I %VARIABLE%}. I > >> assumed it happens also in the config file :/ > >> > >> Well, maybe this is an easy-to-implement feature :-) > > > > Do not exists a system variable for FPC like PPC_CONFIG_PATH exists > > for fpc.cfg file? It is more simple, for me. > > If this feature do not exists, where I could write this sugestion? > Here, in Lazarus list, or there is a formal place to do that? FPC extensions can be added as feature requests to the fpc bug tracker. Or ask on the fpc lists.

Okay, I will post the same text in FPC list, thanks.

Marcos Douglas

Reply by email