Skip to content
/ mk Public

One-liner "make" targets on the command-line

Notifications You must be signed in to change notification settings

alecthomas/mk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

One-liner make rules on the command-line.

Usage: mk <output> [<output> ...] [: <input> [<input> ...]] [-- <command>...]

Compare timestamps of inputs and outputs, exiting with a non-zero status or executing command if any input is newer than all outputs. If an input or output is a directory, it is recursed into.

If a command is provided it is run through bash -c. If a single command argument is provided it will be run as-is, otherwise all arguments will be joined with shell quoting.

eg.

mk main.o : main.c -- cc -c main.c && \
    mk main : main.o -- cc -o main main.o

Like make, if a command is prefixed with @ it will not be echoed.

Use MK_LOG=trace to see debug output.