php-parser/Makefile

19 lines
294 B
Makefile
Raw Normal View History

PHPFILE=example.php
2017-11-07 06:21:38 +00:00
2017-12-04 10:40:36 +00:00
all: ./parser/parser.go ./parser/scanner.go
2017-11-23 15:33:47 +00:00
rm -f y.output
gofmt -l -s -w *.go
2017-11-07 06:21:38 +00:00
go build
run: all
./php-parser $(PHPFILE)
2017-11-07 06:21:38 +00:00
2017-12-04 10:40:36 +00:00
test: all
2018-01-12 23:59:24 +00:00
go test ./... --cover
2017-12-04 10:40:36 +00:00
./parser/scanner.go: ./parser/scanner.l
2017-11-23 15:33:47 +00:00
golex -o $@ $<
2017-12-04 10:40:36 +00:00
./parser/parser.go: ./parser/parser.y
2017-11-23 15:33:47 +00:00
goyacc -o $@ $<