php-parser/Makefile

26 lines
379 B
Makefile
Raw Normal View History

PHPFILE=example.php
2017-11-07 08:21:38 +02:00
2018-02-06 12:39:42 +02:00
all: compile run
2018-02-06 19:11:47 +02:00
build:
2018-02-06 12:39:42 +02:00
gofmt -l -s -w **/*.go
2017-11-07 08:21:38 +02:00
go build
2018-02-06 12:39:42 +02:00
run: build
./php-parser $(PHPFILE)
2017-11-07 08:21:38 +02:00
2018-02-06 19:11:47 +02:00
test:
2018-01-13 01:59:24 +02:00
go test ./... --cover
2017-12-04 12:40:36 +02:00
2018-02-06 12:39:42 +02:00
compile: ./php5/php5.go ./php7/php7.go ./scanner/scanner.go
rm -f y.output
2018-01-24 18:42:23 +02:00
./scanner/scanner.go: ./scanner/scanner.l
2017-11-23 17:33:47 +02:00
golex -o $@ $<
2018-01-26 15:24:56 +02:00
./php5/php5.go: ./php5/php5.y
goyacc -o $@ $<
./php7/php7.go: ./php7/php7.y
2017-11-23 17:33:47 +02:00
goyacc -o $@ $<