From b7104708e9450ad497f596c9bb3b3bf29f3fc595 Mon Sep 17 00:00:00 2001
From: Don Armstrong <don@donarmstrong.com>
Date: Tue, 31 Dec 2013 09:44:36 -0800
Subject: [PATCH] remove lily/out/parser in rules too to avoid bison problems

---
 debian/rules | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 7e95c5cb7b..bf8c1b240e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,7 +35,10 @@ endif
 	dh $@ --parallel --with autotools-dev --with python2 --with quilt
 
 
-override_dh_auto_configure: 
+## we need to nuke the parser files, because if there is a mistmatch
+## between upstreams bison and our bison, the build will fail epically
+override_dh_auto_configure:
+	rm -f lily/out/parser.*
 	dh_auto_configure -- --disable-checking --enable-debugging $(config_opt)
 
 override_dh_auto_build-indep:
@@ -58,6 +61,11 @@ override_dh_auto_install-arch:
 		$(MAKE) --no-builtin-rules PACKAGE=LILYPOND package=lilypond -C $$dir install $(DOC_OPTIONS) prefix=$(CURDIR)/debian/tmp/usr/; \
 	done;
 
+## we need to nuke the parser files, because if there is a mistmatch
+## between upstreams bison and our bison, the build will fail epically
+override_dh_auto_clean:
+	rm -f lily/out/parser.*
+	dh_auto_clean
 
 ## we need to install only the png, jpg, css, ly and english html
 ## files into the doc-html package, and only the english pdfs into the
-- 
2.39.5