diff --git a/README.md b/README.md index de3f380..1197026 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ Mk is a reboot of the Plan 9 mk command, which itself is [a successor to make](http://www.cs.tufts.edu/~nr/cs257/archive/andrew-hume/mk.pdf). This tool is for anyone who loves make, but hates all its stupid bullshit. -# Installation +## Installation 1. Install Go. 2. Run `go get github.com/dcjones/mk` 3. Make sure `$GOPATH/bin` is in your `PATH`. -# Why Plan 9 mk is better than make +## Why Plan 9 mk is better than make Way back in the 90s, some smart guys at Bell Labs got together and decided to write new operating system to replace Unix. The idea was to keep everything that @@ -43,13 +43,14 @@ elegant, and powerful. To name a few specifics: `<|sh config.sh`. 1. A generalized mechanism to determine if a target is out of date, for when timestamps won't cut it. - 1. Variables are expanded in recipes only if they are defined. They way you + 1. Variables are expanded in recipes only if they are defined. That way you usually don't have to escape `$`. -And much more! Read [Maintaining Files on Plan 9 with -Mk](http://doc.cat-v.org/plan_9/4th_edition/papers/mk) for good overview. +And much more! +Read [Maintaining Files on Plan 9 with Mk](http://doc.cat-v.org/plan_9/4th_edition/papers/mk) +for good overview. -# Improvements over Plan 9 mk +## Improvements over Plan 9 mk This mk stays mostly faithful to Plan 9, but makes a few (in my opinion) improvements. @@ -72,21 +73,21 @@ improvements. 1. Pretty colors. -# Usage +## Usage `mk [options] [target] ...` -## Options +### Options * `-f filename` Use the given file as the mkfile. * `-n` Dry run, print commands without actually executing. * `-r` Force building of the immediate targets. * `-a` Force building the targets and of all their dependencies. - * `-p` Maximum number of jobs to execute in parallel (default: 8) + * `-p` Maximum number of jobs to execute in parallel (default: # CPU cores) * `-i` Show rules that will execute and prompt before executing. -# Non-shell recipes +## Non-shell recipes Non-shell recipes are a major addition over Plan 9 mk. They can be used with the `S[command]` attribute, where `command` is an arbitrary command that the recipe @@ -100,7 +101,7 @@ mean.txt:Sjulia: input.txt mean(map(parseint, eachline(open("$prereq"))))) ``` -# Current State +## Current State Functional, but with some bugs and some unimplemented minor features. Give it a try and see what you think!