Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 43 lines (31 sloc) 1.01 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

.PHONY: benchmarks

CC = gcc
LEG = leg
NAME = mojo
BIN = bin/$(NAME)
DEST = /usr/bin
CFILES = src/*.c
CFLAGS = -std=c99
RHINO = java -jar ./ext/js.jar

all: parser build

build:
@$(CC) $(CFLAGS) $(CFILES) -o $(BIN)

parser: src/parser.leg
@$(LEG) < src/parser.leg > src/parser.c

inspect: all
@./$(BIN) < examples/template.html

test: all
@./$(BIN) < spec/fixtures/article.html > spec/fixtures/article.html.js
@./$(BIN) < spec/fixtures/users.html > spec/fixtures/users.html.js
@./$(BIN) < spec/fixtures/profile.html > spec/fixtures/profile.html.js
@./$(BIN) < spec/fixtures/comments.html > spec/fixtures/comments.html.js
@./$(BIN) < spec/fixtures/page.html > spec/fixtures/page.html.js
@./$(BIN) < spec/fixtures/welcome.html > spec/fixtures/welcome.html.js
@./$(BIN) < spec/fixtures/messages.html > spec/fixtures/messages.html.js
@jspec run --rhino

install: $(BIN)
cp $(BIN) $(DEST)/$(NAME)

uninstall: $(DEST)/$(NAME)
rm $(DEST)/$(NAME)

benchmarks:
@$(RHINO) benchmarks/benchmark.js

Something went wrong with that request. Please try again.