summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-06-09 13:33:24 -0700
committerBen Pfaff <blp@nicira.com>2009-06-09 13:33:24 -0700
commit819a2d4c8adce1af5e77d514a66ed88e7dcb8a43 (patch)
treeb1a6a6f2cb2335b4154bd6ad1fdcc060a91076e4 /debian/rules
parent52db0bbec68ae4177d74cf4f7a9552f7321dac72 (diff)
downloadopenvswitch-819a2d4c8adce1af5e77d514a66ed88e7dcb8a43.tar.gz
debian: Honor "noopt", "parallel=<n>" build options.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules13
1 files changed, 12 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 151822b93..4cf5b388a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,6 +30,17 @@ DATAPATH_CONFIGURE_OPTS =
# Official build number. Leave set to 0 if not an official build.
BUILD_NUMBER = 0
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
configure: configure-stamp
configure-stamp:
dh_testdir
@@ -39,7 +50,7 @@ configure-stamp:
test -e Makefile || \
../configure --prefix=/usr --localstatedir=/var --enable-ssl \
--with-build-number=$(BUILD_NUMBER) \
- $(DATAPATH_CONFIGURE_OPTS))
+ CFLAGS="$(CFLAGS)" $(DATAPATH_CONFIGURE_OPTS))
touch configure-stamp
#Architecture