Sign in Join

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

Mailing lists / fpc-devel / 2023-01

Make file questions (Makefile.fpc, fpmake.pp, etc)

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Wayne Sherman

Each package directory (./fpc-source/packages/some-package/) typically has these files:
fpmake.pp (where does this come from?)
Makefile (this is generated by FPCMake?)
Makefile.fpc (config file for FPCMake to create Makefile?)

Some package directories also have:
Makefile.fpc.fpcmake (?)

Some questions please:
1) How do I generate the fpmake.pp file? Or is it created by manual coding?
2) Does "Makefile" automatically get generated during a build or do I have to manually run FPCMake?
3) What is "Makefile.fpc.fpcmake" used for and how is it created?
4) Can "fpmake" completely build fpc and all the packages without using "make"?

Thanks in advance,
Wayne Sherman
(developing on Xubuntu 20.04 64-bit)

Reply by email

Sven Barth
to Wayne Sherman

Wayne Sherman via fpc-devel schrieb am
Di., 3. Jan. 2023, 07:36:

Show quoted text 13 lines
Each package directory (./fpc-source/packages/some-package/) typically has these files: fpmake.pp (where does this come from?) Makefile (this is generated by FPCMake?) Makefile.fpc (config file for FPCMake to create Makefile?) Some package directories also have: Makefile.fpc.fpcmake (?) Some questions please: 1) How do I generate the fpmake.pp file? Or is it created by manual coding?

This is created manually and is *the* source for how to build a package.

2) Does "Makefile" automatically get generated during a build or do I

have to manually run FPCMake?

You need to run fpcmake manually.

3) What is "Makefile.fpc.fpcmake" used for and how is it created?

This is the old, manually created build file. It mainly exists as reference to check whether the fpmake.pp was created correctly. The new Makefile.fpc is a general file shared by all packages that simply invokes fpmake (when converted to a Makefile).

4) Can "fpmake" completely build fpc and all the packages without using

"make"?

In theory yes, Joost has implemented and tested that, but we don't use that.

Regards,
Sven

Reply by email

Wayne Sherman
to Sven Barth
AM Sven Barth wrote 8 lines
> 1) How do I generate the fpmake.pp file? Or is it created by manual coding? This is created manually and is *the* source for how to build a package. > 2) Does "Makefile" automatically get generated during a build or do I > have to manually run FPCMake? You need to run fpcmake manually.

Got it. So after moving files and/or directories around in packages/some-package/ one has to:
1) Edit fpmake.pp to make sure it has the correct paths and files
2) Fix up any examples or lazarus project files with the correct paths. (if needed)
3) Run fpcmake -w -Tall from base package directory to regenerate Makefile

Thanks for the assistance.

Reply by email

Sven Barth
to Wayne Sherman

Wayne Sherman schrieb am Mi., 4. Jan. 2023, 01:13:

Show quoted text 19 lines
On Tue, Jan 3, 2023 at 12:17 AM Sven Barth wrote: >> 1) How do I generate the fpmake.pp file? Or is it created by manual coding? > > This is created manually and is *the* source for how to build a package. > >> 2) Does "Makefile" automatically get generated during a build or do I >> have to manually run FPCMake? > > You need to run fpcmake manually. Got it. So after moving files and/or directories around in packages/some-package/ one has to: 1) Edit fpmake.pp to make sure it has the correct paths and files 2) Fix up any examples or lazarus project files with the correct paths. (if needed) 3) Run fpcmake -w -Tall from base package directory to regenerate Makefile

There is no need for 3 if all you do is change something inside the fpmake.pp files and move files around. You only need to really work with fpcmake when you change something in the rtl directory (as that still uses that) or if a new target is added.

Regards,
Sven

Reply by email