Yes I know the makefiles work, but let me explain:
I recently build some different versions of Lazarus, and impatient as I am, I wanted to speed things up by using makes parallel build feature:
Which resulted in the following error:
/Developer/lazarus/components/lazutils/lazutils.pas(26,3) Fatal: (10022) Can't find unit LazarusPackageIntf used by LazUtils
Meaning the dependencies make uses are not correctly set up. So I looked into the makefile and found the reason:
all: lazbuild lcl basecomponents ide starter
Lazarus depends on the lcl and on basecompontents, which, I think, also depend on the lcl. So the dependencies should be modelled with
all: lazbuild starter
starter: ide
ide: lcl basecomponents
basecomponents: lcl
Also the following:
basecomponents:
$(MAKE) -C components/buildintf
$(MAKE) -C components/debuggerintf
$(MAKE) -C components/lazcontrols
$(MAKE) -C components/ideintf
$(MAKE) -C components/synedit
$(MAKE) -C components/lazdebuggergdbmi
can be solved with makes dependency mechanics (basically creating a goal for each component and having them have requirements)
In general, this makefile looks more like a bash script than anything else, and as a make file this is broken, because it does not correctly model dependencies (a cornerstone of how make works).
The makefiles are generated by fpcmake, so the question arises, does fpcmake generate this make code or are there even technical limitations to this (like fpcmake can't model dependencies like make can) or is possible but just not modelled in the fpcmake input data?
No matter what, these makefiles are pretty broken, because make files should not rely on the order in which their dependencies are listed (because make ignores this order if other constraints exist, or it is used for parallel building).
Building fpc and lazarus together takes rather long (~ 20 minutes) and I just came to the point where I had to build a docker image, experimenting with build options and having to rebuild over and over again. It gets really annoying to wait 20 minutes just to see what effect a single change had
So my final question is, are there any intentions to "fix" the buildsystem, or is the current state just "good enough" and I have to suck it up?