summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-06-30 11:51:41 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-06-30 18:17:43 +0000
commitb1dab65a087856dc4add42586517c29734c4e1d3 (patch)
treee2b74067da7365cc6e85e92c0e50d56ae69001b6
parent12c6fdc551d2a092dc530639365d9e4ad8493d97 (diff)
top-level Makefile improvements
- auto-execute startup.vpp file if exists - add DPDK_CONFIG=<string> to speficy custom config for autogenerated startup.conf, e.g. DPDK_CONFIG="no-pci" - add DISABLED_PLUGINS=<comma separated list> option e.g. make DISABLED_PLUGINS=dpdk,acl run or export DISABLED_PLUGINS=dpdk,acl make run Change-Id: Ib0891d27aeae16b69b67c4c3e893bb3dbde5e7e1 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--Makefile47
1 files changed, 36 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index af9469590c5..0d21f335c5f 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,25 @@ GDB?=gdb
PLATFORM?=vpp
SAMPLE_PLUGIN?=no
-MINIMAL_STARTUP_CONF="unix { interactive cli-listen /run/vpp/cli.sock gid $(shell id -g) }"
+,:=,
+define disable_plugins
+$(if $(1), \
+ "plugins {" \
+ $(patsubst %,"plugin %_plugin.so { disable }",$(subst $(,), ,$(1))) \
+ " }" \
+ ,)
+endef
+
+MINIMAL_STARTUP_CONF=" \
+unix { \
+ interactive \
+ cli-listen /run/vpp/cli.sock \
+ gid $(shell id -g) \
+ $(if $(wildcard startup.vpp),"exec startup.vpp",) \
+} \
+$(if $(DPDK_CONFIG), "dpdk { $(DPDK_CONFIG) }",) \
+$(call disable_plugins,$(DISABLED_PLUGINS)) \
+"
GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
@@ -139,16 +157,21 @@ help:
@echo " test-checkstyle - check PEP8 compliance for test framework"
@echo ""
@echo "Make Arguments:"
- @echo " V=[0|1] - set build verbosity level"
- @echo " STARTUP_CONF=<path> - startup configuration file"
- @echo " (e.g. /etc/vpp/startup.conf)"
- @echo " STARTUP_DIR=<path> - startup drectory (e.g. /etc/vpp)"
- @echo " It also sets STARTUP_CONF if"
- @echo " startup.conf file is present"
- @echo " GDB=<path> - gdb binary to use for debugging"
- @echo " PLATFORM=<name> - target platform. default is vpp"
- @echo " TEST=<filter> - apply filter to test set, see test-help"
- @echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
+ @echo " V=[0|1] - set build verbosity level"
+ @echo " STARTUP_CONF=<path> - startup configuration file"
+ @echo " (e.g. /etc/vpp/startup.conf)"
+ @echo " STARTUP_DIR=<path> - startup drectory (e.g. /etc/vpp)"
+ @echo " It also sets STARTUP_CONF if"
+ @echo " startup.conf file is present"
+ @echo " GDB=<path> - gdb binary to use for debugging"
+ @echo " PLATFORM=<name> - target platform. default is vpp"
+ @echo " TEST=<filter> - apply filter to test set, see test-help"
+ @echo " DPDK_CONFIG=<conf> - add specified dpdk config commands to"
+ @echo " autogenerated startup.conf"
+ @echo " (e.g. \"no-pci\" )"
+ @echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
+ @echo " DISABLED_PLUGINS=<list> - comma separated list of plugins which"
+ @echo " should not be loaded"
@echo ""
@echo "Current Argument Values:"
@echo " V = $(V)"
@@ -157,7 +180,9 @@ help:
@echo " GDB = $(GDB)"
@echo " PLATFORM = $(PLATFORM)"
@echo " DPDK_VERSION = $(DPDK_VERSION)"
+ @echo " DPDK_CONFIG = $(DPDK_CONFIG)"
@echo " SAMPLE_PLUGIN = $(SAMPLE_PLUGIN)"
+ @echo " DISABLED_PLUGINS = $(DISABLED_PLUGINS)"
$(BR)/.bootstrap.ok:
ifeq ($(findstring y,$(UNATTENDED)),y)