php-parser/Makefile

19 lines
309 B
Makefile
Raw Normal View History

PHPFILE=example.php
2017-11-07 06:21:38 +00:00
2018-01-25 15:42:15 +00:00
all: ./php7parser/parser.go ./scanner/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
2018-01-24 16:42:23 +00:00
./scanner/scanner.go: ./scanner/scanner.l
2017-11-23 15:33:47 +00:00
golex -o $@ $<
2018-01-25 15:42:15 +00:00
./php7parser/parser.go: ./php7parser/parser.y
2017-11-23 15:33:47 +00:00
goyacc -o $@ $<