php-parser/Makefile
2018-01-17 19:16:06 +02:00

19 lines
288 B
Makefile

PHPFILE=example.php
all: ./parser/php7.go ./parser/scanner.go
rm -f y.output
gofmt -l -s -w *.go
go build
run: all
./php-parser $(PHPFILE)
test: all
go test ./... --cover
./parser/scanner.go: ./parser/scanner.l
golex -o $@ $<
./parser/php7.go: ./parser/php7.y
goyacc -o $@ $<