d/rules: allow external override of base dpdk configuration 30/1730/1
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 23 Jun 2016 07:47:13 +0000 (09:47 +0200)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 23 Jun 2016 14:39:48 +0000 (16:39 +0200)
By using := instead of = users that rebuild our packaging can overwrite
the following via environment variables:
  DPDK_CONFIG
  RTE_MACHINE
  RTE_TARGET

That is already used by some consumers of the Ubuntu packaging to get
optimized build, but would allow them to go on without a patch on top.
Also since it is a no-op, as long as the variables are not set, it is
fairly safe.

Change-Id: I26265c09c90d33a6e4cd37f8c26ac0ef5baac0c4
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
debian/rules

index e8bf409..fa9cf7e 100755 (executable)
@@ -24,14 +24,16 @@ export EXTRA_CFLAGS = -g -fPIC
 # package maintainers to append LDFLAGS
 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+# People rebuilding this package can overwrite DPDK_CONFIG, RTE_MACHINE and
+# RTE_TARGET via environment variables if they like
 ifneq (,$(filter $(DEB_HOST_ARCH), arm64))
-DPDK_CONFIG = "arm64-armv8a-linuxapp-gcc"
-RTE_MACHINE = "armv8a"
-RTE_TARGET = "arm64-armv8a-linuxapp-gcc"
+DPDK_CONFIG := "arm64-armv8a-linuxapp-gcc"
+RTE_MACHINE := "armv8a"
+RTE_TARGET := "arm64-armv8a-linuxapp-gcc"
 else
-DPDK_CONFIG = "$(DEB_HOST_GNU_CPU)-native-linuxapp-gcc"
-RTE_MACHINE = "default"
-RTE_TARGET = "$(DEB_HOST_GNU_CPU)-default-linuxapp-gcc"
+DPDK_CONFIG := "$(DEB_HOST_GNU_CPU)-native-linuxapp-gcc"
+RTE_MACHINE := "default"
+RTE_TARGET := "$(DEB_HOST_GNU_CPU)-default-linuxapp-gcc"
 endif
 DPDK_STATIC_DIR = "debian/build/static-root"
 DPDK_SHARED_DIR = "debian/build/shared-root"