[fpc-pascal] fpmake compiles the same unit multiple times

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Oct 17 12:17:46 CEST 2012


On 17 Oct 2012, at 12:08, Graeme Geldenhuys wrote:

> I'm using FPC 2.6.0 and have a fpmake.pas program for fpGUI. To be
> honest I don't really use it, but to keep it up to date. Anyway, I
> noticed that if I do a 'fpmake build', that fpmake compiles many of my
> units multiple times. Anywhere from 2-4 times. I double checked my
> fpmake.pas unit, and I haven't added those units multiple times in the
> code, so why is fpmake building them more than once?

fpmake does not know about unit dependencies, so it compiles all units once. The compiler may however already compile a unit earlier on because it's required by another unit. At least the trunk version of fpmake supports automatically generating a "build unit" that simply adds all the to be compiled units to the uses clause. It then compiles only this build unit, so that every unit will be compiled only once.


Jonas


More information about the fpc-pascal mailing list