From: John Mandereau <john.mandereau@gmail.com>
Date: Sun, 26 Apr 2009 22:50:49 +0000 (+0200)
Subject: Add makefile rule to generate ly grammar
X-Git-Tag: release/2.12.3-1~108
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=57f17e0946e9975b0c4ac33fc23d4fa472d09bc4;p=lilypond.git

Add makefile rule to generate ly grammar
(cherry picked from commit 156cee13a784ceb26ca0e09c33daac2f724c6170)
---

diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile
index 237bb973a0..60e16bbd12 100644
--- a/Documentation/user/GNUmakefile
+++ b/Documentation/user/GNUmakefile
@@ -137,9 +137,14 @@ $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
 
 $(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi $(outdir)/music-glossary.texi: $(ITELY_FILES) $(ITEXI_FILES)
 
+$(outdir)/lilypond.texi: $(outdir)/ly-grammar.txt
 
 # Rules for the automatically generated documentation
 
+$(outdir)/ly-grammar.txt: $(top-src-dir)/lily/parser.yy
+	cd $(outdir) && $(BISON) -v $<
+	$(auxscript-dir)/yyout2grammar.py $(outdir)/parser.output $@
+
 # There used to be a dependency on a dummy target, to force a rebuild
 # of lilypond-internals every time.  however, this triggers
 # compilation during install, which is a bad thing (tm).