summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2011-12-22 19:41:26 +0100
committerDavid Kastrup <dak@gnu.org>2011-12-24 15:12:27 +0100
commitae9b8d637bae923bf8069f5e0f9bdb327bb98559 (patch)
tree27dd1e1e66a45978dd13dfe542312ec507373f64
parent2f25894efd8ad242b233d5a1d07afcfa087ebab2 (diff)
Make parser.cc and parser.hh independently to lessen parallel build problems.
-rw-r--r--lily/GNUmakefile3
-rw-r--r--stepmake/stepmake/c++-rules.make9
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$@ $<