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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Graham Percival-2
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.


(compile patch from fink... the other fink patches aren't necessary to
simply compile lilypond)

diff -ruN lilypond-2.7.11-orig/stepmake/stepmake/c++-rules.make
lilypond-2.7.11/stepmake/stepmake/c+
+-rules.make
--- lilypond-2.7.11-orig/stepmake/stepmake/c++-rules.make      
2005-10-02 09:14:45.000000000 -0700
+++ lilypond-2.7.11/stepmake/stepmake/c++-rules.make    2005-10-02
09:15:10.000000000 -0700
@@ -26,6 +26,7 @@

  $(outdir)/%.cc: %.ll
         $(FLEX) -Cfe -p -p -o$@ $<
+       perl -i.bak -pe 's/^class istream;/#include <iostream>;\nusing
namespace std;/' $@

  $(outdir)/%-rc.o: $(outdir)/%.rc
         $(WINDRES) $(WINDRES_FLAGS) -o$@ $<



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

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

Johannes Schindelin
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$@ $<


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

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

Han-Wen Nienhuys
Johannes Schindelin wrote:
>  
> +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

this is getting out of hand.  I will not accept gratuitous ifdefs all
over the code. Complain with the fink maintainers for shipping a broken
flex.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

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

Johannes Schindelin
Hi,

On Fri, 16 Dec 2005, Han-Wen Nienhuys wrote:

> this is getting out of hand.  I will not accept gratuitous ifdefs all
> over the code. Complain with the fink maintainers for shipping a broken
> flex.

Well, I do not mind not having it in CVS. But it was worth sending to the
list, because Darwin/MacOSX people (still a minority) can apply it
themselves.

Besides, fink is no longer maintained for 10.2.8 as far as I know.

In related news:

[PATCH] Some find(1) programs always require a path

---

 GNUmakefile.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

6f1ecf8e6f11c29724ac1252c71c3432a8eee842
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 33c9afb..3548dc0 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -81,7 +81,7 @@ local-WWW-post:
  cat $(outdir)/weblist | (cd $(top-build-dir); tar -cf-  -T- ) | \
  tar -C $(outdir)/web-root/ -xf -  
  cd $(outdir)/web-root/ &&  \
- for a in `find -name out-www`; do \
+ for a in `find . -name out-www`; do \
  mv $$a/* $$a/.. ; \
  rmdir $$a ; \
  done
--
0.99.9.GIT


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

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

Graham Percival-2
In reply to this post by Han-Wen Nienhuys

On 15-Dec-05, at 4:46 PM, Han-Wen Nienhuys wrote:

> Johannes Schindelin wrote:
>>  +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
>
> this is getting out of hand.  I will not accept gratuitous ifdefs all
> over the code. Complain with the fink maintainers for shipping a
> broken flex.

I think it would be nice to allow people to build lilypond without
requiring them to copy patches from fink cvs (either web-cvs or
/sw/fink/10.3/finkinfo/blah/foo/text/lilypond-devel.patch ).

How's this?  There's a "darwin.patch" file in the root of the lilypond
source tree, which doesn't appear to have been modified since March
2002.  I don't think those patches are necessary.  Could we replace
those patches with build-necessary OSX patches?  ie not the changes to
the info directories (which is clearly a "play nice with fink" fink
patch); just the parts of the fink patch that is necessary to build
lilypond.

We don't need to change the existing fink patch; I'll just add portions
of the fink patch to that file so that people can use it if they wish.  
Yes, this only applies to half a dozen people, but I think it's still a
nice thing to do.

Cheers,
- Graham



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

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

Han-Wen Nienhuys
Graham Percival
> We don't need to change the existing fink patch; I'll just add portions
> of the fink patch to that file so that people can use it if they wish.  

go ahead.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel