rice 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. data/COPYING +23 -0
  2. data/Doxyfile +1253 -0
  3. data/Makefile.am +26 -0
  4. data/Makefile.in +736 -0
  5. data/README +881 -0
  6. data/README.mingw +8 -0
  7. data/bootstrap +8 -0
  8. data/config.guess +1535 -0
  9. data/config.sub +1644 -0
  10. data/configure +7310 -0
  11. data/configure.ac +48 -0
  12. data/depcomp +584 -0
  13. data/doxygen.ac +314 -0
  14. data/doxygen.am +186 -0
  15. data/install-sh +507 -0
  16. data/missing +367 -0
  17. data/post-autoconf.rb +22 -0
  18. data/post-automake.rb +28 -0
  19. data/rice/Address_Registration_Guard.hpp +7 -0
  20. data/rice/Address_Registration_Guard.ipp +34 -0
  21. data/rice/Address_Registration_Guard_defn.hpp +65 -0
  22. data/rice/Allocation_Strategies.hpp +37 -0
  23. data/rice/Array.hpp +220 -0
  24. data/rice/Array.ipp +262 -0
  25. data/rice/Builtin_Object.hpp +8 -0
  26. data/rice/Builtin_Object.ipp +50 -0
  27. data/rice/Builtin_Object_defn.hpp +51 -0
  28. data/rice/Class.cpp +57 -0
  29. data/rice/Class.hpp +8 -0
  30. data/rice/Class.ipp +4 -0
  31. data/rice/Class_defn.hpp +83 -0
  32. data/rice/Constructor.hpp +189 -0
  33. data/rice/Critical_Guard.hpp +34 -0
  34. data/rice/Critical_Guard.ipp +20 -0
  35. data/rice/Data_Object.hpp +127 -0
  36. data/rice/Data_Object.ipp +129 -0
  37. data/rice/Data_Type.cpp +21 -0
  38. data/rice/Data_Type.hpp +8 -0
  39. data/rice/Data_Type.ipp +227 -0
  40. data/rice/Data_Type_defn.hpp +219 -0
  41. data/rice/Data_Type_fwd.hpp +12 -0
  42. data/rice/Enum.hpp +118 -0
  43. data/rice/Enum.ipp +246 -0
  44. data/rice/Exception.cpp +59 -0
  45. data/rice/Exception.hpp +69 -0
  46. data/rice/Exception_Base.hpp +30 -0
  47. data/rice/Exception_Base.ipp +11 -0
  48. data/rice/Hash.hpp +206 -0
  49. data/rice/Hash.ipp +336 -0
  50. data/rice/Identifier.cpp +8 -0
  51. data/rice/Identifier.hpp +50 -0
  52. data/rice/Identifier.ipp +33 -0
  53. data/rice/Jump_Tag.hpp +24 -0
  54. data/rice/Makefile.am +112 -0
  55. data/rice/Makefile.in +675 -0
  56. data/rice/Module.cpp +75 -0
  57. data/rice/Module.hpp +8 -0
  58. data/rice/Module.ipp +6 -0
  59. data/rice/Module_defn.hpp +87 -0
  60. data/rice/Module_impl.hpp +237 -0
  61. data/rice/Module_impl.ipp +302 -0
  62. data/rice/Object.cpp +153 -0
  63. data/rice/Object.hpp +8 -0
  64. data/rice/Object.ipp +19 -0
  65. data/rice/Object_defn.hpp +183 -0
  66. data/rice/Require_Guard.hpp +21 -0
  67. data/rice/String.cpp +93 -0
  68. data/rice/String.hpp +88 -0
  69. data/rice/Struct.cpp +117 -0
  70. data/rice/Struct.hpp +162 -0
  71. data/rice/Struct.ipp +26 -0
  72. data/rice/Symbol.cpp +25 -0
  73. data/rice/Symbol.hpp +66 -0
  74. data/rice/Symbol.ipp +44 -0
  75. data/rice/VM.cpp +79 -0
  76. data/rice/VM.hpp +27 -0
  77. data/rice/config.hpp +23 -0
  78. data/rice/config.hpp.in +22 -0
  79. data/rice/detail/Auto_Function_Wrapper.hpp +719 -0
  80. data/rice/detail/Auto_Function_Wrapper.ipp +1354 -0
  81. data/rice/detail/Auto_Member_Function_Wrapper.hpp +685 -0
  82. data/rice/detail/Auto_Member_Function_Wrapper.ipp +1435 -0
  83. data/rice/detail/Caster.hpp +61 -0
  84. data/rice/detail/Exception_Handler.hpp +118 -0
  85. data/rice/detail/Iterator_Definer.hpp +98 -0
  86. data/rice/detail/Not_Copyable.hpp +25 -0
  87. data/rice/detail/Wrapped_Function.hpp +33 -0
  88. data/rice/detail/check_ruby_type.cpp +21 -0
  89. data/rice/detail/check_ruby_type.hpp +23 -0
  90. data/rice/detail/creation_funcs.hpp +45 -0
  91. data/rice/detail/creation_funcs.ipp +62 -0
  92. data/rice/detail/default_allocation_func.hpp +23 -0
  93. data/rice/detail/default_allocation_func.ipp +11 -0
  94. data/rice/detail/define_method_and_auto_wrap.hpp +27 -0
  95. data/rice/detail/define_method_and_auto_wrap.ipp +20 -0
  96. data/rice/detail/env.hpp +13 -0
  97. data/rice/detail/from_ruby.hpp +43 -0
  98. data/rice/detail/from_ruby.ipp +74 -0
  99. data/rice/detail/method_data.cpp +105 -0
  100. data/rice/detail/method_data.hpp +33 -0
  101. data/rice/detail/node.hpp +13 -0
  102. data/rice/detail/object_call.hpp +85 -0
  103. data/rice/detail/object_call.ipp +147 -0
  104. data/rice/detail/protect.cpp +27 -0
  105. data/rice/detail/protect.hpp +34 -0
  106. data/rice/detail/remove_const.hpp +21 -0
  107. data/rice/detail/ruby.hpp +85 -0
  108. data/rice/detail/rubysig.hpp +13 -0
  109. data/rice/detail/st.hpp +56 -0
  110. data/rice/detail/to_ruby.hpp +16 -0
  111. data/rice/detail/to_ruby.ipp +10 -0
  112. data/rice/detail/win32.hpp +16 -0
  113. data/rice/detail/wrap_function.hpp +288 -0
  114. data/rice/detail/wrap_function.ipp +473 -0
  115. data/rice/generate_code.rb +1092 -0
  116. data/rice/global_function.hpp +16 -0
  117. data/rice/global_function.ipp +11 -0
  118. data/rice/protect.hpp +91 -0
  119. data/rice/protect.ipp +803 -0
  120. data/rice/ruby_try_catch.hpp +86 -0
  121. data/rice/to_from_ruby.hpp +8 -0
  122. data/rice/to_from_ruby.ipp +299 -0
  123. data/rice/to_from_ruby_defn.hpp +71 -0
  124. data/ruby.ac +105 -0
  125. data/ruby/Makefile.am +1 -0
  126. data/ruby/Makefile.in +493 -0
  127. data/ruby/lib/Makefile.am +3 -0
  128. data/ruby/lib/Makefile.in +369 -0
  129. data/ruby/lib/mkmf-rice.rb.in +199 -0
  130. data/sample/Makefile.am +47 -0
  131. data/sample/Makefile.in +375 -0
  132. data/sample/enum/extconf.rb +3 -0
  133. data/sample/enum/sample_enum.cpp +54 -0
  134. data/sample/enum/test.rb +8 -0
  135. data/sample/inheritance/animals.cpp +98 -0
  136. data/sample/inheritance/extconf.rb +3 -0
  137. data/sample/inheritance/test.rb +7 -0
  138. data/sample/map/extconf.rb +3 -0
  139. data/sample/map/map.cpp +81 -0
  140. data/sample/map/test.rb +7 -0
  141. data/test/Makefile.am +44 -0
  142. data/test/Makefile.in +575 -0
  143. data/test/test_Address_Registration_Guard.cpp +43 -0
  144. data/test/test_Allocation_Strategies.cpp +77 -0
  145. data/test/test_Array.cpp +241 -0
  146. data/test/test_Builtin_Object.cpp +72 -0
  147. data/test/test_Class.cpp +350 -0
  148. data/test/test_Constructor.cpp +30 -0
  149. data/test/test_Critical_Guard.cpp +47 -0
  150. data/test/test_Data_Object.cpp +235 -0
  151. data/test/test_Enum.cpp +162 -0
  152. data/test/test_Exception.cpp +46 -0
  153. data/test/test_Hash.cpp +195 -0
  154. data/test/test_Identifier.cpp +70 -0
  155. data/test/test_Jump_Tag.cpp +17 -0
  156. data/test/test_Module.cpp +253 -0
  157. data/test/test_Object.cpp +148 -0
  158. data/test/test_String.cpp +94 -0
  159. data/test/test_Struct.cpp +192 -0
  160. data/test/test_Symbol.cpp +63 -0
  161. data/test/test_To_From_Ruby.cpp +281 -0
  162. data/test/test_VM.cpp +26 -0
  163. data/test/test_rice.rb +30 -0
  164. data/test/unittest.cpp +136 -0
  165. data/test/unittest.hpp +292 -0
  166. metadata +209 -0
@@ -0,0 +1,3 @@
1
+ rubydir = @RUBY_SITELIBDIR@
2
+
3
+ ruby_DATA = mkmf-rice.rb
@@ -0,0 +1,369 @@
1
+ # Makefile.in generated by automake 1.10 from Makefile.am.
2
+ # @configure_input@
3
+
4
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
+ # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
6
+ # This Makefile.in is free software; the Free Software Foundation
7
+ # gives unlimited permission to copy and/or distribute it,
8
+ # with or without modifications, as long as this notice is preserved.
9
+
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13
+ # PARTICULAR PURPOSE.
14
+
15
+ @SET_MAKE@
16
+
17
+ VPATH = @srcdir@
18
+ pkgdatadir = $(datadir)/@PACKAGE@
19
+ pkglibdir = $(libdir)/@PACKAGE@
20
+ pkgincludedir = $(includedir)/@PACKAGE@
21
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22
+ install_sh_DATA = $(install_sh) -c -m 644
23
+ install_sh_PROGRAM = $(install_sh) -c
24
+ install_sh_SCRIPT = $(install_sh) -c
25
+ INSTALL_HEADER = $(INSTALL_DATA)
26
+ transform = $(program_transform_name)
27
+ NORMAL_INSTALL = :
28
+ PRE_INSTALL = :
29
+ POST_INSTALL = :
30
+ NORMAL_UNINSTALL = :
31
+ PRE_UNINSTALL = :
32
+ POST_UNINSTALL = :
33
+ build_triplet = @build@
34
+ host_triplet = @host@
35
+ subdir = ruby/lib
36
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
37
+ $(srcdir)/mkmf-rice.rb.in
38
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39
+ am__aclocal_m4_deps = $(top_srcdir)/ruby.ac $(top_srcdir)/doxygen.ac \
40
+ $(top_srcdir)/configure.ac
41
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
42
+ $(ACLOCAL_M4)
43
+ mkinstalldirs = $(install_sh) -d
44
+ CONFIG_HEADER = $(top_builddir)/rice/config.hpp
45
+ CONFIG_CLEAN_FILES = mkmf-rice.rb
46
+ SOURCES =
47
+ DIST_SOURCES =
48
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
49
+ am__vpath_adj = case $$p in \
50
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
51
+ *) f=$$p;; \
52
+ esac;
53
+ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
54
+ am__installdirs = "$(DESTDIR)$(rubydir)"
55
+ rubyDATA_INSTALL = $(INSTALL_DATA)
56
+ DATA = $(ruby_DATA)
57
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
58
+ ACLOCAL = @ACLOCAL@
59
+ AMTAR = @AMTAR@
60
+ AUTOCONF = @AUTOCONF@
61
+ AUTOHEADER = @AUTOHEADER@
62
+ AUTOMAKE = @AUTOMAKE@
63
+ AWK = @AWK@
64
+ CPPFLAGS = @CPPFLAGS@
65
+ CXX = @CXX@
66
+ CXXDEPMODE = @CXXDEPMODE@
67
+ CXXFLAGS = @CXXFLAGS@
68
+ CYGPATH_W = @CYGPATH_W@
69
+ DEFS = @DEFS@
70
+ DEPDIR = @DEPDIR@
71
+ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
72
+ DX_CONFIG = @DX_CONFIG@
73
+ DX_DOCDIR = @DX_DOCDIR@
74
+ DX_DOT = @DX_DOT@
75
+ DX_DOXYGEN = @DX_DOXYGEN@
76
+ DX_DVIPS = @DX_DVIPS@
77
+ DX_EGREP = @DX_EGREP@
78
+ DX_ENV = @DX_ENV@
79
+ DX_FLAG_chi = @DX_FLAG_chi@
80
+ DX_FLAG_chm = @DX_FLAG_chm@
81
+ DX_FLAG_doc = @DX_FLAG_doc@
82
+ DX_FLAG_dot = @DX_FLAG_dot@
83
+ DX_FLAG_html = @DX_FLAG_html@
84
+ DX_FLAG_man = @DX_FLAG_man@
85
+ DX_FLAG_pdf = @DX_FLAG_pdf@
86
+ DX_FLAG_ps = @DX_FLAG_ps@
87
+ DX_FLAG_rtf = @DX_FLAG_rtf@
88
+ DX_FLAG_xml = @DX_FLAG_xml@
89
+ DX_HHC = @DX_HHC@
90
+ DX_LATEX = @DX_LATEX@
91
+ DX_MAKEINDEX = @DX_MAKEINDEX@
92
+ DX_PDFLATEX = @DX_PDFLATEX@
93
+ DX_PERL = @DX_PERL@
94
+ DX_PROJECT = @DX_PROJECT@
95
+ ECHO_C = @ECHO_C@
96
+ ECHO_N = @ECHO_N@
97
+ ECHO_T = @ECHO_T@
98
+ EXEEXT = @EXEEXT@
99
+ INSTALL = @INSTALL@
100
+ INSTALL_DATA = @INSTALL_DATA@
101
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
102
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
103
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
104
+ LDFLAGS = @LDFLAGS@
105
+ LIBOBJS = @LIBOBJS@
106
+ LIBS = @LIBS@
107
+ LTLIBOBJS = @LTLIBOBJS@
108
+ MAKEINFO = @MAKEINFO@
109
+ MKDIR_P = @MKDIR_P@
110
+ OBJEXT = @OBJEXT@
111
+ PACKAGE = @PACKAGE@
112
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
113
+ PACKAGE_NAME = @PACKAGE_NAME@
114
+ PACKAGE_STRING = @PACKAGE_STRING@
115
+ PACKAGE_TARNAME = @PACKAGE_TARNAME@
116
+ PACKAGE_VERSION = @PACKAGE_VERSION@
117
+ PATH_SEPARATOR = @PATH_SEPARATOR@
118
+ RANLIB = @RANLIB@
119
+ RICE_CPPFLAGS = @RICE_CPPFLAGS@
120
+ RICE_LDFLAGS = @RICE_LDFLAGS@
121
+ RICE_SAMPLES = @RICE_SAMPLES@
122
+ RICE_USING_MINGW32 = @RICE_USING_MINGW32@
123
+ RUBY = @RUBY@
124
+ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@
125
+ RUBY_LDFLAGS = @RUBY_LDFLAGS@
126
+ RUBY_LIBRUBYARG = @RUBY_LIBRUBYARG@
127
+ RUBY_LIBRUBYARG_STATIC = @RUBY_LIBRUBYARG_STATIC@
128
+ RUBY_LIBS = @RUBY_LIBS@
129
+ RUBY_SITELIBDIR = @RUBY_SITELIBDIR@
130
+ SET_MAKE = @SET_MAKE@
131
+ SHELL = @SHELL@
132
+ STRIP = @STRIP@
133
+ VERSION = @VERSION@
134
+ abs_builddir = @abs_builddir@
135
+ abs_srcdir = @abs_srcdir@
136
+ abs_top_builddir = @abs_top_builddir@
137
+ abs_top_srcdir = @abs_top_srcdir@
138
+ ac_ct_CXX = @ac_ct_CXX@
139
+ am__include = @am__include@
140
+ am__leading_dot = @am__leading_dot@
141
+ am__quote = @am__quote@
142
+ am__tar = @am__tar@
143
+ am__untar = @am__untar@
144
+ bindir = @bindir@
145
+ build = @build@
146
+ build_alias = @build_alias@
147
+ build_cpu = @build_cpu@
148
+ build_os = @build_os@
149
+ build_vendor = @build_vendor@
150
+ builddir = @builddir@
151
+ datadir = @datadir@
152
+ datarootdir = @datarootdir@
153
+ docdir = @docdir@
154
+ dvidir = @dvidir@
155
+ exec_prefix = @exec_prefix@
156
+ host = @host@
157
+ host_alias = @host_alias@
158
+ host_cpu = @host_cpu@
159
+ host_os = @host_os@
160
+ host_vendor = @host_vendor@
161
+ htmldir = @htmldir@
162
+ includedir = @includedir@
163
+ infodir = @infodir@
164
+ install_sh = @install_sh@
165
+ libdir = @libdir@
166
+ libexecdir = @libexecdir@
167
+ localedir = @localedir@
168
+ localstatedir = @localstatedir@
169
+ mandir = @mandir@
170
+ mkdir_p = @mkdir_p@
171
+ oldincludedir = @oldincludedir@
172
+ pdfdir = @pdfdir@
173
+ prefix = @prefix@
174
+ program_transform_name = @program_transform_name@
175
+ psdir = @psdir@
176
+ sbindir = @sbindir@
177
+ sharedstatedir = @sharedstatedir@
178
+ srcdir = @srcdir@
179
+ sysconfdir = @sysconfdir@
180
+ target_alias = @target_alias@
181
+ top_builddir = @top_builddir@
182
+ top_srcdir = @top_srcdir@
183
+ rubydir = @RUBY_SITELIBDIR@
184
+ ruby_DATA = mkmf-rice.rb
185
+ all: all-am
186
+
187
+ .SUFFIXES:
188
+ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
189
+ @for dep in $?; do \
190
+ case '$(am__configure_deps)' in \
191
+ *$$dep*) \
192
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
193
+ && exit 0; \
194
+ exit 1;; \
195
+ esac; \
196
+ done; \
197
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ruby/lib/Makefile'; \
198
+ cd $(top_srcdir) && \
199
+ $(AUTOMAKE) --gnu ruby/lib/Makefile
200
+ .PRECIOUS: Makefile
201
+ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
202
+ @case '$?' in \
203
+ *config.status*) \
204
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
205
+ *) \
206
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
207
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
208
+ esac;
209
+
210
+ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
211
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
212
+
213
+ $(top_srcdir)/configure: $(am__configure_deps)
214
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
215
+ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
216
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
217
+ mkmf-rice.rb: $(top_builddir)/config.status $(srcdir)/mkmf-rice.rb.in
218
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
219
+ install-rubyDATA: $(ruby_DATA)
220
+ @$(NORMAL_INSTALL)
221
+ test -z "$(rubydir)" || $(MKDIR_P) "$(DESTDIR)$(rubydir)"
222
+ @list='$(ruby_DATA)'; for p in $$list; do \
223
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
224
+ f=$(am__strip_dir) \
225
+ echo " $(rubyDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(rubydir)/$$f'"; \
226
+ $(rubyDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(rubydir)/$$f"; \
227
+ done
228
+
229
+ uninstall-rubyDATA:
230
+ @$(NORMAL_UNINSTALL)
231
+ @list='$(ruby_DATA)'; for p in $$list; do \
232
+ f=$(am__strip_dir) \
233
+ echo " rm -f '$(DESTDIR)$(rubydir)/$$f'"; \
234
+ rm -f "$(DESTDIR)$(rubydir)/$$f"; \
235
+ done
236
+ tags: TAGS
237
+ TAGS:
238
+
239
+ ctags: CTAGS
240
+ CTAGS:
241
+
242
+
243
+ distdir: $(DISTFILES)
244
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
245
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
246
+ list='$(DISTFILES)'; \
247
+ dist_files=`for file in $$list; do echo $$file; done | \
248
+ sed -e "s|^$$srcdirstrip/||;t" \
249
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
250
+ case $$dist_files in \
251
+ */*) eval $(MKDIR_P) `echo "$$dist_files" | \
252
+ sed '/\//!d;s|^|"$(distdir)"/|;s,/[^/]*$$,,' | \
253
+ sort -u` ;; \
254
+ esac; \
255
+ for file in $$dist_files; do \
256
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
257
+ if test -d $$d/$$file; then \
258
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
259
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
260
+ cp -pR $(srcdir)/$$file "$(distdir)"$$dir || exit 1; \
261
+ fi; \
262
+ cp -pR $$d/$$file "$(distdir)"$$dir || exit 1; \
263
+ else \
264
+ test -f "$(distdir)"/$$file \
265
+ || cp -p $$d/$$file "$(distdir)"/$$file \
266
+ || exit 1; \
267
+ fi; \
268
+ done
269
+ check-am: all-am
270
+ check: check-am
271
+ all-am: Makefile $(DATA)
272
+ installdirs:
273
+ for dir in "$(DESTDIR)$(rubydir)"; do \
274
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
275
+ done
276
+ install: install-am
277
+ install-exec: install-exec-am
278
+ install-data: install-data-am
279
+ uninstall: uninstall-am
280
+
281
+ install-am: all-am
282
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
283
+
284
+ installcheck: installcheck-am
285
+ install-strip:
286
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
287
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
288
+ `test -z '$(STRIP)' || \
289
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
290
+ mostlyclean-generic:
291
+
292
+ clean-generic:
293
+
294
+ distclean-generic:
295
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
296
+
297
+ maintainer-clean-generic:
298
+ @echo "This command is intended for maintainers to use"
299
+ @echo "it deletes files that may require special tools to rebuild."
300
+ clean: clean-am
301
+
302
+ clean-am: clean-generic mostlyclean-am
303
+
304
+ distclean: distclean-am
305
+ -rm -f Makefile
306
+ distclean-am: clean-am distclean-generic
307
+
308
+ dvi: dvi-am
309
+
310
+ dvi-am:
311
+
312
+ html: html-am
313
+
314
+ info: info-am
315
+
316
+ info-am:
317
+
318
+ install-data-am: install-rubyDATA
319
+
320
+ install-dvi: install-dvi-am
321
+
322
+ install-exec-am:
323
+
324
+ install-html: install-html-am
325
+
326
+ install-info: install-info-am
327
+
328
+ install-man:
329
+
330
+ install-pdf: install-pdf-am
331
+
332
+ install-ps: install-ps-am
333
+
334
+ installcheck-am:
335
+
336
+ maintainer-clean: maintainer-clean-am
337
+ -rm -f Makefile
338
+ maintainer-clean-am: distclean-am maintainer-clean-generic
339
+
340
+ mostlyclean: mostlyclean-am
341
+
342
+ mostlyclean-am: mostlyclean-generic
343
+
344
+ pdf: pdf-am
345
+
346
+ pdf-am:
347
+
348
+ ps: ps-am
349
+
350
+ ps-am:
351
+
352
+ uninstall-am: uninstall-rubyDATA
353
+
354
+ .MAKE: install-am install-strip
355
+
356
+ .PHONY: all all-am check check-am clean clean-generic distclean \
357
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
358
+ install install-am install-data install-data-am install-dvi \
359
+ install-dvi-am install-exec install-exec-am install-html \
360
+ install-html-am install-info install-info-am install-man \
361
+ install-pdf install-pdf-am install-ps install-ps-am \
362
+ install-rubyDATA install-strip installcheck installcheck-am \
363
+ installdirs maintainer-clean maintainer-clean-generic \
364
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
365
+ uninstall-am uninstall-rubyDATA
366
+
367
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
368
+ # Otherwise a system limit (for SysV at least) may be exceeded.
369
+ .NOEXPORT:
@@ -0,0 +1,199 @@
1
+ # Make sure that archflags does not include ppc if we're
2
+ # on Intel x86 processor on Mac
3
+ if `uname`.chomp == "Darwin"
4
+ arch = `uname -p`.chomp
5
+ ENV["ARCHFLAGS"] = "-arch #{arch}"
6
+ end
7
+
8
+ require 'mkmf'
9
+ require 'rbconfig'
10
+
11
+ #
12
+ # A script to override some defaults in mkmf.rb for C++ code
13
+ # compilation.
14
+ #
15
+ # If this looks like a big hack, that's because it is.
16
+ #
17
+
18
+ def init_mkmf_rice(config = CONFIG)
19
+ # Set some defaults that we got from autoconf -- they're more likely
20
+ # to be correct than what Ruby was built with
21
+ $CXX = "@CXX@"
22
+ $LIBS = "@RUBY_LIBS@"
23
+ $LIBRUBYARG = "@RUBY_LIBRUBYARG@"
24
+ $LIBRUBYARG_STATIC = "@RUBY_LIBRUBYARG_STATIC@"
25
+ $RICE_CPPFLAGS = "@RICE_CPPFLAGS@"
26
+ $RICE_LDFLAGS = "@RICE_LDFLAGS@"
27
+ $RICE_PREFIX = "@prefix@"
28
+
29
+ $RICE_USING_MINGW32 = @RICE_USING_MINGW32@
30
+
31
+ # Ruby < 1.8.6 does not have $DEFLIBPATH
32
+ $DEFLIBPATH ||= []
33
+
34
+ $CPPFLAGS << " #{$RICE_CPPFLAGS} -I#{$RICE_PREFIX}/include"
35
+ $LDFLAGS << " #{$RICE_LDFLAGS} -L#{$RICE_PREFIX}/lib"
36
+
37
+ # Turn on debugging and verbose warnings by default on compilers that
38
+ # support it
39
+ $CXXFLAGS = ''
40
+ if $CXX == 'g++'
41
+ $CXXFLAGS << ' -Wall -g'
42
+ end
43
+
44
+ # Fix-up the linker used for confidence tests
45
+ TRY_LINK.sub!(/^#{Regexp.quote("$(CC)")}/, $CXX)
46
+ TRY_LINK.sub!(/^#{config['CC']}/, $CXX)
47
+ TRY_LINK.sub!(/#{Regexp.quote("$(CFLAGS)")}/, "$(CXXFLAGS)")
48
+
49
+ # Set $LDSHARED_CXX to the linker to be used for C++ libraries (usually
50
+ # the C++ compiler itself)
51
+ case config['target_os']
52
+ when 'darwin'
53
+ $LDSHARED_CXX = \
54
+ replace_cc_with_cxx(config['LDSHARED']) + \
55
+ ' -read_only_relocs suppress'
56
+ when 'mswin32'
57
+ if $RICE_USING_MINGW32 then
58
+ init_rice_mkmf_cross_compile_mingw2_for_vc6
59
+ end
60
+ else
61
+ $LDSHARED_CXX = \
62
+ replace_cc_with_cxx(config['LDSHARED'])
63
+ end
64
+
65
+ # Link against the rice library by default
66
+ have_library('rice') or raise
67
+ end
68
+
69
+ def replace_cc_with_cxx(str)
70
+ return str.sub(
71
+ /^(cc|\$\(CC\)|#{CONFIG['CC']})(?=\s)/,
72
+ $CXX)
73
+ end
74
+
75
+ def init_rice_mkmf_cross_compile_mingw2_for_vc6
76
+ $LDSHARED_CXX = "#{$CXX} -shared -s"
77
+ $OBJEXT = 'o'
78
+ $DLDFLAGS.gsub!(/^-link.*\.pdb$/, '')
79
+
80
+ constants = {
81
+ :TRY_LINK =>
82
+ "#{$LDSHARED_CXX} -oconftest $(INCFLAGS) $(CPPFLAGS) " + \
83
+ "$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) " + \
84
+ "$(LOCAL_LIBS) $(LIBS)",
85
+ :LINK_SO =>
86
+ "#{$LDSHARED_CXX} $(DLDFLAGS) $(LIBPATH) -o$@ " + \
87
+ "$(OBJS) $(LOCAL_LIBS) $(LIBS)",
88
+ :LIBARG =>
89
+ '-l%s',
90
+ :LIBPATHFLAG =>
91
+ ' -L %s',
92
+ :COMPILE_RULES =>
93
+ %w[.%s.%s:],
94
+ :RULE_SUBST =>
95
+ '%s',
96
+ :COMPILE_CXX =>
97
+ '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<',
98
+ :OUTFLAG =>
99
+ '-o',
100
+ }
101
+
102
+ constants.each do |name, value|
103
+ Object.instance_eval { remove_const name }
104
+ Object.const_set(name, value)
105
+ end
106
+ end
107
+
108
+ class Object
109
+ alias_method :configuration_orig, :configuration
110
+ def configuration(srcdir)
111
+ configuration = configuration_orig(srcdir)
112
+ configuration.each do |config|
113
+ # Make sure we link the extension using the C++ compiler
114
+ config.gsub!(/^LDSHARED\s*=.*$/, "LDSHARED = #{$LDSHARED_CXX}")
115
+
116
+ # Make sure set the C++ flags correctly
117
+ config.gsub!(/^CXXFLAGS\s*=.*$/, "CXXFLAGS = $(CFLAGS) #{$CXXFLAGS}")
118
+ end
119
+ configuration << "\nCXX = #{$CXX}"
120
+ return configuration
121
+ end
122
+
123
+ alias_method :link_command_orig, :link_command
124
+ def link_command(ldflags, opt='', libpath=$DEFLIBPATH|$LIBPATH)
125
+ link_command = link_command_orig(ldflags, opt, libpath)
126
+ return Config::expand(
127
+ link_command,
128
+ 'CXXFLAGS' => "#{$CXXFLAGS}")
129
+ end
130
+
131
+ alias_method :create_header_orig, :create_header
132
+ def create_header(header = 'extconf.hpp')
133
+ create_header_orig(header)
134
+ end
135
+
136
+ alias_method :create_makefile_orig, :create_makefile
137
+ def create_makefile(target, srcprefix = nil)
138
+ makefile_creator = RiceMakefileCreator.new
139
+ makefile_creator.create_makefile(target, srcprefix)
140
+ end
141
+ end
142
+
143
+ class RiceMakefileCreator
144
+ def create_makefile(target, srcprefix)
145
+ create_makefile_orig(target, srcprefix)
146
+ end
147
+
148
+ class MakefileWriter
149
+ def self.new(file, mode)
150
+ file = super(file, mode)
151
+ if block_given? then
152
+ begin
153
+ yield file
154
+ ensure
155
+ file.close if not file.closed?
156
+ end
157
+ else
158
+ return file
159
+ end
160
+ end
161
+
162
+ def initialize(file, mode)
163
+ @file = File.open(file, mode)
164
+ end
165
+
166
+ def print(*strings)
167
+ strings.each do |string|
168
+ # Make sure -lruby comes after -lrice (necessary on some
169
+ # platforms)
170
+ string = string.to_s.gsub(/^(LIBS\s*=\s*)(#{Regexp.quote($LIBRUBYARG)})\s+(.*)\s+(#{$LIBS})$/, '\1\3\2 \4')
171
+ @file.print(string)
172
+ end
173
+ end
174
+
175
+ def printf(format, *args)
176
+ @file.printf(format, *args)
177
+ end
178
+
179
+ def close
180
+ @file.close
181
+ end
182
+
183
+ def closed?
184
+ return @file.closed?
185
+ end
186
+ end
187
+
188
+ def open(file, mode, &block)
189
+ # Intercept makefile output using the MakefileWriter
190
+ if file == 'Makefile' then
191
+ return MakefileWriter.new(file, mode, &block)
192
+ else
193
+ return super(file, mode, &block)
194
+ end
195
+ end
196
+ end
197
+
198
+ init_mkmf_rice
199
+