PMake a new build tool

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PMake a new build tool

Darius Blaszyk-2
Hi,

I would like to inform everyone interested here that I just made a beta release (v0.0.2) of a build tool I have been developing for some of my projects which is called PMake.
PMake is inspired on FPMake and CMake, but much easier in its use (as far as I am concerned). It compiles build "script" code into a "make" tool and regenerates the build tools on demand. A nice feature is autogenerating the build scripts, based on the files in the source tree. You can also do out-of-source builds and install files and package files (ZIP only for now). PMake parses the output of FPC to create visually more distinctive output.
The basic concept are collections of unit files called libraries. These libraries are labelled symbolically. The labels are used to assign dependencies. It's also possible to create dependencies on generated output (revision number to source file for instance) and compiled files, then generating output even (some tool that generates an output file in turn). There even much more...

The project is located here: https://github.com/daar/pmake

Please test if you like, comment if you have an idea or ignore if you're not interested...

Rgds, Darius

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: PMake a new build tool

silvioprog
On Wed, Feb 27, 2019 at 7:13 PM Darius Blaszyk <[hidden email]> wrote:
Hi,

Hi Darius.
 
I would like to inform everyone interested here that I just made a beta release (v0.0.2) of a build tool I have been developing for some of my projects which is called PMake.
PMake is inspired on FPMake and CMake, but much easier in its use (as far as I am concerned). It compiles build "script" code into a "make" tool and regenerates the build tools on demand. A nice feature is autogenerating the build scripts, based on the files in the source tree. You can also do out-of-source builds and install files and package files (ZIP only for now). PMake parses the output of FPC to create visually more distinctive output.
The basic concept are collections of unit files called libraries. These libraries are labelled symbolically. The labels are used to assign dependencies. It's also possible to create dependencies on generated output (revision number to source file for instance) and compiled files, then generating output even (some tool that generates an output file in turn). There even much more...

The project is located here: https://github.com/daar/pmake

This is great news!

I'm familiar to CMake and your tool looks like a lot its script syntax. :-)

I've looked for something like this to automate the build of some projects I'm maintaining, so I have some questions:

Could it build a Delphi-based project too? If so, does it allows to select the build for a specific platform/config? (e.g: Win32/Release)

Could I link the build of an external 3rd party project to automate it inside a PMake-based project? For example, supposing I have a C library using CMake-based build, could this library be built while (before or after) the PMake builds the Pascal project? ( something like CMake's ExternalProject_Add() and, optionally, some alternative to ExternalProject_Get_Property() )

Please test if you like, comment if you have an idea or ignore if you're not interested...

Rgds, Darius

I liked it. (y)

It probably will help me a lot to automate the build of interlinked projects simultaneously using two or three commands. :-)

--
Silvio Clécio

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: PMake a new build tool

Darius Blaszyk-2
Hi Silvio,

I've looked for something like this to automate the build of some projects I'm maintaining, so I have some questions:

Could it build a Delphi-based project too? If so, does it allows to select the build for a specific platform/config? (e.g: Win32/Release)

By executing 'pmake --compiler <delphi-compiler-path>', it should be easily possible to build Delphi projects (I don't have Delphi so I cannot test). The compiler path will be stored in the PMakeLists.txt cache (in the $(PMAKE_PAS_COMPILER) variable) and used every time again for the build. It should also be possible to use different compilers by setting the $(PMAKE_PAS_COMPILER) variable in the PMake script. PMake allows for option variables to be set in PMake.txt (at any level). See also the PMake project:

option('WITH_DEBUG', 'Enable debug info for PMake', _ON_);
Could I link the build of an external 3rd party project to automate it inside a PMake-based project? For example, supposing I have a C library using CMake-based build, could this library be built while (before or after) the PMake builds the Pascal project? ( something like CMake's ExternalProject_Add() and, optionally, some alternative to ExternalProject_Get_Property() )

I believe you should use add_custom_command for this. It will create a package for you that you can add as dependency to a library or executable. Only after the dependency is resolved, the remaining build will continue. If you test and have an example, please make a pull request so it can be added for prosperity.
 
I liked it. (y)
Thanks! Glad you like it. I hope that others find it as useful and easy to use as me.
 
It probably will help me a lot to automate the build of interlinked projects simultaneously using two or three commands. :-)
The nice thing about PMake is that it also works when pulling together two different projects using PMake. You only need to use add_directory (and the correct dependencies of course) to get get a working build. 

Rgds, Darius

Virus-free. www.avg.com

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal