/itexToMML

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/itexToMML/

« back to all changes in this revision

Viewing changes to itex-src/Makefile

  • Committer: Jacques Distler
  • Date: 2010-02-20 20:18:52 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20100220201852-xxergbgsx8p2s677
Tags: 1.3.20
Fix Ruby bindings to work in Ruby 1.9

In ruby 1.9, we return a utf-8 encoded
string. 

(Also, it seems my Linux build server is on the fritz,
so no Linux binary for this release.)

Show diffs side-by-side

added added

removed removed

38
38
                $(INSTALL) itex2MML $(BINDIR)
39
39
 
40
40
RUBY_CFLAGS = $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["CFLAGS"]')
41
 
RUBY_LD = MACOSX_DEPLOYMENT_TARGET=10.4 $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["LDSHARED"]')
 
41
RUBY_LD = $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["LDSHARED"]')
42
42
RUBYLIBDIR =$(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["libdir"]') 
43
43
RUBY_PREFIX =  $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["rubylibdir"]')
44
44
RUBY_ARCH = $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["arch"]')
48
48
RUBY_SITEARCHDIR = $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["sitearchdir"]')
49
49
LIBRUBYARG = $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["LIBRUBYARG"]')
50
50
DYLIB_EXT = $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["DLEXT"]')
 
51
RUBY_target_os = $(shell $(RUBY) -e 'require "rbconfig"; print Config::CONFIG["target_os"]')
 
52
 
 
53
ifneq (, $(findstring darwin, $(RUBY_target_os)) )
 
54
EXTRA_CFLAGS = -DHAVE_SNPRINTF -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
 
55
LD_TARGET = MACOSX_DEPLOYMENT_TARGET=10.4
 
56
else
 
57
EXTRA_CFLAGS = ''
 
58
LD_TARGET = ''
 
59
endif
51
60
 
52
61
itex2MML_ruby.c:        itex2MML.i
53
62
                        $(SWIG) -ruby -o itex2MML_ruby.c  itex2MML.i
54
63
 
55
64
itex2MML_ruby.o:        itex2MML_ruby.c
56
 
                        $(CC) $(RUBY_CFLAGS) -DHAVE_STRUCT_TIMESPEC -c itex2MML_ruby.c -I$(RUBYDIR) -I$(RUBYHDRDIR) -o itex2MML_ruby.o
 
65
                        $(CC) $(RUBY_CFLAGS)  $(EXTRA_CFLAGS) -c itex2MML_ruby.c -I$(RUBYHDRDIR) -I$(RUBYDIR) -o itex2MML_ruby.o
57
66
 
58
67
y.tab_ruby.o:           y.tab.c
59
68
                        $(CC) $(RUBY_CFLAGS) -Ditex2MML_CAPTURE -c -o y.tab_ruby.o y.tab.c
62
71
                $(CC) $(RUBY_CFLAGS) -c -o lex.yy_ruby.o lex.yy.c
63
72
 
64
73
ruby:   itex2MML_ruby.o y.tab_ruby.o lex.yy_ruby.o
65
 
        $(RUBY_LD) itex2MML_ruby.o y.tab_ruby.o lex.yy_ruby.o -L$(RUBYLIBDIR) $(LIBRUBYARG) -o itex2MML.$(DYLIB_EXT)
 
74
        $(LD_TARGET) $(RUBY_LD) itex2MML_ruby.o y.tab_ruby.o lex.yy_ruby.o -L$(RUBYLIBDIR) $(LIBRUBYARG) -o itex2MML.$(DYLIB_EXT)
66
75
 
67
76
test_ruby:
68
77
        $(RUBY) ./itextomml.rb