Extend ebuild to specify "configure" subdir, enable verify for sample-plugin
Change-Id: I2056e5d19bc3713e7a13e015dabf3b2431800973 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
f1ff5ff104
commit
686c1c8454
2
Makefile
2
Makefile
@@ -423,6 +423,8 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),ubuntu-16.04)
|
|||||||
$(call banner,"Building for PLATFORM=vpp using clang")
|
$(call banner,"Building for PLATFORM=vpp using clang")
|
||||||
@make -C build-root CC=clang PLATFORM=vpp TAG=vpp_clang wipe-all install-packages
|
@make -C build-root CC=clang PLATFORM=vpp TAG=vpp_clang wipe-all install-packages
|
||||||
endif
|
endif
|
||||||
|
$(call banner,"Building sample-plugin")
|
||||||
|
@make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
|
||||||
$(call banner,"Building $(PKG) packages")
|
$(call banner,"Building $(PKG) packages")
|
||||||
@make pkg-$(PKG)
|
@make pkg-$(PKG)
|
||||||
@make test
|
@make test
|
||||||
|
5
build-data/packages/sample-plugin.mk
Normal file
5
build-data/packages/sample-plugin.mk
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
sample-plugin_source = src
|
||||||
|
sample-plugin_configure_subdir = examples/sample-plugin
|
||||||
|
sample-plugin_configure_depend = vpp-install
|
||||||
|
sample-plugin_CPPFLAGS = $(call installed_includes_fn, vpp)
|
||||||
|
sample-plugin_LDFLAGS = $(call installed_libs_fn, vpp)
|
@@ -579,7 +579,7 @@ image_extra_dependencies = $($(PLATFORM)_image_extra_dependencies)
|
|||||||
### dbarach
|
### dbarach
|
||||||
|
|
||||||
configure_package_gnu = \
|
configure_package_gnu = \
|
||||||
s=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \
|
s=$(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR) ; \
|
||||||
if [ ! -f $$s/configure ] ; then \
|
if [ ! -f $$s/configure ] ; then \
|
||||||
autoreconf -i -f $$s ; \
|
autoreconf -i -f $$s ; \
|
||||||
fi ; \
|
fi ; \
|
||||||
@@ -635,7 +635,8 @@ configure_check_timestamp = \
|
|||||||
mkdir -p $(PACKAGE_INSTALL_DIR) ; \
|
mkdir -p $(PACKAGE_INSTALL_DIR) ; \
|
||||||
conf="$(TIMESTAMP_DIR)/$(CONFIGURE_TIMESTAMP)" ; \
|
conf="$(TIMESTAMP_DIR)/$(CONFIGURE_TIMESTAMP)" ; \
|
||||||
dirs="$(call package_mk_fn,$(PACKAGE)) \
|
dirs="$(call package_mk_fn,$(PACKAGE)) \
|
||||||
$(wildcard $(call find_source_fn,$(PACKAGE_SOURCE))/configure) \
|
$(wildcard $(call find_source_fn, \
|
||||||
|
$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)/configure) \
|
||||||
$(MU_BUILD_ROOT_DIR)/config.site" ; \
|
$(MU_BUILD_ROOT_DIR)/config.site" ; \
|
||||||
if [[ $(call find_newer_fn, $${conf}, $${dirs}, $?) ]]; then \
|
if [[ $(call find_newer_fn, $${conf}, $${dirs}, $?) ]]; then \
|
||||||
$(configure_package) ; \
|
$(configure_package) ; \
|
||||||
@@ -747,6 +748,7 @@ GIT = git
|
|||||||
# Multiple packages may use a single source tree.
|
# Multiple packages may use a single source tree.
|
||||||
# For example, gcc-bootstrap package shares gcc source.
|
# For example, gcc-bootstrap package shares gcc source.
|
||||||
PACKAGE_SOURCE = $(if $($(PACKAGE)_source),$($(PACKAGE)_source),$(PACKAGE))
|
PACKAGE_SOURCE = $(if $($(PACKAGE)_source),$($(PACKAGE)_source),$(PACKAGE))
|
||||||
|
PACKAGE_SUBDIR = $(if $($(PACKAGE)_configure_subdir),/$($(PACKAGE)_configure_subdir),)
|
||||||
|
|
||||||
# Use git to download source if directory is not found
|
# Use git to download source if directory is not found
|
||||||
find_source_for_package = \
|
find_source_for_package = \
|
||||||
|
@@ -92,9 +92,7 @@ _(SAMPLE_MACSWAP_ENABLE_DISABLE_REPLY, sample_macswap_enable_disable_reply)
|
|||||||
|
|
||||||
static int api_sample_macswap_enable_disable (vat_main_t * vam)
|
static int api_sample_macswap_enable_disable (vat_main_t * vam)
|
||||||
{
|
{
|
||||||
sample_test_main_t * sm = &sample_test_main;
|
|
||||||
unformat_input_t * i = vam->input;
|
unformat_input_t * i = vam->input;
|
||||||
f64 timeout;
|
|
||||||
int enable_disable = 1;
|
int enable_disable = 1;
|
||||||
u32 sw_if_index = ~0;
|
u32 sw_if_index = ~0;
|
||||||
vl_api_sample_macswap_enable_disable_t * mp;
|
vl_api_sample_macswap_enable_disable_t * mp;
|
||||||
|
Reference in New Issue
Block a user