commits
2023-11-24 | builtin: add single suffix rules mandated by POSIX | Sören Tempel |
2023-11-24 | Add support for single suffix inference rules | Sören Tempel |
2023-11-24 | share: Update variable assignments in builtin.mk | Sören Tempel |
2023-11-22 | Move FileTarget definition from Exec.hs to Eval.hs | Sören Tempel |
2023-11-21 | Eval: Simplify error handling in lookupRule | Sören Tempel |
Clone the repository to access all 96 commits.
mach
A WiP implementation of make(1)
, aims to be compatible with P1003.1™-202x/D3 at some point.
Status
Proof of concept, currently largely untested, buggy, and incomplete.
Roadmap
- ☐ Support for command-line options mandated by POSIX
- ☑ Basic integration with
System.Console.GetOpt
- ☑ Support for specifying targets on the command-line
- ☐ Support for specifying assignments on the command-line
- ☑ Support for the
-f
flag - ☐ Support for all other flags
- ☑ Basic integration with
- ☐ Support for inference rules
- ☑ Parser support
- ☑ Handling of “.s2.s1” inference rules
- ☐ Respect and use `.SUFFIXES" (see special targets below)
- ☑ Handling of “.s1” inference rules
- ☐ Tests
- ☑ Support for command prefixes (
-
,@
,+
)- ☑ Preliminary support for
@
and-
- ☐ Support for
-
- ☐ Support for
.SILENT
/.IGNORE
/…
(see special targets below) - ☐ Tests
- ☑ Preliminary support for
- ☐ Proper support for escaped newlines in commands and assignments
- ☐ Support for macro assignment operators other than
:=
- ☑ Support for macro expansions of the form
$(string1:subst1=[subst2])
- ☐ Support for nested expansions in
string1
- ☐ Support for nested expansions in
- ☐ Support for special targets (e.g.
.PHONY
) - ☐ Support for internal macros (e.g.
$@
,$%
, …) - ☐ Support for specifying assignments on the command-line
- ☐ Support for default rules (e.g. for C compilation)
- ☐ Support for environment variables (e.g.
MAKEFLAGS
) - ☐ Support for libraries (prerequisites with parentheses)
Installation
This software is designed to work with GHC 9.4.7 without requiring any external dependency, i.e. only relying on the bundled library versions. If this GHC version is installed, mach can be installed by cloning the repository and running the following command from the repository root:
$ cabal install
Related Work
- The original Make paper by Stuart I. Feldman
- Plan 9’s rewrite of make, called mk
- A re-implementation of Plan 9 mk in Haskell
- A Linux port of NetBSD make
- The make implementation provided by the GNU project
- remake, an enhanced version of GNU make
- pdpmake, a implementation of POSIX make written from scratch in C
License
This work is licensed under CC BY-NC-SA 4.0.