From ca4eecc66daaf79f45703e3f196e519b620a3395 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 11 Nov 2019 17:32:49 +0000
Subject: [PATCH] debian: Make compiler warnings into errors for unreleased
 builds

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/rules | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/debian/rules b/debian/rules
index 1da344afb..165fe78a9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,12 @@ export LC_ALL=C.UTF-8
 
 include /usr/share/dpkg/default.mk
 
+meson_options =
+
+ifeq ($(DEB_DISTRIBUTION),UNRELEASED)
+meson_options += --werror
+endif
+
 %:
 	dh $@
 
@@ -30,6 +36,7 @@ override_dh_auto_configure:
 		-Dpython=/usr/bin/$$python \
 		-Dsrcdir=src \
 		-Dversion=$(DEB_VERSION) \
+		$(meson_options) \
 	; then \
 		cat _build/meson-logs/meson-log.txt; \
 		exit 1; \
-- 
GitLab