293:6635f14613ba
Anton Shestakov <av6@dwimlabs.net>, Wed, 01 Nov 2017 00:50:57 +0800
Makefile: use file targets more, results in incremental building Less work to do when only some files get changed, but more work when building from scratch. But, multiple compilers can run in parallel.

next change 301:2d95d63792f0
previous change 292:ad418a21d2f1

Makefile

Permissions: -rw-r--r--

Other formats: Feeds:
coffeefiles := $(wildcard coffee/*.coffee)
jsfiles := $(coffeefiles:coffee/%.coffee=js/%.js)
mapfiles := $(jsfiles:.js=.js.map)
npm := npm update && sed -i -e 's@^\#!/usr/bin/env node$$@&js@' ./node_modules/coffee-script/bin/coffee
.PHONY: all
all: build
.PHONY: devel
devel:
$(npm)
node_modules/.bin/coffee:
$(npm)
js/%.js js/%.js.map: coffee/%.coffee node_modules/.bin/coffee
./node_modules/.bin/coffee -o ./js/ -cm $<
.PHONY: build
build: $(jsfiles) $(mapfiles)