Skip to content

Commit

Permalink
Extended Makefile to handle coffee recompilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsmith committed May 3, 2013
1 parent 7b208ac commit 3d4e833
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
COFFEE ?= node_modules/.bin/coffee

all:
node_modules/.bin/coffee -cbo lib/ src/
SRC := src
OUT_DIR := lib

SCRIPTS = $(patsubst $(SRC)/%.coffee, \
$(OUT_DIR)/%.js, \
$(wildcard $(SRC)/*.coffee))

.SUFFIXES:
.PHONY: all clean

all: $(SCRIPTS)

$(OUT_DIR)/%.js : $(SRC)/%.coffee | $(OUT_DIR)
$(COFFEE) -cb -o $(OUT_DIR) $^

$(OUT_DIR) :
mkdir -p $@

clean:
rm -rf lib/
rm -rf $(OUT_DIR)

0 comments on commit 3d4e833

Please sign in to comment.