Public domain POSIX make

This is a public domain implementation of make which follows the POSIX standard.

If you've got here I assume you know what make is and why you might want to use it. If not, Chris Wellons has a nice Tutorial on Portable Makefiles.

The code is based on Neil Russell's public domain make, as submitted to the Usenet newsgroups net.sources and mod.sources in 1986. The basic data structures and algorithms remain but everything else has changed. This version is also dedicated to the public domain.

The problem with make is that it's a tool for developers, and developers like to tinker with their tools. There are therefore many slightly different versions of make around. POSIX attempts to standardise their common behaviour but leaves a lot of the details unspecified or implementation dependent. It's also rather lax, in that it allows extensions to exist provided they don't interfere with the specified functionality.

This version tries to stick to the POSIX standard. The default build from source includes a number of extensions but a key feature of the program is that it can be switched to a strictly POSIX-compliant mode at runtime. This can be achieved in several ways:

Extensions from a future POSIX standard are included. These remain subject to change until the standard is finally published.

Some additional extensions are also provided. These are all compatible with GNU make, though some are supported by other implementations.

To make POSIX mode more convenient to use certain inconvenient limitations can be relaxed through the use of pragmas. These can be specified in two ways:

Available pragmas are:

Allow '-' as a valid character in macro names.
Allow '-' and '/' as a valid characters in target names.
Don't treat the '#' character as introducing a comment in commands in target or inference rules.
Permit an empty suffix in macro expansions of the form $(VAR:=.c).
Enforce the future POSIX 202X standard rather than the current POSIX 2017. In this case the macro_name and target_name pragmas aren't required as the future standard will allow the additional characters.

Specifying the .PRAGMA special target with no prerequisites restores the default behaviour.

The most recent source tarball is pdpmake-1.4.1.tgz. The release notes describe recent changes.

Source is also available in a Git repository mirrored on GitHub, Gitlab and with (IPv6 only):

   git clone git://

Future POSIX and non-POSIX extensions can be enabled separately by setting the build flags ENABLE_FEATURE_MAKE_EXTENSIONS and ENABLE_FEATURE_MAKE_POSIX_202X to 1. Setting both flags to 1 is equivalent to the default configuration, except that the future POSIX standard is enforced in POSIX mode rather than the current standard.

Bug reports can be submitted via GitHub, GitLab or by email to the address below.

Remember, though, this is just a bunch of zeroes and ones you happened to find on the internet. If it does anything useful that's an unexpected bonus.

Ron Yorston
3rd February 2022 (updated 1st February 2023)