Recent

Author Topic: [solved] fpcmake  (Read 1186 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3738
    • tomboy-ng, a rewrite of the classic Tomboy
[solved] fpcmake
« on: March 13, 2022, 08:21:16 am »
I understand that the Lazarus Makefiles are generated by fpcmake. And editing a Makefile is not productive as it will be overwritten by the next run of fpcmake. Is that the case ?

Docs indicate its a simple command as used below but not working for me.

Note, This thread is a spin off from https://forum.lazarus.freepascal.org/index.php/topic,58631.msg437004.html but is specifically about using fpcmake

Code: Pascal  [Select][+][-]
  1. dbannon@dell:~/bin/Lazarus/TEST$ fpcmake -Tall
  2. Processing Makefile.fpc
  3. Error: Target "linux", package "rtl" not found

I have built a current main FPC, compiled with fpc322 and am in a dir with lazarus source including the Makefile.fpc -

Code: Bash  [Select][+][-]
  1. dbannon@dell:~/bin/Lazarus/TEST$ which fpcmake
  2. /home/dbannon/bin/FPC/fpc-main/bin/fpcmake
  3.  
  4. dbannon@dell:~/bin/Lazarus/TEST$ ls -la Makefile*
  5. -rw-rw-r-- 1 dbannon dbannon 116393 Mar 12 19:31 Makefile
  6. -rw-rw-r-- 1 dbannon dbannon  15839 Mar 12 09:59 Makefile.fpc
  7. -rw-rw-r-- 1 dbannon dbannon 116451 Mar 12 18:29 Makefile.old
  8.  
  9. dbannon@dell:~/bin/Lazarus/TEST$ fpc -iVSPTPSOTO
  10. 3.3.1 x86_64 x86_64 linux linux

Neither the man page nor the wiki page mention anything about how fpcmake gets its config.  There is a fpcmake.ini but it appears to have mostly make template stuff and is compiled in anyway.

Is there more to using fpcmake (to generate a Makefile for Lazarus) than meets the eye ?

Davo
« Last Edit: March 13, 2022, 11:03:55 am by dbannon »
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2032
  • Former Delphi 1-7, 10.2 user
Re: fpcmake
« Reply #1 on: March 13, 2022, 08:55:24 am »
See: https://wiki.freepascal.org/Fpcmake

Quote
If you regenerate makefiles outside the fpc/ SVN tree, (e.g. for Lazarus in projects), and fpcmake complains it can't find package.fpc for the RTL package, try setting the environment variable FPCDIR to the FPC source directory using commands like the following:

    Unix/Linux/OSX bash/sh

# e.g. if your FPC directory is located in /location/to/fpc:
export FPCDIR=/location/to/fpc

You might also want to use the -v arg to see what it's doing...
« Last Edit: March 13, 2022, 09:06:29 am by trev »

dbannon

  • Hero Member
  • *****
  • Posts: 3738
    • tomboy-ng, a rewrite of the classic Tomboy
Re: fpcmake
« Reply #2 on: March 13, 2022, 09:36:29 am »
Yeah, thanks Trev, I really thought I'd read that page, must have stopped at the bit about having to use trunk and dashed off to install trunk.....

So, that works but does not produce exactly the same Makefile as original, going to have to think about that.  I MUST see exactly the same Makefile before I start editing Makefile.fpc

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018