libxml-ruby 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. data/CHANGES +1 -1
  2. data/LICENSE +22 -22
  3. data/README +160 -160
  4. data/Rakefile +0 -9
  5. data/ext/libxml/Makefile +156 -0
  6. data/ext/libxml/extconf.h +5 -0
  7. data/ext/libxml/extconf.rb +4 -160
  8. data/ext/libxml/libxml-ruby.so.a +0 -0
  9. data/ext/libxml/libxml.o +0 -0
  10. data/ext/libxml/libxml_ruby.so +0 -0
  11. data/ext/libxml/mkmf.log +129 -0
  12. data/ext/libxml/ruby_xml.o +0 -0
  13. data/ext/libxml/ruby_xml_attr.c +1 -1
  14. data/ext/libxml/ruby_xml_attr.h +1 -1
  15. data/ext/libxml/ruby_xml_attr.o +0 -0
  16. data/ext/libxml/ruby_xml_attr_decl.o +0 -0
  17. data/ext/libxml/ruby_xml_attributes.o +0 -0
  18. data/ext/libxml/ruby_xml_cbg.o +0 -0
  19. data/ext/libxml/ruby_xml_document.c +936 -936
  20. data/ext/libxml/ruby_xml_document.h +1 -1
  21. data/ext/libxml/ruby_xml_document.o +0 -0
  22. data/ext/libxml/ruby_xml_dtd.o +0 -0
  23. data/ext/libxml/ruby_xml_encoding.o +0 -0
  24. data/ext/libxml/ruby_xml_error.o +0 -0
  25. data/ext/libxml/ruby_xml_html_parser.c +1 -1
  26. data/ext/libxml/ruby_xml_html_parser.h +1 -1
  27. data/ext/libxml/ruby_xml_html_parser.o +0 -0
  28. data/ext/libxml/ruby_xml_html_parser_context.o +0 -0
  29. data/ext/libxml/ruby_xml_html_parser_options.o +0 -0
  30. data/ext/libxml/ruby_xml_input_cbg.o +0 -0
  31. data/ext/libxml/ruby_xml_io.o +0 -0
  32. data/ext/libxml/ruby_xml_namespace.c +1 -1
  33. data/ext/libxml/ruby_xml_namespace.h +1 -1
  34. data/ext/libxml/ruby_xml_namespace.o +0 -0
  35. data/ext/libxml/ruby_xml_namespaces.o +0 -0
  36. data/ext/libxml/ruby_xml_node.c +1386 -1386
  37. data/ext/libxml/ruby_xml_node.h +1 -1
  38. data/ext/libxml/ruby_xml_node.o +0 -0
  39. data/ext/libxml/ruby_xml_parser.c +1 -1
  40. data/ext/libxml/ruby_xml_parser.h +1 -1
  41. data/ext/libxml/ruby_xml_parser.o +0 -0
  42. data/ext/libxml/ruby_xml_parser_context.c +1 -1
  43. data/ext/libxml/ruby_xml_parser_context.h +1 -1
  44. data/ext/libxml/ruby_xml_parser_context.o +0 -0
  45. data/ext/libxml/ruby_xml_parser_options.o +0 -0
  46. data/ext/libxml/ruby_xml_reader.o +0 -0
  47. data/ext/libxml/ruby_xml_relaxng.o +0 -0
  48. data/ext/libxml/ruby_xml_sax2_handler.o +0 -0
  49. data/ext/libxml/ruby_xml_sax_parser.c +1 -1
  50. data/ext/libxml/ruby_xml_sax_parser.h +1 -1
  51. data/ext/libxml/ruby_xml_sax_parser.o +0 -0
  52. data/ext/libxml/ruby_xml_schema.o +0 -0
  53. data/ext/libxml/ruby_xml_version.h +3 -3
  54. data/ext/libxml/ruby_xml_xinclude.c +1 -1
  55. data/ext/libxml/ruby_xml_xinclude.h +1 -1
  56. data/ext/libxml/ruby_xml_xinclude.o +0 -0
  57. data/ext/libxml/ruby_xml_xpath.c +1 -1
  58. data/ext/libxml/ruby_xml_xpath.h +1 -1
  59. data/ext/libxml/ruby_xml_xpath.o +0 -0
  60. data/ext/libxml/ruby_xml_xpath_context.c +1 -1
  61. data/ext/libxml/ruby_xml_xpath_context.h +1 -1
  62. data/ext/libxml/ruby_xml_xpath_context.o +0 -0
  63. data/ext/libxml/ruby_xml_xpath_expression.o +0 -0
  64. data/ext/libxml/ruby_xml_xpath_object.o +0 -0
  65. data/ext/libxml/ruby_xml_xpointer.c +1 -1
  66. data/ext/libxml/ruby_xml_xpointer.h +1 -1
  67. data/ext/libxml/ruby_xml_xpointer.o +0 -0
  68. data/ext/mingw/build.rake +3 -3
  69. data/lib/libxml.rb +29 -29
  70. data/test/model/merge_bug_data.xml +58 -58
  71. data/test/model/rubynet.xml +79 -79
  72. data/test/model/xinclude.xml +4 -4
  73. data/test/tc_attr.rb +170 -170
  74. data/test/tc_document.rb +113 -113
  75. data/test/tc_document_write.rb +117 -117
  76. data/test/tc_dtd.rb +123 -123
  77. data/test/tc_html_parser.rb +137 -137
  78. data/test/tc_node.rb +180 -180
  79. data/test/tc_node_cdata.rb +49 -49
  80. data/test/tc_node_comment.rb +30 -30
  81. data/test/tc_node_edit.rb +157 -157
  82. data/test/tc_node_xlink.rb +26 -26
  83. data/test/tc_parser.rb +329 -329
  84. data/test/tc_parser_context.rb +185 -185
  85. data/test/tc_reader.rb +283 -283
  86. data/test/tc_sax_parser.rb +273 -273
  87. data/test/tc_schema.rb +51 -51
  88. data/test/tc_xinclude.rb +19 -19
  89. data/test/tc_xpath.rb +193 -193
  90. data/test/tc_xpointer.rb +72 -72
  91. metadata +55 -14
  92. data/ext/libxml/build.log +0 -4
data/CHANGES CHANGED
@@ -8,7 +8,7 @@
8
8
  * Correctly set up parser context options.
9
9
 
10
10
  * Simplify DOM modification code (Node#next=, Node#prev=, Node#sibling=) and
11
- update documenation.
11
+ update documentation.
12
12
 
13
13
  * Deprecated Node#add_child and Node#child=, use Node#<< instead
14
14
 
data/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2008-2009 Charlie Savage and contributors
2
- Copyright (c) 2002-2007 Sean Chittenden and contributors
3
- Copyright (c) 2001 Wai-Sun "Squidster" Chia
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
- of the Software, and to permit persons to whom the Software is furnished to do
10
- so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ Copyright (c) 2008-2009 Charlie Savage and contributors
2
+ Copyright (c) 2002-2007 Sean Chittenden and contributors
3
+ Copyright (c) 2001 Wai-Sun "Squidster" Chia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README CHANGED
@@ -1,161 +1,161 @@
1
- = LibXML Ruby
2
-
3
- == Overview
4
- The libxml gem provides Ruby language bindings for GNOME's Libxml2
5
- XML toolkit. It is free software, released under the MIT License.
6
-
7
- We think libxml-ruby is the best XML library for Ruby because:
8
-
9
- * Speed - Its much faster than REXML and Hpricot
10
- * Features - It provides an amazing number of featues
11
- * Conformance - It passes all 1800+ tests from the OASIS XML Tests Suite
12
-
13
- == Requirements
14
- libxml-ruby requires Ruby 1.8.4 or higher. It is dependent on
15
- the following libraries to function properly:
16
-
17
- * libm (math routines: very standard)
18
- * libz (zlib)
19
- * libiconv
20
- * libxml2
21
-
22
- If you are running Linux or Unix you'll need a C compiler so the
23
- extension can be compiled when it is installed. If you are running
24
- Windows, then install the Windows specific RubyGem which
25
- includes an already built extension.
26
-
27
- == INSTALLATION
28
- The easiest way to install libxml-ruby is via Ruby Gems. To install:
29
-
30
- <tt>gem install libxml-ruby</tt>
31
-
32
- If you are running Windows, make sure to install the Win32 RubyGem
33
- which includes an already built binary file. The binary is built
34
- against libxml2 version 2.7.2 and iconv version 1.11. Both of these
35
- are also included as pre-built binaries, and should be put either in
36
- the libxml/lib directory or on the Windows path. Due to a bug
37
- in ruby-gems, you cannot install the gem to a path that contains
38
- spaces (see http://rubyforge.org/tracker/?func=detail&aid=23003&group_id=126&atid=577).
39
-
40
- The Windows binaries are built with MingW and include libxml-ruby,
41
- libxml2 and iconv. The gem also includes a Microsoft VC++ 2008
42
- solution. If you wish to run a debug version of libxml-ruby on
43
- Windows, then it is highly recommended you use VC++.
44
-
45
- == Getting Started
46
- Using libxml is easy. First decide what parser you want to use:
47
-
48
- * Generally you'll want to use the LibXML::XML::Parser which provides a tree based API.
49
- * For larger documents that don't fit into memory, or if you prefer an input based API, use the LibXML::XML::Reader.
50
- * To parse HTML files use LibXML::XML::HTMLParser.
51
- * If you are masochistic, then use the LibXML::XML::SaxParser, which provides a callback API.
52
-
53
- Once you have choosen a parser, choose a datasource. Libxml can parse files, strings, URIs
54
- and IO streams. For each data source you can specify an LibXML::XML::Encoding, a base uri and
55
- various parser options. For more information, refer the LibXML::XML::Parser.document,
56
- LibXML::XML::Parser.file, LibXML::XML::Parser.io or LibXML:::XML::Parser.string methods (the
57
- same methods are defined on all four parser classes).
58
-
59
- == Advanced Functionality
60
- Beyond the basics of parsing and processing XML and HTML documents,
61
- libxml provides a wealth of additional functionality.
62
-
63
- Most commonly, you'll want to use its LibXML::XML::XPath support, which makes
64
- it easy to find data inside a XML document. Although not as popular,
65
- LibXML::XML::XPointer provides another API for finding data inside an XML document.
66
-
67
- Often times you'll need to validate data before processing it. For example,
68
- if you accept user generated content submitted over the Web, you'll
69
- want to verify that it does not contain malicious code such as embedded scripts.
70
- This can be done using libxml's powerful set of validators:
71
-
72
- * DTDs (LibXML::XML::Dtd)
73
- * Relax Schemas (LibXML::XML::RelaxNG)
74
- * XML Schema (LibXML::XML::Schema)
75
-
76
- Finally, if you'd like to use XSL Transformations to process data,
77
- then install the libxslt gem which is available at
78
- http://rubyforge.org/projects/libxsl/.
79
-
80
- == Usage
81
- For in-depth information about using libxml-ruby please refer
82
- to its online Rdoc documentation.
83
-
84
- All libxml classes are in the LibXML::XML module. The easiest
85
- way to use libxml is to require 'xml'. This will mixin
86
- the LibXML module into the global namespace, allowing you to
87
- write code like this:
88
-
89
- require 'xml'
90
- document = XML::Document.new
91
-
92
- However, when creating an application or library you plan to
93
- redistribute, it is best to not add the LibXML module to the global
94
- namespace, in which case you can either write your code like this:
95
-
96
- require 'libxml'
97
- document = LibXML::XML::Document.new
98
-
99
- Or you can utilize a namespace for you own work and include LibXML into it.
100
- For example:
101
-
102
- require 'libxml'
103
-
104
- mdoule MyApplication
105
- include LibXML
106
-
107
- class MyClass
108
- def some_method
109
- document = XML::Document.new
110
- end
111
- end
112
- end
113
-
114
- For simplicity's sake, the documentation uses the xml module in its examples.
115
-
116
- == Performance
117
- In addition to being feature rich and conformation, the main reason
118
- people use libxml-ruby is for performance. Here are the results
119
- of a couple simple benchmarks recently blogged about on the
120
- Web (you can find them in the benchmark directory of the
121
- libxml distribution).
122
-
123
- From http://depixelate.com/2008/4/23/ruby-xml-parsing-benchmarks
124
-
125
- user system total real
126
- libxml 0.032000 0.000000 0.032000 ( 0.031000)
127
- Hpricot 0.640000 0.031000 0.671000 ( 0.890000)
128
- REXML 1.813000 0.047000 1.860000 ( 2.031000)
129
-
130
- From https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
131
-
132
- user system total real
133
- libxml 0.641000 0.031000 0.672000 ( 0.672000)
134
- hpricot 5.359000 0.062000 5.421000 ( 5.516000)
135
- rexml 22.859000 0.047000 22.906000 ( 23.203000)
136
-
137
-
138
- == Documentation
139
- Documentation is provided via rdoc. To generate the documentation,
140
- run the the command 'rake doc'. libxml-ruby's online documentation
141
- is generated using Hanna. To use hanna:
142
-
143
- gem install mislav-hanna
144
- rake rdoc RDOCOPT="-S -T hanna"
145
-
146
- Note that older versions of Rdoc, which ship with Ruby 1.8.x, will report
147
- a number of errors. To avoid them, install Rdoc 2.1 or higher from
148
- RubyForge (http://rdoc.rubyforge.org/). Once you have installed the gem,
149
- you'll have to disable the version of Rdoc that Ruby 1.8.x includes. An
150
- easy way to do that is rename the directory uby/lib/ruby/1.8/rdoc to
151
- ruby/lib/ruby/1.8/rdoc_old.
152
-
153
- == Support
154
-
155
- If you have any questions about using libxml-ruby, please send them to
156
- libxml-devel@rubyforge.org. If you have found any bugs in libxml-devel,
157
- or have developed new patches, please submit them to Ruby Forge at
158
- http://rubyforge.org/tracker/?group_id=494.
159
-
160
- == License
1
+ = LibXML Ruby
2
+
3
+ == Overview
4
+ The libxml gem provides Ruby language bindings for GNOME's Libxml2
5
+ XML toolkit. It is free software, released under the MIT License.
6
+
7
+ We think libxml-ruby is the best XML library for Ruby because:
8
+
9
+ * Speed - Its much faster than REXML and Hpricot
10
+ * Features - It provides an amazing number of featues
11
+ * Conformance - It passes all 1800+ tests from the OASIS XML Tests Suite
12
+
13
+ == Requirements
14
+ libxml-ruby requires Ruby 1.8.4 or higher. It is dependent on
15
+ the following libraries to function properly:
16
+
17
+ * libm (math routines: very standard)
18
+ * libz (zlib)
19
+ * libiconv
20
+ * libxml2
21
+
22
+ If you are running Linux or Unix you'll need a C compiler so the
23
+ extension can be compiled when it is installed. If you are running
24
+ Windows, then install the Windows specific RubyGem which
25
+ includes an already built extension.
26
+
27
+ == INSTALLATION
28
+ The easiest way to install libxml-ruby is via Ruby Gems. To install:
29
+
30
+ <tt>gem install libxml-ruby</tt>
31
+
32
+ If you are running Windows, make sure to install the Win32 RubyGem
33
+ which includes an already built binary file. The binary is built
34
+ against libxml2 version 2.7.2 and iconv version 1.11. Both of these
35
+ are also included as pre-built binaries, and should be put either in
36
+ the libxml/lib directory or on the Windows path. Due to a bug
37
+ in ruby-gems, you cannot install the gem to a path that contains
38
+ spaces (see http://rubyforge.org/tracker/?func=detail&aid=23003&group_id=126&atid=577).
39
+
40
+ The Windows binaries are built with MingW and include libxml-ruby,
41
+ libxml2 and iconv. The gem also includes a Microsoft VC++ 2008
42
+ solution. If you wish to run a debug version of libxml-ruby on
43
+ Windows, then it is highly recommended you use VC++.
44
+
45
+ == Getting Started
46
+ Using libxml is easy. First decide what parser you want to use:
47
+
48
+ * Generally you'll want to use the LibXML::XML::Parser which provides a tree based API.
49
+ * For larger documents that don't fit into memory, or if you prefer an input based API, use the LibXML::XML::Reader.
50
+ * To parse HTML files use LibXML::XML::HTMLParser.
51
+ * If you are masochistic, then use the LibXML::XML::SaxParser, which provides a callback API.
52
+
53
+ Once you have choosen a parser, choose a datasource. Libxml can parse files, strings, URIs
54
+ and IO streams. For each data source you can specify an LibXML::XML::Encoding, a base uri and
55
+ various parser options. For more information, refer the LibXML::XML::Parser.document,
56
+ LibXML::XML::Parser.file, LibXML::XML::Parser.io or LibXML:::XML::Parser.string methods (the
57
+ same methods are defined on all four parser classes).
58
+
59
+ == Advanced Functionality
60
+ Beyond the basics of parsing and processing XML and HTML documents,
61
+ libxml provides a wealth of additional functionality.
62
+
63
+ Most commonly, you'll want to use its LibXML::XML::XPath support, which makes
64
+ it easy to find data inside a XML document. Although not as popular,
65
+ LibXML::XML::XPointer provides another API for finding data inside an XML document.
66
+
67
+ Often times you'll need to validate data before processing it. For example,
68
+ if you accept user generated content submitted over the Web, you'll
69
+ want to verify that it does not contain malicious code such as embedded scripts.
70
+ This can be done using libxml's powerful set of validators:
71
+
72
+ * DTDs (LibXML::XML::Dtd)
73
+ * Relax Schemas (LibXML::XML::RelaxNG)
74
+ * XML Schema (LibXML::XML::Schema)
75
+
76
+ Finally, if you'd like to use XSL Transformations to process data,
77
+ then install the libxslt gem which is available at
78
+ http://rubyforge.org/projects/libxsl/.
79
+
80
+ == Usage
81
+ For in-depth information about using libxml-ruby please refer
82
+ to its online Rdoc documentation.
83
+
84
+ All libxml classes are in the LibXML::XML module. The easiest
85
+ way to use libxml is to require 'xml'. This will mixin
86
+ the LibXML module into the global namespace, allowing you to
87
+ write code like this:
88
+
89
+ require 'xml'
90
+ document = XML::Document.new
91
+
92
+ However, when creating an application or library you plan to
93
+ redistribute, it is best to not add the LibXML module to the global
94
+ namespace, in which case you can either write your code like this:
95
+
96
+ require 'libxml'
97
+ document = LibXML::XML::Document.new
98
+
99
+ Or you can utilize a namespace for you own work and include LibXML into it.
100
+ For example:
101
+
102
+ require 'libxml'
103
+
104
+ mdoule MyApplication
105
+ include LibXML
106
+
107
+ class MyClass
108
+ def some_method
109
+ document = XML::Document.new
110
+ end
111
+ end
112
+ end
113
+
114
+ For simplicity's sake, the documentation uses the xml module in its examples.
115
+
116
+ == Performance
117
+ In addition to being feature rich and conformation, the main reason
118
+ people use libxml-ruby is for performance. Here are the results
119
+ of a couple simple benchmarks recently blogged about on the
120
+ Web (you can find them in the benchmark directory of the
121
+ libxml distribution).
122
+
123
+ From http://depixelate.com/2008/4/23/ruby-xml-parsing-benchmarks
124
+
125
+ user system total real
126
+ libxml 0.032000 0.000000 0.032000 ( 0.031000)
127
+ Hpricot 0.640000 0.031000 0.671000 ( 0.890000)
128
+ REXML 1.813000 0.047000 1.860000 ( 2.031000)
129
+
130
+ From https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
131
+
132
+ user system total real
133
+ libxml 0.641000 0.031000 0.672000 ( 0.672000)
134
+ hpricot 5.359000 0.062000 5.421000 ( 5.516000)
135
+ rexml 22.859000 0.047000 22.906000 ( 23.203000)
136
+
137
+
138
+ == Documentation
139
+ Documentation is provided via rdoc. To generate the documentation,
140
+ run the the command 'rake doc'. libxml-ruby's online documentation
141
+ is generated using Hanna. To use hanna:
142
+
143
+ gem install mislav-hanna
144
+ rake rdoc RDOCOPT="-S -T hanna"
145
+
146
+ Note that older versions of Rdoc, which ship with Ruby 1.8.x, will report
147
+ a number of errors. To avoid them, install Rdoc 2.1 or higher from
148
+ RubyForge (http://rdoc.rubyforge.org/). Once you have installed the gem,
149
+ you'll have to disable the version of Rdoc that Ruby 1.8.x includes. An
150
+ easy way to do that is rename the directory uby/lib/ruby/1.8/rdoc to
151
+ ruby/lib/ruby/1.8/rdoc_old.
152
+
153
+ == Support
154
+
155
+ If you have any questions about using libxml-ruby, please send them to
156
+ libxml-devel@rubyforge.org. If you have found any bugs in libxml-devel,
157
+ or have developed new patches, please submit them to Ruby Forge at
158
+ http://rubyforge.org/tracker/?group_id=494.
159
+
160
+ == License
161
161
  See LICENSE for license information.
data/Rakefile CHANGED
@@ -125,10 +125,6 @@ task :extension => :build
125
125
 
126
126
  ext = Config::CONFIG["DLEXT"]
127
127
  task :extensions => ["ext/libxml/libxml_ruby.#{ext}"]
128
- file "ext/libxml/libxml_ruby.#{ext}" =>
129
- ["ext/libxml/Makefile"] + FileList["ext/libxml/*.{c,h}"].to_a do |t|
130
- Dir.chdir("ext/libxml") { sh "make" }
131
- end
132
128
 
133
129
  namespace :extensions do
134
130
  task :clean do
@@ -139,11 +135,6 @@ namespace :extensions do
139
135
  end
140
136
  end
141
137
 
142
- file "ext/libxml/Makefile" => ["ext/libxml/extconf.rb"] do
143
- command = ["ruby"] + $:.map{|dir| "-I#{File.expand_path dir}"} + ["extconf.rb"]
144
- Dir.chdir("ext/libxml") { sh(*command) }
145
- end
146
-
147
138
  # --------- Publish Website to Rubyforge ---------
148
139
  desc "publish website (uses rsync)"
149
140
  task :publish => [:publish_website, :publish_rdoc]
@@ -0,0 +1,156 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = .
7
+ topdir = /c/Development/Ruby/lib/ruby/1.8/i386-mingw32
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir):$(topdir):$(hdrdir)
10
+
11
+ DESTDIR = c:
12
+ exec_prefix = $(prefix)
13
+ prefix = $(DESTDIR)/Development/Ruby
14
+ sharedstatedir = $(prefix)/com
15
+ mandir = $(datarootdir)/man
16
+ psdir = $(docdir)
17
+ oldincludedir = $(DESTDIR)/usr/include
18
+ localedir = $(datarootdir)/locale
19
+ bindir = $(exec_prefix)/bin
20
+ libexecdir = $(exec_prefix)/libexec
21
+ sitedir = $(libdir)/ruby/site_ruby
22
+ htmldir = $(docdir)
23
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
24
+ includedir = $(prefix)/include
25
+ infodir = $(datarootdir)/info
26
+ vendorlibdir = $(vendordir)/$(ruby_version)
27
+ sysconfdir = $(prefix)/etc
28
+ libdir = $(exec_prefix)/lib
29
+ sbindir = $(exec_prefix)/sbin
30
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
31
+ docdir = $(datarootdir)/doc/$(PACKAGE)
32
+ dvidir = $(docdir)
33
+ vendordir = $(libdir)/ruby/vendor_ruby
34
+ datarootdir = $(prefix)/share
35
+ pdfdir = $(docdir)
36
+ archdir = $(rubylibdir)/$(arch)
37
+ sitearchdir = $(sitelibdir)/$(sitearch)
38
+ datadir = $(datarootdir)
39
+ localstatedir = $(prefix)/var
40
+ sitelibdir = $(sitedir)/$(ruby_version)
41
+
42
+ CC = gcc
43
+ LIBRUBY = lib$(LIBRUBY_SO).a
44
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
45
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
46
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
47
+
48
+ RUBY_EXTCONF_H = extconf.h
49
+ CFLAGS = -g -O2 $(cflags) -I. -Ic:/Development/Ruby/lib/ruby/1.8/i386-mingw32 -I. -I/usr/local/include
50
+ INCFLAGS = -I. -I. -Ic:/Development/Ruby/lib/ruby/1.8/i386-mingw32 -I. -I/usr/local/include
51
+ DEFS =
52
+ CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -IC:/Development/msys/local/include/libxml2
53
+ CXXFLAGS = $(CFLAGS)
54
+ ldflags = -L. -Wl,--out-implib=libxml-ruby.so.a
55
+ dldflags = -Wl,--enable-auto-image-base,--enable-auto-import,--export-all
56
+ archflag =
57
+ DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
58
+ LDSHARED = gcc -shared -s
59
+ AR = ar
60
+ EXEEXT = .exe
61
+
62
+ RUBY_INSTALL_NAME = ruby
63
+ RUBY_SO_NAME = msvcrt-ruby18
64
+ arch = i386-mingw32
65
+ sitearch = i386-msvcrt
66
+ ruby_version = 1.8
67
+ ruby = c:/Development/Ruby/bin/ruby
68
+ RUBY = $(ruby)
69
+ RM = rm -f
70
+ MAKEDIRS = mkdir -p
71
+ INSTALL = /bin/install -c
72
+ INSTALL_PROG = $(INSTALL) -m 0755
73
+ INSTALL_DATA = $(INSTALL) -m 644
74
+ COPY = cp
75
+
76
+ #### End of system configuration section. ####
77
+
78
+ preload =
79
+
80
+ libpath = . $(libdir) c:/Development/Ruby/lib
81
+ LIBPATH = -L. -L$(libdir) -Lc:/Development/Ruby/lib
82
+ DEFFILE =
83
+
84
+ CLEANFILES = mkmf.log
85
+ DISTCLEANFILES =
86
+
87
+ extout =
88
+ extout_prefix =
89
+ target_prefix =
90
+ LOCAL_LIBS =
91
+ LIBS = $(LIBRUBYARG_SHARED) -lxml2 -liconv -lz -lshell32 -lwsock32
92
+ SRCS = libxml.c ruby_xml.c ruby_xml_attr.c ruby_xml_attributes.c ruby_xml_attr_decl.c ruby_xml_cbg.c ruby_xml_document.c ruby_xml_dtd.c ruby_xml_encoding.c ruby_xml_error.c ruby_xml_html_parser.c ruby_xml_html_parser_context.c ruby_xml_html_parser_options.c ruby_xml_input_cbg.c ruby_xml_io.c ruby_xml_namespace.c ruby_xml_namespaces.c ruby_xml_node.c ruby_xml_parser.c ruby_xml_parser_context.c ruby_xml_parser_options.c ruby_xml_reader.c ruby_xml_relaxng.c ruby_xml_sax2_handler.c ruby_xml_sax_parser.c ruby_xml_schema.c ruby_xml_xinclude.c ruby_xml_xpath.c ruby_xml_xpath_context.c ruby_xml_xpath_expression.c ruby_xml_xpath_object.c ruby_xml_xpointer.c
93
+ OBJS = libxml.o ruby_xml.o ruby_xml_attr.o ruby_xml_attributes.o ruby_xml_attr_decl.o ruby_xml_cbg.o ruby_xml_document.o ruby_xml_dtd.o ruby_xml_encoding.o ruby_xml_error.o ruby_xml_html_parser.o ruby_xml_html_parser_context.o ruby_xml_html_parser_options.o ruby_xml_input_cbg.o ruby_xml_io.o ruby_xml_namespace.o ruby_xml_namespaces.o ruby_xml_node.o ruby_xml_parser.o ruby_xml_parser_context.o ruby_xml_parser_options.o ruby_xml_reader.o ruby_xml_relaxng.o ruby_xml_sax2_handler.o ruby_xml_sax_parser.o ruby_xml_schema.o ruby_xml_xinclude.o ruby_xml_xpath.o ruby_xml_xpath_context.o ruby_xml_xpath_expression.o ruby_xml_xpath_object.o ruby_xml_xpointer.o
94
+ TARGET = libxml_ruby
95
+ DLLIB = $(TARGET).so
96
+ EXTSTATIC =
97
+ STATIC_LIB =
98
+
99
+ BINDIR = $(bindir)
100
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
101
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
102
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
103
+
104
+ TARGET_SO = $(DLLIB)
105
+ CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
106
+ CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
107
+
108
+ all: $(DLLIB)
109
+ static: $(STATIC_LIB)
110
+
111
+ clean:
112
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
113
+
114
+ distclean: clean
115
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
116
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
117
+
118
+ realclean: distclean
119
+ install: install-so install-rb
120
+
121
+ install-so: $(RUBYARCHDIR)
122
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
123
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
124
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
125
+ install-rb: pre-install-rb install-rb-default
126
+ install-rb-default: pre-install-rb-default
127
+ pre-install-rb: Makefile
128
+ pre-install-rb-default: Makefile
129
+ $(RUBYARCHDIR):
130
+ $(MAKEDIRS) $@
131
+
132
+ site-install: site-install-so site-install-rb
133
+ site-install-so: install-so
134
+ site-install-rb: install-rb
135
+
136
+ .SUFFIXES: .c .m .cc .cxx .cpp .o
137
+
138
+ .cc.o:
139
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
140
+
141
+ .cxx.o:
142
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
143
+
144
+ .cpp.o:
145
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
146
+
147
+ .c.o:
148
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
149
+
150
+ $(DLLIB): $(OBJS) Makefile
151
+ @-$(RM) $@
152
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
153
+
154
+
155
+
156
+ $(OBJS): ruby.h defines.h $(RUBY_EXTCONF_H)