2018-01-05 11:17:59 +00:00
|
|
|
PHPFILE=example.php
|
2017-11-07 06:21:38 +00:00
|
|
|
|
2018-02-06 10:39:42 +00:00
|
|
|
all: compile run
|
|
|
|
|
|
|
|
build:
|
|
|
|
gofmt -l -s -w **/*.go
|
2017-11-07 06:21:38 +00:00
|
|
|
go build
|
|
|
|
|
2018-02-06 10:39:42 +00:00
|
|
|
run: build
|
2018-01-05 11:17:59 +00:00
|
|
|
./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-02-06 10:39:42 +00:00
|
|
|
compile: ./php5/php5.go ./php7/php7.go ./scanner/scanner.go
|
|
|
|
rm -f y.output
|
|
|
|
|
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-26 13:24:56 +00:00
|
|
|
./php5/php5.go: ./php5/php5.y
|
|
|
|
goyacc -o $@ $<
|
|
|
|
|
|
|
|
./php7/php7.go: ./php7/php7.y
|
2017-11-23 15:33:47 +00:00
|
|
|
goyacc -o $@ $<
|