aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-02-08 01:16:32 +0100
committerOndrej Fabry <ofabry@cisco.com>2019-02-08 01:16:32 +0100
commitfa21c9d726ebb807895a8571af9a16dab5cd8d6e (patch)
tree4597d483f90e374e89f3923324b531a56217a0f9 /Makefile
parent8ba70a7b13950593aab9863246f830eda450f06b (diff)
Generator improvements and cleanup
- generator now supports include-comments flag (as opt-in) - minor code cleanup in binapi-generator - remove obsolete unit tests - flatten examples from examples/cmd folder - introduce constant for checking compatibility in future versions Change-Id: I3545f2ba4b869a3b51d6d0de7e742f3f1e1be392 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 12 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index fce72ac..e5ae92e 100644
--- a/Makefile
+++ b/Makefile
@@ -6,21 +6,22 @@ VPP_VERSION := $(shell apt-cache show vpp | grep Version: | cut -d' ' -f2-)
all: test build examples
install:
- @echo "=> installing ${VERSION}"
+ @echo "=> installing binapi generator ${VERSION}"
go install ./cmd/binapi-generator
build:
- @echo "=> building ${VERSION}"
+ @echo "=> building binapi generator ${VERSION}"
cd cmd/binapi-generator && go build -v
examples:
@echo "=> building examples"
- cd examples/cmd/simple-client && go build -v
- cd examples/cmd/stats-client && go build -v
- cd examples/cmd/perf-bench && go build -v
+ cd examples/simple-client && go build -v
+ cd examples/stats-api && go build -v
+ cd examples/perf-bench && go build -v
+ cd examples/union-example && go build -v
test:
- @echo "=> testing"
+ @echo "=> running tests"
go test -cover ./cmd/...
go test -cover ./core ./api ./codec
@@ -34,9 +35,10 @@ extras:
clean:
@echo "=> cleaning"
rm -f cmd/binapi-generator/binapi-generator
- rm -f examples/cmd/perf-bench/perf-bench
- rm -f examples/cmd/simple-client/simple-client
- rm -f examples/cmd/stats-client/stats-client
+ rm -f examples/perf-bench/perf-bench
+ rm -f examples/simple-client/simple-client
+ rm -f examples/stats-api/stats-api
+ rm -f examples/union-example/union-example
rm -f extras/libmemif/examples/gopacket/gopacket
rm -f extras/libmemif/examples/icmp-responder/icmp-responder
rm -f extras/libmemif/examples/jumbo-frames/jumbo-frames
@@ -51,7 +53,7 @@ generate: install
cd examples && go generate ./...
update-vppapi:
- @echo "=> updating API JSON files using installed VPP (${VPP_VERSION})"
+ @echo "=> updating API JSON files using installed VPP ${VPP_VERSION}"
@cd ${BINAPI_DIR} && find . -type f -name '*.api.json' -exec cp /usr/share/vpp/api/'{}' '{}' \;
@echo ${VPP_VERSION} > ${BINAPI_DIR}/VPP_VERSION