]> git.donarmstrong.com Git - lilypond.git/commitdiff
Make parser.cc and parser.hh independently to lessen parallel build problems.
authorDavid Kastrup <dak@gnu.org>
Thu, 22 Dec 2011 18:41:26 +0000 (19:41 +0100)
committerDavid Kastrup <dak@gnu.org>
Sat, 24 Dec 2011 14:12:27 +0000 (15:12 +0100)
lily/GNUmakefile
stepmake/stepmake/c++-rules.make

index 9926316a5547d44d694043b79b7deefb27611c58..71073ce6af644851910f36d130f2cde46e6e9e15 100644 (file)
@@ -14,7 +14,6 @@ MODULE_CXXFLAGS= -Wno-pmf-conversions
 HELP2MAN_EXECS = lilypond
 STEPMAKE_TEMPLATES=c c++ executable po help2man
 
-# list parser.hh first: making parser.hh removes parser.cc
 OUT_DIST_FILES=$(addprefix $(outdir)/,parser.hh parser.cc)
 
 include $(depth)/make/stepmake.make
@@ -64,7 +63,7 @@ $(outdir)/lilypond: $(outdir)/libstdc++.a
 endif
 
 # force these: Make can't know these have to be generated in advance
-$(outdir)/lily-parser.o: $(outdir)/parser.hh
+$(outdir)/lily-parser.o $(outdir)/parser.o: $(outdir)/parser.hh
 $(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
 $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh
 
index 25c1d1207a643b4c5d4eae985d22e499b28b4b6c..a368f4f6669b6e2d223604bce7507c824c4e8f79 100644 (file)
@@ -12,8 +12,13 @@ $(outdir)/%.lo: %.cc
 $(outdir)/%.lo: $(outdir)/%.cc
        $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
 
-$(outdir)/%.cc $(outdir)/%.hh: %.yy
-       $(BISON) -d -o $(subst .hh,.cc,$@)  $<
+$(outdir)/%.cc: %.yy
+       $(BISON) -o $@  $<
+
+$(outdir)/%.hh: %.yy
+       $(BISON) -o $(subst .hh,-tmp.cc,$@) -d  $<
+       rm $(subst .hh,-tmp.cc,$@)
+       mv $(subst .hh,-tmp.hh,$@) $@
 
 $(outdir)/%.cc: %.ll
        $(FLEX) -Cfe -p -p -o$@ $<