improve Makefile allow call make run PHPFILE=/path/to/php/file/to/parse

This commit is contained in:
vadim 2018-01-05 13:17:59 +02:00
parent c99f15a646
commit 7ee3f616f8

View File

@ -3,6 +3,7 @@
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
# blame: jnml, labs.nic.cz # blame: jnml, labs.nic.cz
PHPFILE=example.php
all: ./parser/parser.go ./parser/scanner.go all: ./parser/parser.go ./parser/scanner.go
rm -f y.output rm -f y.output
@ -10,7 +11,7 @@ all: ./parser/parser.go ./parser/scanner.go
go build go build
run: all run: all
./php-parser example.php ./php-parser $(PHPFILE)
test: all test: all
go test ./test/... go test ./test/...