[PATCH] Assorted fixes for macosx 10.2.8

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

[PATCH] Assorted fixes for macosx 10.2.8

Johannes Schindelin

These fixes are in my private tree to fix several issues with the
compilation:

- fix in-tree compilation of user documentation
- fix dependency on FlexLexer.h
- lexer-gcc-3.1.sh does not work for me, so I have my own
- to compile the midi extension for python, special flags are needed

One very ugly fix is to comment out the display-music things in
music-functions-init.ly. Even if a comment in that file says that
upgrading to a new guile version should help, it didn't. (Strange
enough, on Linux it helped).

A big bug which haunted me for a long time is gone with Python 2.3:
when compiling examples.itely, the regexp handling would choke on
a string which was longer than a certain fixed size (IIRC 32kB).

So, maybe configure should fail when Python is older than 2.3?

Signed-off-by: Johannes Schindelin <[hidden email]>

---

 Documentation/user/GNUmakefile      |    1 +
 lily/GNUmakefile                    |    3 ++-
 ly/music-functions-init.ly          |   12 ++++++------
 my-lexer-gcc-3.1.sh                 |   10 ++++++++++
 stepmake/stepmake/compile-vars.make |   10 +++++++---
 stepmake/stepmake/generic-vars.make |    5 +++++
 6 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile
index 6ab1df3..9b9821a 100644
--- a/Documentation/user/GNUmakefile
+++ b/Documentation/user/GNUmakefile
@@ -43,6 +43,7 @@ info: $(INFO_FILES)
 
 pathsettings:
  @echo export PATH=$(PATH)
+ @echo export LILYPOND_DATADIR=$(LILYPONDPREFIX)
  @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
  @echo export PYTHONPATH=$(PYTHONPATH)
 
diff --git a/lily/GNUmakefile b/lily/GNUmakefile
index 8d2e91a..fb9192e 100644
--- a/lily/GNUmakefile
+++ b/lily/GNUmakefile
@@ -67,10 +67,11 @@ endif
 
 # force these: Make can't know these have to be generated in advance
 $(outdir)/lily-parser.o: $(outdir)/parser.hh
-$(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
+$(outdir)/lily-lexer.o: $(outdir)/parser.hh
 $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh
 
 ifneq ($(FLEXLEXER_FILE),)
+$(outdir)/lily-lexer.o: $(outdir)/FlexLexer.h
 $(outdir)/FlexLexer.h: $(FLEXLEXER_FILE) $(config_h)
  cp $< $@
 endif
diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
index 798f466..50f5b07 100644
--- a/ly/music-functions-init.ly
+++ b/ly/music-functions-init.ly
@@ -51,12 +51,12 @@ displayMusic =
 %% FIXME: guile-1.7 required?
 %#(use-modules (scm display-lily))invalid module name for use-syntax ((srfi srfi-39))
 
-#(use-modules (scm display-lily))
-#(display-lily-init parser)
-displayLilyMusic =
-#(def-music-function (parser location music) (ly:music?)
-   (display-lily-music music)
-   music)
+%#(use-modules (scm display-lily))
+%#(display-lily-init parser)
+%displayLilyMusic =
+%#(def-music-function (parser location music) (ly:music?)
+%   (display-lily-music music)
+%   music)
 
 applyOutput =
 #(def-music-function (parser location proc) (procedure?)
diff --git a/my-lexer-gcc-3.1.sh b/my-lexer-gcc-3.1.sh
new file mode 100644
index 0000000..c781409
--- /dev/null
+++ b/my-lexer-gcc-3.1.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd "$(dirname "$0")/lily"
+
+rm out/lexer.cc 2>/dev/null
+make out/lexer.cc
+mv out/lexer.cc out/lexer.cc.orig
+cat out/lexer.cc.orig | sed 's/^class istream;$/#include <iostream>\
+using namespace std;/' > out/lexer.cc
+
diff --git a/stepmake/stepmake/compile-vars.make b/stepmake/stepmake/compile-vars.make
index b39499b..9af6eb5 100644
--- a/stepmake/stepmake/compile-vars.make
+++ b/stepmake/stepmake/compile-vars.make
@@ -3,10 +3,14 @@ ARFLAGS = ru
 ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS) $(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)
 
 PIC_FLAGS = -fpic -fPIC
-ifeq ($(MINGW_BUILD),)
-SHARED_FLAGS = -shared
-else
+ifneq ($(MINGW_BUILD),)
 SHARED_FLAGS = -mdll
+else
+ifneq ($(DARWIN_BUILD),)
+SHARED_FLAGS = -bundle -flat_namespace -framework Python
+else
+SHARED_FLAGS = -shared
+endif
 endif
 
 o-dep-out = $(outdir)/$(subst .o,.dep,$(notdir $@))#
diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make
index fc7e89e..0de08f8 100644
--- a/stepmake/stepmake/generic-vars.make
+++ b/stepmake/stepmake/generic-vars.make
@@ -111,3 +111,8 @@ endif
 ifeq ($(HOST_ARCH),i386-mingw32)
 MINGW_BUILD = yes
 endif
+
+ifeq ($(HOST_ARCH),ppc-darwin)
+DARWIN_BUILD = yes
+endif
+


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

Re: [PATCH] Assorted fixes for macosx 10.2.8

Graham Percival-2
I don't understand most of these patch, but I found the
stepmake/stepmake/*-vars.make  patches very useful.  (I can now compile
lily again!  :)    Han-Wen, could I apply those?

- Graham

On 3-Dec-05, at 3:54 AM, Johannes Schindelin wrote:

> ---
>
>  Documentation/user/GNUmakefile      |    1 +
>  lily/GNUmakefile                    |    3 ++-
>  ly/music-functions-init.ly          |   12 ++++++------
>  my-lexer-gcc-3.1.sh                 |   10 ++++++++++
>  stepmake/stepmake/compile-vars.make |   10 +++++++---
>  stepmake/stepmake/generic-vars.make |    5 +++++
>  6 files changed, 31 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/user/GNUmakefile
> b/Documentation/user/GNUmakefile
> index 6ab1df3..9b9821a 100644
> --- a/Documentation/user/GNUmakefile
> +++ b/Documentation/user/GNUmakefile
> @@ -43,6 +43,7 @@ info: $(INFO_FILES)
>
>  pathsettings:
>   @echo export PATH=$(PATH)
> + @echo export LILYPOND_DATADIR=$(LILYPONDPREFIX)
>   @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
>   @echo export PYTHONPATH=$(PYTHONPATH)
>
> diff --git a/lily/GNUmakefile b/lily/GNUmakefile
> index 8d2e91a..fb9192e 100644
> --- a/lily/GNUmakefile
> +++ b/lily/GNUmakefile
> @@ -67,10 +67,11 @@ endif
>
>  # force these: Make can't know these have to be generated in advance
>  $(outdir)/lily-parser.o: $(outdir)/parser.hh
> -$(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
> +$(outdir)/lily-lexer.o: $(outdir)/parser.hh
>  $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh
>
>  ifneq ($(FLEXLEXER_FILE),)
> +$(outdir)/lily-lexer.o: $(outdir)/FlexLexer.h
>  $(outdir)/FlexLexer.h: $(FLEXLEXER_FILE) $(config_h)
>   cp $< $@
>  endif
> diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
> index 798f466..50f5b07 100644
> --- a/ly/music-functions-init.ly
> +++ b/ly/music-functions-init.ly
> @@ -51,12 +51,12 @@ displayMusic =
>  %% FIXME: guile-1.7 required?
>  %#(use-modules (scm display-lily))invalid module name for use-syntax
> ((srfi srfi-39))
>
> -#(use-modules (scm display-lily))
> -#(display-lily-init parser)
> -displayLilyMusic =
> -#(def-music-function (parser location music) (ly:music?)
> -   (display-lily-music music)
> -   music)
> +%#(use-modules (scm display-lily))
> +%#(display-lily-init parser)
> +%displayLilyMusic =
> +%#(def-music-function (parser location music) (ly:music?)
> +%   (display-lily-music music)
> +%   music)
>
>  applyOutput =
>  #(def-music-function (parser location proc) (procedure?)
> diff --git a/my-lexer-gcc-3.1.sh b/my-lexer-gcc-3.1.sh
> new file mode 100644
> index 0000000..c781409
> --- /dev/null
> +++ b/my-lexer-gcc-3.1.sh
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +
> +cd "$(dirname "$0")/lily"
> +
> +rm out/lexer.cc 2>/dev/null
> +make out/lexer.cc
> +mv out/lexer.cc out/lexer.cc.orig
> +cat out/lexer.cc.orig | sed 's/^class istream;$/#include <iostream>\
> +using namespace std;/' > out/lexer.cc
> +
> diff --git a/stepmake/stepmake/compile-vars.make
> b/stepmake/stepmake/compile-vars.make
> index b39499b..9af6eb5 100644
> --- a/stepmake/stepmake/compile-vars.make
> +++ b/stepmake/stepmake/compile-vars.make
> @@ -3,10 +3,14 @@ ARFLAGS = ru
>  ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS)
> $(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)
>
>  PIC_FLAGS = -fpic -fPIC
> -ifeq ($(MINGW_BUILD),)
> -SHARED_FLAGS = -shared
> -else
> +ifneq ($(MINGW_BUILD),)
>  SHARED_FLAGS = -mdll
> +else
> +ifneq ($(DARWIN_BUILD),)
> +SHARED_FLAGS = -bundle -flat_namespace -framework Python
> +else
> +SHARED_FLAGS = -shared
> +endif
>  endif
>
>  o-dep-out = $(outdir)/$(subst .o,.dep,$(notdir $@))#
> diff --git a/stepmake/stepmake/generic-vars.make
> b/stepmake/stepmake/generic-vars.make
> index fc7e89e..0de08f8 100644
> --- a/stepmake/stepmake/generic-vars.make
> +++ b/stepmake/stepmake/generic-vars.make
> @@ -111,3 +111,8 @@ endif
>  ifeq ($(HOST_ARCH),i386-mingw32)
>  MINGW_BUILD = yes
>  endif
> +
> +ifeq ($(HOST_ARCH),ppc-darwin)
> +DARWIN_BUILD = yes
> +endif
> +
>
>
> _______________________________________________
> lilypond-devel mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-devel
>



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

Re: [PATCH] Assorted fixes for macosx 10.2.8

Han-Wen Nienhuys
Graham Percival wrote:
> I don't understand most of these patch, but I found the
> stepmake/stepmake/*-vars.make  patches very useful.  (I can now compile
> lily again!  :)    Han-Wen, could I apply those?

>> -#(use-modules (scm display-lily))
>> -#(display-lily-init parser)
>> -displayLilyMusic =
>> -#(def-music-function (parser location music) (ly:music?)
>> -   (display-lily-music music)
>> -   music)
>> +%#(use-modules (scm display-lily))
>> +%#(display-lily-init parser)
>> +%displayLilyMusic =
>> +%#(def-music-function (parser location music) (ly:music?)
>> +%   (display-lily-music music)
>> +%   music)
>>

this patch can't be applied.

>> --- a/stepmake/stepmake/compile-vars.make
>> +++ b/stepmake/stepmake/compile-vars.make
>> @@ -3,10 +3,14 @@ ARFLAGS = ru
>>  ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS)
>> $(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)
>>
>>  PIC_FLAGS = -fpic -fPIC
>> -ifeq ($(MINGW_BUILD),)
>> -SHARED_FLAGS = -shared
>> -else
>> +ifneq ($(MINGW_BUILD),)
>>  SHARED_FLAGS = -mdll
>> +else
>> +ifneq ($(DARWIN_BUILD),)
>> +SHARED_FLAGS = -bundle -flat_namespace -framework Python

this needs to be in python/GNUmakefile if anywhere.


--
  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: [PATCH] Assorted fixes for macosx 10.2.8

Johannes Schindelin
In reply to this post by Graham Percival-2
Hi,

On Wed, 7 Dec 2005, Graham Percival wrote:

> I don't understand most of these patch,

I'll try to explain:

> > diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile
> > index 6ab1df3..9b9821a 100644
> > --- a/Documentation/user/GNUmakefile
> > +++ b/Documentation/user/GNUmakefile
> > @@ -43,6 +43,7 @@ info: $(INFO_FILES)
> >
> >  pathsettings:
> >   @echo export PATH=$(PATH)
> > + @echo export LILYPOND_DATADIR=$(LILYPONDPREFIX)
> >   @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
> >   @echo export PYTHONPATH=$(PYTHONPATH)

This is needed so that lilypond does not try to use
/usr/local/share/something, but the files from where lilypond is compiled.

> > diff --git a/lily/GNUmakefile b/lily/GNUmakefile
> > index 8d2e91a..fb9192e 100644
> > --- a/lily/GNUmakefile
> > +++ b/lily/GNUmakefile
> > @@ -67,10 +67,11 @@ endif
> >
> >  # force these: Make can't know these have to be generated in advance
> >  $(outdir)/lily-parser.o: $(outdir)/parser.hh
> > -$(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
> > +$(outdir)/lily-lexer.o: $(outdir)/parser.hh
> >  $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh
> >
> >  ifneq ($(FLEXLEXER_FILE),)
> > +$(outdir)/lily-lexer.o: $(outdir)/FlexLexer.h
> >  $(outdir)/FlexLexer.h: $(FLEXLEXER_FILE) $(config_h)
> >   cp $< $@
> >  endif

This fixes the dependency on FlexLexer.h when configure determined that
there is none.

> > diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
> > index 798f466..50f5b07 100644
> > --- a/ly/music-functions-init.ly
> > +++ b/ly/music-functions-init.ly
> > @@ -51,12 +51,12 @@ displayMusic =
> >  %% FIXME: guile-1.7 required?
> >  %#(use-modules (scm display-lily))invalid module name for use-syntax ((srfi
> > srfi-39))
> >
> > -#(use-modules (scm display-lily))
> > -#(display-lily-init parser)
> > -displayLilyMusic =
> > -#(def-music-function (parser location music) (ly:music?)
> > -   (display-lily-music music)
> > -   music)
> > +%#(use-modules (scm display-lily))
> > +%#(display-lily-init parser)
> > +%displayLilyMusic =
> > +%#(def-music-function (parser location music) (ly:music?)
> > +%   (display-lily-music music)
> > +%   music)
> >
> >  applyOutput =
> >  #(def-music-function (parser location proc) (procedure?)

I agree with Han-Wen that this should not be applied. However, I seem to
be unable to find out just why this does not parse on my iBook, even with
the newest CVS of guile! Someone has ideas as to why, please speak up!

> > diff --git a/my-lexer-gcc-3.1.sh b/my-lexer-gcc-3.1.sh
> > new file mode 100644
> > index 0000000..c781409
> > --- /dev/null
> > +++ b/my-lexer-gcc-3.1.sh
> > @@ -0,0 +1,10 @@
> > +#!/bin/sh
> > +
> > +cd "$(dirname "$0")/lily"
> > +
> > +rm out/lexer.cc 2>/dev/null
> > +make out/lexer.cc
> > +mv out/lexer.cc out/lexer.cc.orig
> > +cat out/lexer.cc.orig | sed 's/^class istream;$/#include <iostream>\
> > +using namespace std;/' > out/lexer.cc
> > +

This is a very simple fix for my very special setup. Unless someone
verifies that it helps on other platforms, too, I'd rather see it as "it
helped me, maybe it helps you" hint.

> > diff --git a/stepmake/stepmake/compile-vars.make
> > b/stepmake/stepmake/compile-vars.make
> > index b39499b..9af6eb5 100644
> > --- a/stepmake/stepmake/compile-vars.make
> > +++ b/stepmake/stepmake/compile-vars.make
> > @@ -3,10 +3,14 @@ ARFLAGS = ru
> >  ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS)
> > $(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)
> >
> >  PIC_FLAGS = -fpic -fPIC
> > -ifeq ($(MINGW_BUILD),)
> > -SHARED_FLAGS = -shared
> > -else
> > +ifneq ($(MINGW_BUILD),)
> >  SHARED_FLAGS = -mdll
> > +else
> > +ifneq ($(DARWIN_BUILD),)
> > +SHARED_FLAGS = -bundle -flat_namespace -framework Python
> > +else
> > +SHARED_FLAGS = -shared
> > +endif
> >  endif
> >
> >  o-dep-out = $(outdir)/$(subst .o,.dep,$(notdir $@))#

I agree with Han-Wen that this should go into python-vars.make.
Unfortunately, it did not get picked up that way. I have to investigate.

> > diff --git a/stepmake/stepmake/generic-vars.make
> > b/stepmake/stepmake/generic-vars.make
> > index fc7e89e..0de08f8 100644
> > --- a/stepmake/stepmake/generic-vars.make
> > +++ b/stepmake/stepmake/generic-vars.make
> > @@ -111,3 +111,8 @@ endif
> >  ifeq ($(HOST_ARCH),i386-mingw32)
> >  MINGW_BUILD = yes
> >  endif
> > +
> > +ifeq ($(HOST_ARCH),ppc-darwin)
> > +DARWIN_BUILD = yes
> > +endif
> > +

I think this is more or less uncontroversial. It defines the variable
DARWIN_BUILD on Darwin, so that the Makefiles can have special casing for
Darwin as they have special handling of MinGW.

Hth,
Dscho



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

Re: [PATCH] Assorted fixes for macosx 10.2.8

Matthias Neeracher
In reply to this post by Johannes Schindelin

On Dec 8, 2005, at 10:26 AM, [hidden email] wrote:
From: Johannes Schindelin <[hidden email]>

On Wed, 7 Dec 2005, Graham Percival wrote:

I don't understand most of these patch,

I'll try to explain:

 pathsettings:
  @echo export PATH=$(PATH)
+ @echo export LILYPOND_DATADIR=$(LILYPONDPREFIX)
  @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
  @echo export PYTHONPATH=$(PYTHONPATH)

This is needed so that lilypond does not try to use 
/usr/local/share/something, but the files from where lilypond is compiled.

That makes it definitely unsuitable for general purpose distribution. This location can be overridden at runtime anyway, can't it?

diff --git a/my-lexer-gcc-3.1.sh b/my-lexer-gcc-3.1.sh
new file mode 100644
index 0000000..c781409
--- /dev/null
+++ b/my-lexer-gcc-3.1.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd "$(dirname "$0")/lily"
+
+rm out/lexer.cc 2>/dev/null
+make out/lexer.cc
+mv out/lexer.cc out/lexer.cc.orig
+cat out/lexer.cc.orig | sed 's/^class istream;$/#include <iostream>\
+using namespace std;/' > out/lexer.cc
+

This is a very simple fix for my very special setup. Unless someone 
verifies that it helps on other platforms, too, I'd rather see it as "it 
helped me, maybe it helps you" hint.

This is definitely needed on MacOS, since flex generates a file that is not correct C++ on that particular point (I wonder why, and why this never causes problems on other platforms). I don't think that it hurts on any platform.

--- a/stepmake/stepmake/compile-vars.make
+++ b/stepmake/stepmake/compile-vars.make
@@ -3,10 +3,14 @@ ARFLAGS = ru
 ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS)
$(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)

 PIC_FLAGS = -fpic -fPIC
-ifeq ($(MINGW_BUILD),)
-SHARED_FLAGS = -shared
-else
+ifneq ($(MINGW_BUILD),)
 SHARED_FLAGS = -mdll
+else
+ifneq ($(DARWIN_BUILD),)
+SHARED_FLAGS = -bundle -flat_namespace -framework Python
+else
+SHARED_FLAGS = -shared
+endif
 endif

 o-dep-out = $(outdir)/$(subst .o,.dep,$(notdir $@))#

I agree with Han-Wen that this should go into python-vars.make. 

Actually, the -framework Python should go there, but -bundle -flat_namespace belongs into compile-vars IMHO.

--- a/stepmake/stepmake/generic-vars.make
+++ b/stepmake/stepmake/generic-vars.make
@@ -111,3 +111,8 @@ endif
 ifeq ($(HOST_ARCH),i386-mingw32)
 MINGW_BUILD = yes
 endif
+
+ifeq ($(HOST_ARCH),ppc-darwin)
+DARWIN_BUILD = yes
+endif
+

I think this is more or less uncontroversial. It defines the variable 
DARWIN_BUILD on Darwin, so that the Makefiles can have special casing for 
Darwin as they have special handling of MinGW.

Good idea. I should have proposed that a long time ago.

Matthias


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

Re: [PATCH] Assorted fixes for macosx 10.2.8

Johannes Schindelin
Hi,

On Thu, 8 Dec 2005, Matthias Neeracher wrote:

>
> On Dec 8, 2005, at 10:26 AM, [hidden email] wrote:
> > From: Johannes Schindelin <[hidden email]>
> >
> > On Wed, 7 Dec 2005, Graham Percival wrote:
> >
> > > I don't understand most of these patch,
> >
> > I'll try to explain:
> >
> > > > pathsettings:
> > > > @echo export PATH=$(PATH)
> > > > + @echo export LILYPOND_DATADIR=$(LILYPONDPREFIX)
> > > > @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
> > > > @echo export PYTHONPATH=$(PYTHONPATH)
> >
> > This is needed so that lilypond does not try to use
> > /usr/local/share/something, but the files from where lilypond is compiled.
>
> That makes it definitely unsuitable for general purpose distribution. This
> location can be overridden at runtime anyway, can't it?

Sorry, this *is* an override. Namely, to make the documentation even if
you have a lilypond installed which is an earlier version, and want to
"make" the user documentation. I think this very definitely should go in.
It fixes a bug.

> > > > diff --git a/my-lexer-gcc-3.1.sh b/my-lexer-gcc-3.1.sh
> > > > new file mode 100644
> > > > index 0000000..c781409
> > > > --- /dev/null
> > > > +++ b/my-lexer-gcc-3.1.sh
> > > > @@ -0,0 +1,10 @@
> > > > +#!/bin/sh
> > > > +
> > > > +cd "$(dirname "$0")/lily"
> > > > +
> > > > +rm out/lexer.cc 2>/dev/null
> > > > +make out/lexer.cc
> > > > +mv out/lexer.cc out/lexer.cc.orig
> > > > +cat out/lexer.cc.orig | sed 's/^class istream;$/#include <iostream>\
> > > > +using namespace std;/' > out/lexer.cc
> > > > +
> >
> > This is a very simple fix for my very special setup. Unless someone
> > verifies that it helps on other platforms, too, I'd rather see it as "it
> > helped me, maybe it helps you" hint.
>
> This is definitely needed on MacOS, since flex generates a file that is not
> correct C++ on that particular point (I wonder why, and why this never causes
> problems on other platforms). I don't think that it hurts on any platform.

You have to start it manually, anyway.

> > > > --- a/stepmake/stepmake/compile-vars.make
> > > > +++ b/stepmake/stepmake/compile-vars.make
> > > > @@ -3,10 +3,14 @@ ARFLAGS = ru
> > > > ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS)
> > > > $(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)
> > > >
> > > > PIC_FLAGS = -fpic -fPIC
> > > > -ifeq ($(MINGW_BUILD),)
> > > > -SHARED_FLAGS = -shared
> > > > -else
> > > > +ifneq ($(MINGW_BUILD),)
> > > > SHARED_FLAGS = -mdll
> > > > +else
> > > > +ifneq ($(DARWIN_BUILD),)
> > > > +SHARED_FLAGS = -bundle -flat_namespace -framework Python
> > > > +else
> > > > +SHARED_FLAGS = -shared
> > > > +endif
> > > > endif
> > > >
> > > > o-dep-out = $(outdir)/$(subst .o,.dep,$(notdir $@))#
> >
> > I agree with Han-Wen that this should go into python-vars.make.
>
> Actually, the -framework Python should go there, but -bundle -flat_namespace
> belongs into compile-vars IMHO.

No. The preferred way on Darwin/Mac OS X to make shared libraries is to
use "-dynamiclib". I don't know what the python people were smoking when
they decided to go with "-bundle -flat_namespace -framework Python", but
that does not matter any longer, right?

> > > > --- a/stepmake/stepmake/generic-vars.make
> > > > +++ b/stepmake/stepmake/generic-vars.make
> > > > @@ -111,3 +111,8 @@ endif
> > > > ifeq ($(HOST_ARCH),i386-mingw32)
> > > > MINGW_BUILD = yes
> > > > endif
> > > > +
> > > > +ifeq ($(HOST_ARCH),ppc-darwin)
> > > > +DARWIN_BUILD = yes
> > > > +endif
> > > > +
> >
> > I think this is more or less uncontroversial. It defines the variable
> > DARWIN_BUILD on Darwin, so that the Makefiles can have special casing for
> > Darwin as they have special handling of MinGW.
>
> Good idea. I should have proposed that a long time ago.

Thanks!

Ciao,
Dscho

P.S.: I will now go and look how to solve the python problem cleanly, i.e.
different from my current approach...



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

Python patch, was Re: [PATCH] Assorted fixes for macosx 10.2.8

Johannes Schindelin
In reply to this post by Matthias Neeracher
Hi,

I do not know any longer why I had to set the SHARED_CFLAGS in
compile-vars.make. Just tested the following patch, which works fine here:

diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make
index fc7e89e..0de08f8 100644
--- a/stepmake/stepmake/generic-vars.make
+++ b/stepmake/stepmake/generic-vars.make
@@ -111,3 +111,8 @@ endif
 ifeq ($(HOST_ARCH),i386-mingw32)
 MINGW_BUILD = yes
 endif
+
+ifeq ($(HOST_ARCH),ppc-darwin)
+DARWIN_BUILD = yes
+endif
+
diff --git a/stepmake/stepmake/python-module-vars.make b/stepmake/stepmake/python-module-vars.make
index cde4c2d..d982177 100644
--- a/stepmake/stepmake/python-module-vars.make
+++ b/stepmake/stepmake/python-module-vars.make
@@ -13,6 +13,9 @@ ifneq ($(MINGW_BUILD),)
 SHARED_MODULE_SUFFIX = .dll
 endif
 endif
+ifneq ($(DARWIN_BUILD),)
+SHARED_FLAGS = -bundle -flat_namespace -framework Python
+endif
 OUT_SO_MODULES = $(addprefix $(outdir)/, $(C_FILES:.c=$(SHARED_MODULE_SUFFIX)))
 EXTRA_DIST_FILES += $(PY_MODULES_IN)
 


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

Re: Python patch, was Re: [PATCH] Assorted fixes for macosx 10.2.8

Graham Percival-2

On 9-Dec-05, at 6:16 AM, Johannes Schindelin wrote:

> I do not know any longer why I had to set the SHARED_CFLAGS in
> compile-vars.make. Just tested the following patch, which works fine
> here:

Thanks, this also works for me.  (OSX 10.3.9, libraries installed via
fink)
Han-Wen, can this be applied?

- Graham



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

Re: Python patch, was Re: [PATCH] Assorted fixes for macosx 10.2.8

Han-Wen Nienhuys
Graham Percival wrote:

>
> On 9-Dec-05, at 6:16 AM, Johannes Schindelin wrote:
>
>> I do not know any longer why I had to set the SHARED_CFLAGS in
>> compile-vars.make. Just tested the following patch, which works fine
>> here:
>
>
> Thanks, this also works for me.  (OSX 10.3.9, libraries installed via fink)
> Han-Wen, can this be applied?
>

yes.

--
  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: [PATCH] Assorted fixes for macosx 10.2.8

Johannes Schindelin
In reply to this post by Johannes Schindelin
Hi,

On Fri, 9 Dec 2005, Johannes Schindelin wrote:

> On Thu, 8 Dec 2005, Matthias Neeracher wrote:
>
> >
> > On Dec 8, 2005, at 10:26 AM, [hidden email] wrote:
> > > From: Johannes Schindelin <[hidden email]>
> > >
> > > On Wed, 7 Dec 2005, Graham Percival wrote:
> > >
> > > > I don't understand most of these patch,
> > >
> > > I'll try to explain:
> > >
> > > > > pathsettings:
> > > > > @echo export PATH=$(PATH)
> > > > > + @echo export LILYPOND_DATADIR=$(LILYPONDPREFIX)
> > > > > @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
> > > > > @echo export PYTHONPATH=$(PYTHONPATH)
> > >
> > > This is needed so that lilypond does not try to use
> > > /usr/local/share/something, but the files from where lilypond is compiled.
> >
> > That makes it definitely unsuitable for general purpose distribution. This
> > location can be overridden at runtime anyway, can't it?
>
> Sorry, this *is* an override. Namely, to make the documentation even if
> you have a lilypond installed which is an earlier version, and want to
> "make" the user documentation. I think this very definitely should go in.
> It fixes a bug.

Call me an idiot! I retested it, and of course it does not fix a bug.
There is no bug. It was just that I edited the wrong file in some
debugging spree, and during the hunt for *that* error, I "fixed"
LILYPOND_DATADIR.

Sorry for the noise,
Dscho



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