[lazarus] Question about makefile and makefile.fpc

Peter Vreman peter at freepascal.org
Sat Jan 26 07:17:31 EST 2002


At 01:26 26-1-02, you wrote:
>Greetings,
>
>I have been pulling my hair out trying to get a good setup of Win32 to
>build Lazarus. Still not sure it is possible.
>
>I have run across several kinks with regards to the Makefile.
>
>Currently we are running:
>
>     fpcmake -w
>
>every time we run make in a directory.
>
>The problem is that the simple command:
>
>     fpcmake -w
>
>will not work UNLESS you have additional directories in your FPC
>installation which would correspond to the actual source location for
>the various packages. Since we are not doing that in our Linux RPM and
>Win32 installs it causes no end of problems.
>
>The only way around it would be to have it do a
>
>     fpcmake -w -T$(OS_TARGET)
>
>That would build the Makefile just fine BUT it would only build it with
>the package information for that platform. Then if that gets committed
>people on Linux could be checking out a Win32 Makefile, etc. etc. etc.
>yadda, yadda, yadda. It gets to be a mess.

This is a known issue that we already discussed with the fpc developpers. 
The final solution that we are going to implement is:

"fpcmake -w" builds only for the current target. There will be a check 
added to the generated Makefile that compares the current target with the 
targets that the Makefile supports, when this doesn't match an error will 
be returned

"fpcmake -w -Tall" builds a Makefile for all targets

The automatic rebuild of required packages that are not yet build will be 
removed from the generated Makefile

Typing "make makefiles" from the topdir will build all Makefiles 
automatically for the current target. To generate the top Makefile i'll 
look if we can supply a bootstrap makefile



>My question is,
>
>   Why are we forcing it to build a new Makefile every time we run make?
>
>Doesn't make much sense since that means that make you are running is
>building a new Makefile that you are not running.   :-\
>
>Can we remove this from the Makefile.fpc so that this problem goes away.
>It means you will have to run fpcmake if you make changes to
>Makefile.fpc but you should be doing that anyway.
>
>The other problem I get, at least in Win32, is convoluted compiler
>directives from Make. It seems that it compounds the various -Fu and -Fi
>calls as it goes down through the Make process. Should it do that? I'm
>not sure if the Linux setup does it, since I haven't been playing with
>that, but the Win32 sure does. There will be times when it will repeat
>the whole -gl -Fu..... -Fi..... -d386 sequence 3 times

This is a bug. If you know how i can reproduce this i can look at it.

>.
>
>The other reason why I think something is a miss in the setup is because
>of a compile problem. If I do a make from the top level Lazarus
>directory it will build the LCL and components fine but when it tries to
>build lazarus.pp it stops when trying to use a synedit unit. Even though
>the unit is listed in the call and all the synedit files were previously
>compiled OK it fails stating that it wants to rebuild it but can't find
>the source.
>
>Now here is the catch. If I go into the LCL directory and do a make it
>builds the LCL fine. If I go into the components and do a make it builds
>the components fine. Now if I go to the top level and do a 'make ide' it
>works and doesn't complain about the synedit file.???????  :-\  :-\
>Only if I do a make which equates to a 'make all'
>
>It builds Lazarus for Win32, it crashes but it does at least get built.
>
>I have spent a day and half putzing with this thing, far more time than
>I have available for this right now. Does ANYONE have a clue as to what
>is going on?
>
>It's a shame. We have something really nice in Linux and absolutely
>nothing that we can show in Win32.   :-(

I've a patch for the Makefile.fpc/Makefiles to add support for lazarus/lcl 
and that fixes the synedit problem (missing gtk dependency). Also the 
rebuilding of the Makefiles is easier and works better. The previous 
rebuild check was an addition in the Makefile.fpc files and not added by 
fpcmake.

I already submitted the changes to Marc. He replied that he would look at 
it when he was back from a ski-trip. But if you want i can commit these 
Makefile.fpc changes


Peter






More information about the Lazarus mailing list