lilypond-0.0.35
[lilypond.git] / Generate.make
blob0b1e6c490d20a11ef254fb584bef536cd57a321a
1 # Generate.make ?
2 # -> Rules.make: containing all compile/flex/bison/... rules (jcn)
4 parsheadorig=$(CCDIR)/parser.tab.h
5 parsheadnew=$(HEADERDIR)/parser.hh
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 $@
19 $(parsheadnew): $(CCDIR)/parser.cc
21 $(HEADERDIR)/version.hh: Variables.make make_version
22 make_version $(MAJVER) $(MINVER) $(PATCHLEVEL) "$(CXX) $(CXXVER)" > $@
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 $@
29 $(CCDIR)/%.cc: $(CCDIR)/%.l
30 $(FLEX) -t $< > $@