Slightly expand README.
This commit is contained in:
parent
8cb7110099
commit
a29a7207a1
2 changed files with 31 additions and 2 deletions
31
README.md
31
README.md
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# Mk
|
||||

|
||||
|
||||
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
|
||||
|
|
@ -68,6 +68,35 @@ improvements.
|
|||
file. Just stick it directly in the mkfile.
|
||||
1. Pretty colors.
|
||||
|
||||
|
||||
# Usage
|
||||
|
||||
`mk [options] [target] ...`
|
||||
|
||||
## 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)
|
||||
* `-i` Show rules that will execute and prompt before executing.
|
||||
|
||||
|
||||
# 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
|
||||
will be piped into. For example, here's a recipe to add the read numbers from a
|
||||
file and write their mean to another file. Unlike a typical recipe, it's written
|
||||
in Julia.
|
||||
|
||||
```make
|
||||
mean.txt:Sjulia: input.txt
|
||||
println(open("$target", "w"),
|
||||
mean(map(parseint, eachline(open("$prereq")))))
|
||||
```
|
||||
|
||||
# Current State
|
||||
|
||||
Functional, but with some bugs and some unimplemented minor features. Give it a
|
||||
|
|
|
|||
2
mk.go
2
mk.go
|
|
@ -301,7 +301,7 @@ func main() {
|
|||
flag.BoolVar(&dryrun, "n", false, "print commands without actually executing")
|
||||
flag.BoolVar(&shallowrebuild, "r", false, "force building of just targets")
|
||||
flag.BoolVar(&rebuildall, "a", false, "force building of all dependencies")
|
||||
flag.IntVar(&subprocsAllowed, "p", 8, "maximum number of jobs to execute in parallel")
|
||||
flag.IntVar(&subprocsAllowed, "p", 4, "maximum number of jobs to execute in parallel")
|
||||
flag.BoolVar(&interactive, "i", false, "prompt before executing rules")
|
||||
flag.Parse()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue