seed7 icon indicating copy to clipboard operation
seed7 copied to clipboard

Makefile Conventions

Open examosa opened this issue 8 months ago • 2 comments

I'm interested in writing a Nix derivation for Seed7. Nixpkgs has a standard environment that simplifies building most Unix programs. It would be somewhat easier to write the derivation if the project better adhered to the GNU conventions for Makefiles. A few examples:

  • The first target should compile the entire program i.e. running make would be equivalent to what is currently make all.
  • check should be the target name for running tests rather than test.
  • Use variables for the installation directories such that the install location can be overridden by the user without patching the Makefile.

Additionally, I think updating the default Makefile to automatically choose a configuration based on the detected platform would be a nice quality-of-life improvement to the installation process. c3d/make-it-quick is a Makefile-based build system that might have some useful ideas for this.

If you're willing to consider other tools, Premake and xmake are both capable of generating cross-platform build files. I'm sure either would reduce the maintenance burden of writing them manually.

Let me know your thoughts!

examosa avatar May 14 '25 21:05 examosa