Sign in Join

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

Mailing lists / fpc-pascal / 2012-08

Easier fpmake

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt

Hi,

As you know, FPC uses fpmake to compile everything in packages.

As I've been steadily improving fcl-passrc for fpdoc, (it's now almost on par with the compiler, barring errors and assembler statetements), I created a small tool pas2fpm which takes as input a bunch of unit names, and outputs a ready-to-go fpmake.pp file.

This means that
pas2fpcm -o fpmake.pp *.pp
is all you need to create a fpmake.pp file. (provided the shell expands wildcards)

It analyses the sources, and creates an fpmake file that contains all units, the units have the correct dependencies (it analyses that too) and sets the UseResourceStrings property.

If a particular source file is not compilable (parseable), it will add it anyway, but with a comment.

The resulting fpmake.pp should compile and do what it needs to do.

The tool can be found in utils/pas2fpm.

I'd be pleased to hear of any comments or suggestions for improvement.

Michael.

Tomas Hajny
to Michael Van Canneyt

On 22 Aug 12, at 19:03, Michael Van Canneyt wrote:

Hi Michael,

Show quoted text 24 lines
As you know, FPC uses fpmake to compile everything in packages. As I've been steadily improving fcl-passrc for fpdoc, (it's now almost on par with the compiler, barring errors and assembler statetements), I created a small tool pas2fpm which takes as input a bunch of unit names, and outputs a ready-to-go fpmake.pp file. This means that pas2fpcm -o fpmake.pp *.pp is all you need to create a fpmake.pp file. (provided the shell expands wildcards) It analyses the sources, and creates an fpmake file that contains all units, the units have the correct dependencies (it analyses that too) and sets the UseResourceStrings property. If a particular source file is not compilable (parseable), it will add it anyway, but with a comment. The resulting fpmake.pp should compile and do what it needs to do. The tool can be found in utils/pas2fpm. I'd be pleased to hear of any comments or suggestions for improvement.

Like support for platforms where wildcards are not expanded by shell? ;-)

Tomas

Unknown author
to Tomas Hajny
Tomas Hajny wrote 32 lines
On 22 Aug 12, at 19:03, Michael Van Canneyt wrote: Hi Michael, > As you know, FPC uses fpmake to compile everything in packages. > > As I've been steadily improving fcl-passrc for fpdoc, > (it's now almost on par with the compiler, barring errors and assembler statetements), > I created a small tool pas2fpm which takes as input a bunch of unit names, > and outputs a ready-to-go fpmake.pp file. > > This means that > pas2fpcm -o fpmake.pp *.pp > is all you need to create a fpmake.pp file. (provided the shell expands > wildcards) > > It analyses the sources, and creates an fpmake file that contains all units, > the units have the correct dependencies (it analyses that too) and sets the > UseResourceStrings property. > > If a particular source file is not compilable (parseable), > it will add it anyway, but with a comment. > > The resulting fpmake.pp should compile and do what it needs to do. > > The tool can be found in utils/pas2fpm. > > I'd be pleased to hear of any comments or suggestions for improvement. Like support for platforms where wildcards are not expanded by shell? ;-)

Good point. I will do so.

Michael.