Skip to content

Instantly share code, notes, and snippets.

@joewalnes
Forked from seabre/Makefile
Created May 16, 2014 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joewalnes/718e8c6a3d82b0fb61b1 to your computer and use it in GitHub Desktop.
Save joewalnes/718e8c6a3d82b0fb61b1 to your computer and use it in GitHub Desktop.
MODULES := ./node_modules
BIN := $(MODULES)/.bin
.PHONY: install_modules all clean
all: install_modules filtrex.js filtrex.min.js
clean:
rm -f filtrex.js
rm -f filtrex.min.js
rm -f src/grammar.json
rm -f src/parser.js
rm -rf $(MODULES)
install_modules:
npm install
src/grammar.json: src/grammar.js
node $< > $@
src/parser.js: src/grammar.json
$(BIN)/jison -j -o $@ $<
filtrex.js: src/filtrex.js src/parser.js
$(BIN)/browserify -s compileExpression index.js > $@
filtrex.min.js: filtrex.js
$(BIN)/uglifyjs < $< > $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment