Makefile: yacc config before make

This commit is contained in:
Mitchell Hashimoto 2014-07-22 15:23:05 -07:00
parent 1dcefba5c4
commit bffdcbaede
1 changed files with 8 additions and 4 deletions

View File

@ -16,27 +16,31 @@ export CGO_CFLAGS CGO_LDFLAGS PATH
default: test
dev: libucl
dev: config/y.go libucl
@sh -c "$(CURDIR)/scripts/build.sh"
libucl: vendor/libucl/$(LIBUCL_NAME)
test: libucl
test: config/y.go libucl
TF_ACC= go test $(TEST) $(TESTARGS) -timeout=10s
testacc: libucl
testacc: config/y.go libucl
@if [ "$(TEST)" = "./..." ]; then \
echo "ERROR: Set TEST to a specific package"; \
exit 1; \
fi
TF_ACC=1 go test $(TEST) -v $(TESTARGS)
testrace: libucl
testrace: config/y.go libucl
TF_ACC= go test -race $(TEST) $(TESTARGS)
updatedeps:
go get -u -v ./...
config/y.go: config/expr.y
cd config/ && \
go tool yacc -p "expr" expr.y
vendor/libucl/libucl.a: vendor/libucl
cd vendor/libucl && \
cmake cmake/ && \