]> git.donarmstrong.com Git - lilypond.git/blob - Generate.make
release: 0.0.34
[lilypond.git] / Generate.make
1 # Generate.make ?
2 # -> Rules.make: containing all compile/flex/bison/... rules (jcn)
3
4 parsheadorig=$(CCDIR)/parser.tab.h
5 parsheadnew=$(HEADERDIR)/parser.hh
6
7 #
8 # take some trouble to avoid overwriting the old y.tab.h
9 # why? (jcn)
10 $(CCDIR)/parser.cc: $(CCDIR)/parser.y
11         $(BISON) -d $<
12         (if diff  $(parsheadorig) $(parsheadnew)>/dev/null; then \
13                 echo Ignoring $(parsheadorig);  \
14         else \
15                 mv $(parsheadorig) $(parsheadnew); \
16         fi )
17         mv $(CCDIR)/parser.tab.c $@
18
19 $(parsheadnew): $(CCDIR)/parser.cc
20
21 $(HEADERDIR)/version.hh: Variables.make make_version
22         make_version $(MAJVER) $(MINVER) $(PATCHLEVEL) "$(CXX) $(CXXVER)" > $@
23
24 $(CCDIR)/%.cc: $(CCDIR)/%.y
25         $(BISON) -d $<
26         mv $(CCDIR)/$(shell basename $@ .cc ).tab.h $(HEADERDIR)/$(shell basename $@ .cc).hh
27         mv $(CCDIR)/$(shell basename $@ .cc ).tab.c $@
28
29 $(CCDIR)/%.cc: $(CCDIR)/%.l
30         $(FLEX)  -t $< > $@
31