From: David Kastrup Date: Thu, 22 Dec 2011 18:41:26 +0000 (+0100) Subject: Make parser.cc and parser.hh independently to lessen parallel build problems. X-Git-Tag: release/2.15.24-1~64 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ae9b8d637bae923bf8069f5e0f9bdb327bb98559;p=lilypond.git Make parser.cc and parser.hh independently to lessen parallel build problems. --- diff --git a/lily/GNUmakefile b/lily/GNUmakefile index 9926316a55..71073ce6af 100644 --- a/lily/GNUmakefile +++ b/lily/GNUmakefile @@ -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 diff --git a/stepmake/stepmake/c++-rules.make b/stepmake/stepmake/c++-rules.make index 25c1d1207a..a368f4f666 100644 --- a/stepmake/stepmake/c++-rules.make +++ b/stepmake/stepmake/c++-rules.make @@ -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$@ $<