aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-01-10 10:57:50 +0100
committerOndrej Fabry <ofabry@cisco.com>2019-01-10 11:05:35 +0100
commit08266e35878f198e2fa59fcfc9f0fc3a4b1dfbf5 (patch)
tree1269acfc3bf6fdd47414eb64da3ecad4865e37d6 /Makefile
parent3ef6f210edcf7dd753733d46ec3f2dd5dc795b61 (diff)
Add support for string types
- strings are now generated as two fields for length and string itself - aliases are now sorted by name to prevent generating different code - dependencies are now managed by dep - binapi files are regenerated using VPP 19.01-rc0~622-g7b01e9e8 - old stats binary api has been deprecated and removed from VPP Change-Id: Ieb8515c73021339a45f407386f8e3d87dcf4469e Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ec01313..fce72ac 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
VERSION ?= $(shell git describe --always --tags --dirty)
+BINAPI_DIR ?= $(shell cd examples/bin_api && pwd)
+VPP_VERSION := $(shell apt-cache show vpp | grep Version: | cut -d' ' -f2-)
+
all: test build examples
install:
@@ -39,10 +42,19 @@ clean:
rm -f extras/libmemif/examples/jumbo-frames/jumbo-frames
rm -f extras/libmemif/examples/raw-data/raw-data
+generate-binapi:
+ @echo "=> generating binapi"
+ @go generate "${BINAPI_DIR}"
+
generate: install
@echo "=> generating code"
cd examples && go generate ./...
+update-vppapi:
+ @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
+
lint:
@echo "=> running linter"
@golint ./... | grep -v vendor | grep -v bin_api || true