Sign in Join

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

Mailing lists / fpc-pascal / 2004-02

fpcmake

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Jon D. Sawyer

Is there a way to get FPC Make to enter its target DIRS before compiling the units in the current directory?

I've got a unit that depends on another unit being compiled first that is in a sub-directory, even though I list the dirs first Make trys to compile the current dir first.

Thx.. ^_^

Peter Vreman
to Jon D. Sawyer
Show quoted text 6 lines
Is there a way to get FPC Make to enter its target DIRS before compiling the units in the current directory? I've got a unit that depends on another unit being compiled first that is in a sub-directory, even though I list the dirs first Make trys to compile the current dir first.

There is no way without hacking the Makefile/fpcmake. You can workaround not having files in the current dir, but also in a subdir.

Unknown author
to Jon D. Sawyer: Is there a way to get FPC Make to enter its target DIRS before compiling the units in the…
Jon D. Sawyer wrote 6 lines
Is there a way to get FPC Make to enter its target DIRS before compiling the units in the current directory? I've got a unit that depends on another unit being compiled first that is in a sub-directory, even though I list the dirs first Make trys to compile the current dir first.

Just enter a rule in the Makefile.fpc:

[Rules]
myunit.ppu: myunit.pp dirname_all

That should do it.

Michael.

Jon D. Sawyer
to Peter Vreman: There is no way without hacking the Makefile/fpcmake. You can workaround not having files…

Thanks Micheal & Peter, I kinda figured that was the case. I think I'll just move it to a sub-directory like you suggested peter because I'd rather not have to re-edit the raw Makefile every time I generate it.

Thanks again!
This newsboard is part of what makes FPC so damn great! All of you guys rawk!

Peter Vreman wrote 16 lines
> Is there a way to get FPC Make to enter its target DIRS before compiling > the units in the current directory? > > I've got a unit that depends on another unit being compiled first that > is in a sub-directory, even though I list the dirs first Make trys to > compile the current dir first. There is no way without hacking the Makefile/fpcmake. You can workaround not having files in the current dir, but also in a subdir. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Peter Vreman
to Jon D. Sawyer
Thanks Micheal & Peter, I kinda figured that was the case. I think I'll just move it to a sub-directory like you suggested peter because I'd rather not have to re-edit the raw Makefile every time I generate it.

re-edit Makefile is not necessary. You can add it also to Makefile.fpc under the [rules] section. That section will be included directly in the generated Makefile