lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: osx compatibility: stepmake/stepmake/c++-rules.make


From: Johannes Schindelin
Subject: Re: osx compatibility: stepmake/stepmake/c++-rules.make
Date: Fri, 16 Dec 2005 01:23:38 +0100 (CET)

Hi,

On Sun, 11 Dec 2005, Graham Percival wrote:

> Now that we have a DARWIN_BUILD variable defined, can the below patch be
> rewritten using
> if (DARWIN_BUILD) ...
> so that it could be included in the main source?
> 
> I tried doing the same "ifneq (($DARWIN_BUILD),)" that the python patch used,
> but it didn't seem to like having an if statement in the middle of the
> $(outdir) portion.

How about this?

diff --git a/stepmake/stepmake/c++-rules.make b/stepmake/stepmake/c++-rules.make
index 061f630..8dd0c1f 100644
--- a/stepmake/stepmake/c++-rules.make
+++ b/stepmake/stepmake/c++-rules.make
@@ -24,8 +24,14 @@ $(outdir)/%.hh: %.yy
        rm -f $(*F).tab.c $(*F).tab.cc # bison < 1.30
        rm -f $(outdir)/$(*F).cc # avoid recompiling the .cc file 
 
+ifneq ($(DARWIN_BUILD),)
 $(outdir)/%.cc: %.ll
        $(FLEX) -Cfe -p -p -o$@ $< 
+       perl -i.bak -pe 's/^class istream;/#include <iostream>;\nusing 
namespace std;/' $@
+else
+$(outdir)/%.cc: %.ll
+       $(FLEX) -Cfe -p -p -o$@ $< 
+endif
 
 $(outdir)/%-rc.o: $(outdir)/%.rc
        $(WINDRES) $(WINDRES_FLAGS) -o$@ $<




reply via email to

[Prev in Thread] Current Thread [Next in Thread]