Sign in Join

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

Mailing lists / fpc-pascal / 2008-10

How to auto create the $fpctarget directory

5 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

Hi,

How can I auto create the $fpctarget directory? Just specifying ../lib/$fpctarget/ and then compiling the project doesn't create the needed directory, and I get the following build error. I gather the compiler itself doesn't create this become
an option? Alternatively, is there some why I can query the $fpctarget and then in the build scripts for Linux, Windows and *BSD create the correct output paths, because I actually start the compile?

./build.sh
Compiling Release Version
Compiling X11 CoreLib
Free Pascal Compiler version 2.2.3 [2008/08/08] for i386 Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling corelib/x11/fpgui_toolkit.pas
Compiling ./corelib/fpg_base.pas
Compiling corelib/x11/fpg_impl.pas
fpg_impl.pas(37) Error: Can't create object file: ../lib/i386-linux/fpg_impl.o fpg_impl.pas(37) Fatal: Can't create object ../lib/i386-linux/fpg_impl.o Fatal: Compilation aborted
Error: /opt/fpc_2.2.3/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)

Regards,
- Graeme -

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

Henry Vermaak
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
Hi, How can I auto create the $fpctarget directory? Just specifying ../lib/$fpctarget/ and then compiling the project doesn't create the needed directory, and I get the following build error. I gather the compiler itself doesn't create this become an option? Alternatively, is there some why I can query the $fpctarget and then in the build scripts for Linux, Windows and *BSD create the correct output paths, because I actually start the compile?

echo `fpc -iTP`-`fpc -iTO` gives the same string for $fpctarget, i think. i also think the compiler should auto create the output directories.

henry

Graeme Geldenhuys
to Henry Vermaak
Henry Vermaak wrote
echo `fpc -iTP`-`fpc -iTO` gives the same string for $fpctarget, i think.

Thanks, I'll give it a try...

i also think the compiler should auto create the output directories.

Yeah, that would be really nice! :-)

Regards,
- Graeme -

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

Mattias Gärtner
to Henry Vermaak: echo `fpc -iTP`-`fpc -iTO` gives the same string for $fpctarget, i think. i also think…

Zitat von Henry Vermaak :

Show quoted text 8 lines
On 01/10/2008, Graeme Geldenhuys wrote: > Hi, > > How can I auto create the $fpctarget directory? Just specifying > ../lib/$fpctarget/ and then compiling the project doesn't create the > needed directory, and I get the following build error. I gather the > compiler itself doesn't create this become > an option?

Which output directory do you mean?
The unit output directory of the project is auto created by the IDE since 16284. Do you mean the output directory of the binary?

Show quoted text 7 lines
> Alternatively, is there some why I can query the $fpctarget > and then in the build scripts for Linux, Windows and *BSD create the > correct output paths, because I actually start the compile? echo `fpc -iTP`-`fpc -iTO` gives the same string for $fpctarget, i think. i also think the compiler should auto create the output directories.

Mattias

Graeme Geldenhuys
to Mattias Gärtner
Mattias Gärtner wrote
Which output directory do you mean? The unit output directory of the project is auto created by the IDE since 16284.

It's the unit output directory. I know it Lazarus it works perfectly (smile), but it's when you compile a fresh checkout of fpGUI from the command line that it fails.

I managed to update the build.sh script for unix type OS's, using Henry's example. It now creates the unit output directory if it doesn't exist. I don't know windows batch files very well (or at least haven't done it in years), so need to read up a bit on how I can do the same there.

Either way, I still think it would be handy if the compiler can create the directories as needed.

Regards,
- Graeme -

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