File watcher for make

Usage no npm install needed!

<script type="module">
  import awake from '';



... is a file watcher which reruns your make targets when their dependent files change.


Ensure to have Node.js installed.

npm install -g awake


awake example

awake will search for a Makefile in your current working directory and read its targets from it. You can specify an alternative directory to look up using the --directory option:

# Uses ./ as cwd

# Uses ../example as cwd
awake --directory ../example

You're able to whitelist (`--include`) and blacklist (`--exclude`) targets:

# Only run dst.txt and foo.html (and not hello.png)
awake --include dst.txt,foo.html

# Allow every taget except hello.png
awake --exclude hello.png

Under the hood

`awake` uses make's `--print-data-base` option to get a "compiled" version of the makefile which lists all targets and the files on which they depend.
By default `awake` will run `make -pn` in your cwd but you can also read the output from a file:
make -pn > make-pn.txt
awake --make-database make-pn.txt