rice-jdguyot 1.4.0.p1

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