From eb70bc0b63a6aae50c7b9ab9fc84b6b0e090428d Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Thu, 9 May 2019 20:45:51 -0700 Subject: [PATCH] LU-12282 build: export IB_OPTIONS before build We need to export any option before dpkg-buildpackage Test-Parameters: trivial Change-Id: I683080e1872c8818ae9c391f5971b5e4488147a6 Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/34843 Tested-by: Jenkins Reviewed-by: Gu Zheng Reviewed-by: Wang Shilong Tested-by: Maloo Reviewed-by: Oleg Drokin --- autoMakefile.am | 20 ++++++++++---------- debian/rules | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/autoMakefile.am b/autoMakefile.am index aeda751..ebf2dca 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -267,6 +267,16 @@ debs: undef.h echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \ echo "Kernel Source: $${KERNEL_SRC}"; \ echo "Kernel Object: $${KERNEL_OBJ}"; \ + if test "x@ENABLEO2IB@" = "xno"; then \ + export IB_OPTIONS="--with-o2ib=no"; \ + else \ + if test "x@ENABLEO2IB@" != "xyes" && \ + test -n "@O2IBPATH@"; then \ + export IB_OPTIONS="--with-o2ib=@O2IBPATH@"; \ + else \ + export IB_OPTIONS="--with-o2ib=yes"; \ + fi; \ + fi; \ dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \ rc=$${PIPESTATUS[0]}; \ [ $${rc} -gt 1 ] && exit $${rc}; \ @@ -287,16 +297,6 @@ debs: undef.h echo "lustre" > usr_share_modass/compliant.list && \ export MA_DIR=$$(pwd)/usr_share_modass && \ KVERS=$${KVERS:-$(LINUXRELEASE)} && \ - if test "x@ENABLEO2IB@" = "xno"; then \ - export IB_OPTIONS="--with-o2ib=no"; \ - else \ - if test "x@ENABLEO2IB@" != "xyes" && \ - test -n "@O2IBPATH@"; then \ - export IB_OPTIONS="--with-o2ib=@O2IBPATH@"; \ - else \ - export IB_OPTIONS="--with-o2ib=yes"; \ - fi; \ - fi; \ export KSRC_TREE=$(LINUX) && \ KSRC=$${KSRC:-$(LINUX_OBJ)} && \ m-a build $${KSRC:+-k $$KSRC} $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre && \ diff --git a/debian/rules b/debian/rules index e2bfbd1..3c2bdbe 100755 --- a/debian/rules +++ b/debian/rules @@ -199,6 +199,7 @@ configure-stamp: autogen-stamp debian/control.main debian/control.modules.in --disable-snmp \ --enable-quota \ $${EXTRAFLAGS} \ + $(EXTRA_OPTIONS) \ ); \ touch $@ -- 1.8.3.1