A simple make implementation for building MaraDNS and other tools.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Sam Trenholme c1c0031e28
MaraDNS 2022-11-18 release
3 months ago
LICENSE This is https://github.com/rmyorston/pdpmake w/o testsuite/ 3 months ago
Makefile Have make target be `maramake`, not `make` 3 months ago
README.md Sync with pdpmake 3 months ago
check.c This is https://github.com/rmyorston/pdpmake w/o testsuite/ 3 months ago
compile.sh A make implementation should compile without make 3 months ago
input.c Update maramake with pdpmake change 3 months ago
macro.c Sync with pdpmake 3 months ago
main.c MaraDNS 2022-11-18 release 3 months ago
make.c Port updates to pdpmake to maramake 3 months ago
make.h Sync with pdpmake 3 months ago
modtime.c This is https://github.com/rmyorston/pdpmake w/o testsuite/ 3 months ago
rules.c Update maramake to be current with pdpmake 3 months ago
target.c Sync with pdpmake 3 months ago
utils.c This is https://github.com/rmyorston/pdpmake w/o testsuite/ 3 months ago

README.md

About this fork

This is a fork of https://github.com/rmyorston/pdpmake

maramake has support for maramake --version (or make --version if renamed make); this allows one to know which version of maramake one is using.

ENABLE_FEATURE_MAKE_EXTENSIONS has been set to 0 in make.h so that this is a mostly POSIX implementation of make.

ENABLE_FEATURE_MAKE_POSIX_202X has been set to 1 in make.h so that maramake can have the characters / and - in makefile targets. See https://github.com/rmyorston/pdpmake/issues/17 for discussion.

If one does not have make, it is possible to compile this with the included compile.sh script.

maramake uses cc as the default value of CC instead of the POSIX-specified c99 value; as it turns out MaraDNS wont compile with c99 because POSIX and socket system calls which MaraDNS needs are not present in the ISO C standard.

This is the official implementation of make to use to compile MaraDNS; note that GNU make works perfectly fine too.

The repo is available at GitHub and Codeberg, and has a web page.

The original README (adapted for maramake) follows:

Public domain POSIX make

This is an implementation of POSIX make.

It comes with its own makefile, naturally, and should build on most modernish Unix-style systems. (Command line options may not work properly due to differences in how getopt(3) is reset. Adjust GETOPT_RESET() in make.h for your platform, if necessary.)

Should one not have make, the script compile.sh will compile the program with the name maramake.

It is possible to enable extensions (they are disabled by default): some from a future POSIX standard and some that are non-POSIX. Generally these extensions are compatible with GNU make:

  • double-colon rules
  • -include to ignore missing include files
  • include files can be created if required
  • ifdef/ifndef/else/endif conditionals
  • lib.a(mem1.o mem2.o...) syntax for archive members
  • :=/::=/:::=/+=/?=/!= macro assignments
  • macro expansions can be nested
  • chained inference rules
  • */?/[] wildcards for filenames in target rules
  • $(SRC:%.c=%.o) pattern macro expansions
  • special handling of MAKE macro
  • $^ and $+ internal macros
  • skip duplicate entries in $^ and $?
  • .PHONY special target
  • -C directory and -j maxjobs command line options

If extensions are enabled adding the .POSIX target to your makefile will disable them. Other versions of make tend to allow extensions even in POSIX mode.

Setting the environment variable PDPMAKE_POSIXLY_CORRECT (its value doesn't matter) or giving the --posix option as the first on the command line also turn off extensions.