summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--hicn-plugin/src/CMakeLists.txt5
2 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bc4d63774..6c3f9617a 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,11 @@ OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\
OS_VERSION_ID = $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
endif
+#
+# Git Repo detection
+#
+GIT_INFO = $(shell git -C . rev-parse 2>/dev/null; echo $$?)
+
ifeq ($(shell uname),Darwin)
BUILD_HICNPLUGIN := OFF
PUNTING := OFF
@@ -85,14 +90,16 @@ help:
.PHONY = commit-template
commit-template:
- @git config commit.template $(COMMIT_TEMPLATE_FILE)
+ifeq ($(GIT_INFO),0)
+ git config commit.template $(COMMIT_TEMPLATE_FILE)
+endif
.PHONY = vpp-dep
vpp-dep:
VERSION_PATH=$(VERSIONFILE) sudo -E $(SHELL) scripts/install-vpp.sh
.PHONY = dep
-dep: vpp-dep #commit-template
+dep: vpp-dep
ifeq ($(shell uname),Darwin)
brew install $(MACOS_DEPENDS)
else ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
diff --git a/hicn-plugin/src/CMakeLists.txt b/hicn-plugin/src/CMakeLists.txt
index e05ba1fec..0ba683b11 100644
--- a/hicn-plugin/src/CMakeLists.txt
+++ b/hicn-plugin/src/CMakeLists.txt
@@ -199,6 +199,11 @@ execute_process(
COMMAND ${VPP_HOME}/bin/vapi_c_gen.py ${PROJECT_BINARY_DIR}/vapi/hicn.api.json
COMMAND ${VPP_HOME}/bin/vapi_cpp_gen.py ${PROJECT_BINARY_DIR}/vapi/hicn.api.json
)
+install(
+ FILES ${PROJECT_BINARY_DIR}/vapi/hicn.api.json
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vpp/api/plugins
+ COMPONENT ${HICN_PLUGIN}
+)
##############################################################