From ae9b8d637bae923bf8069f5e0f9bdb327bb98559 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 22 Dec 2011 19:41:26 +0100 Subject: [PATCH] Make parser.cc and parser.hh independently to lessen parallel build problems. --- lily/GNUmakefile | 3 +-- stepmake/stepmake/c++-rules.make | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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$@ $< -- 2.39.2