mkrf 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. data/CHANGELOG +2 -0
  2. data/MIT-LICENSE +7 -0
  3. data/README +54 -0
  4. data/Rakefile +107 -0
  5. data/lib/mkrf.rb +4 -0
  6. data/lib/mkrf/availability.rb +219 -0
  7. data/lib/mkrf/generator.rb +146 -0
  8. data/test/abstract_unit.rb +4 -0
  9. data/test/fixtures/down_a_directory/header_down_a_directory.h +1 -0
  10. data/test/fixtures/stdmkrf.h +1 -0
  11. data/test/sample_files/libtrivial/Rakefile +31 -0
  12. data/test/sample_files/libtrivial/extconf.rb +3 -0
  13. data/test/sample_files/libtrivial/lib/libtrivial.c +5 -0
  14. data/test/sample_files/libtrivial/lib/libtrivial.o +0 -0
  15. data/test/sample_files/libtrivial/libtrivial_so.bundle +0 -0
  16. data/test/sample_files/libtrivial/mkrf.log +1 -0
  17. data/test/sample_files/libxml-ruby-0.3.8/CHANGELOG +74 -0
  18. data/test/sample_files/libxml-ruby-0.3.8/LICENSE +22 -0
  19. data/test/sample_files/libxml-ruby-0.3.8/README +144 -0
  20. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/cbg.c +76 -0
  21. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/extconf.rb +49 -0
  22. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml.c +86 -0
  23. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml.h +82 -0
  24. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml.rb +107 -0
  25. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/mkrf.log +1 -0
  26. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/old_extconf.rb +95 -0
  27. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attr.c +372 -0
  28. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attr.h +21 -0
  29. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attribute.c +224 -0
  30. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attribute.h +21 -0
  31. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_document.c +1159 -0
  32. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_document.h +27 -0
  33. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_dtd.c +168 -0
  34. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_dtd.h +17 -0
  35. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_input_cbg.c +167 -0
  36. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_input_cbg.h +21 -0
  37. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node.c +2139 -0
  38. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node.h +28 -0
  39. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node_set.c +248 -0
  40. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node_set.h +26 -0
  41. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_ns.c +153 -0
  42. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_ns.h +21 -0
  43. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser.c +1417 -0
  44. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser.h +31 -0
  45. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser_context.c +715 -0
  46. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser_context.h +22 -0
  47. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_sax_parser.c +426 -0
  48. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_sax_parser.h +52 -0
  49. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_schema.c +142 -0
  50. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_schema.h +16 -0
  51. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_tree.c +43 -0
  52. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_tree.h +12 -0
  53. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xinclude.c +20 -0
  54. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xinclude.h +13 -0
  55. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath.c +363 -0
  56. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath.h +24 -0
  57. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath_context.c +125 -0
  58. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath_context.h +24 -0
  59. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer.c +100 -0
  60. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer.h +27 -0
  61. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer_context.c +21 -0
  62. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer_context.h +18 -0
  63. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/sax_parser_callbacks.inc +202 -0
  64. data/test/sample_files/syck-0.55/CHANGELOG +186 -0
  65. data/test/sample_files/syck-0.55/COPYING +54 -0
  66. data/test/sample_files/syck-0.55/Makefile +582 -0
  67. data/test/sample_files/syck-0.55/Makefile.am +5 -0
  68. data/test/sample_files/syck-0.55/Makefile.in +582 -0
  69. data/test/sample_files/syck-0.55/README +105 -0
  70. data/test/sample_files/syck-0.55/README.BYTECODE +484 -0
  71. data/test/sample_files/syck-0.55/README.EXT +444 -0
  72. data/test/sample_files/syck-0.55/RELEASE +123 -0
  73. data/test/sample_files/syck-0.55/TODO +25 -0
  74. data/test/sample_files/syck-0.55/aclocal.m4 +883 -0
  75. data/test/sample_files/syck-0.55/bootstrap +7 -0
  76. data/test/sample_files/syck-0.55/config.h +79 -0
  77. data/test/sample_files/syck-0.55/config.h.in +78 -0
  78. data/test/sample_files/syck-0.55/config.status +1197 -0
  79. data/test/sample_files/syck-0.55/config/README +14 -0
  80. data/test/sample_files/syck-0.55/config/depcomp +529 -0
  81. data/test/sample_files/syck-0.55/config/install-sh +323 -0
  82. data/test/sample_files/syck-0.55/config/missing +357 -0
  83. data/test/sample_files/syck-0.55/configure +6728 -0
  84. data/test/sample_files/syck-0.55/configure.in +36 -0
  85. data/test/sample_files/syck-0.55/ext/ruby/CHANGELOG +303 -0
  86. data/test/sample_files/syck-0.55/ext/ruby/README +400 -0
  87. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/MANIFEST +1 -0
  88. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/bytecode.c +1170 -0
  89. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/emitter.c +1224 -0
  90. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/extconf.rb +10 -0
  91. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/gram.c +1894 -0
  92. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/gram.h +79 -0
  93. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/handler.c +174 -0
  94. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/implicit.c +2989 -0
  95. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/mkrf.log +1 -0
  96. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/node.c +407 -0
  97. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/rubyext.c +2385 -0
  98. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/syck.c +504 -0
  99. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/syck.h +458 -0
  100. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/token.c +2707 -0
  101. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/yaml2byte.c +250 -0
  102. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/yamlbyte.h +170 -0
  103. data/test/sample_files/syck-0.55/ext/ruby/install.rb +1022 -0
  104. data/test/sample_files/syck-0.55/ext/ruby/lib/okay.rb +161 -0
  105. data/test/sample_files/syck-0.55/ext/ruby/lib/okay/news.rb +69 -0
  106. data/test/sample_files/syck-0.55/ext/ruby/lib/okay/rpc.rb +434 -0
  107. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml.rb +436 -0
  108. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/baseemitter.rb +247 -0
  109. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/basenode.rb +216 -0
  110. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/compat.rb +26 -0
  111. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/constants.rb +45 -0
  112. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/dbm.rb +111 -0
  113. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/emitter.rb +107 -0
  114. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/encoding.rb +33 -0
  115. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/error.rb +34 -0
  116. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/rubytypes.rb +438 -0
  117. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/store.rb +29 -0
  118. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/stream.rb +40 -0
  119. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/stringio.rb +83 -0
  120. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/syck.rb +19 -0
  121. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/tag.rb +86 -0
  122. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/types.rb +188 -0
  123. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/yamlnode.rb +54 -0
  124. data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/ypath.rb +52 -0
  125. data/test/sample_files/syck-0.55/ext/ruby/lib/yod.rb +1168 -0
  126. data/test/sample_files/syck-0.55/ext/ruby/samples/okayNews-modules.rb +27 -0
  127. data/test/sample_files/syck-0.55/ext/ruby/samples/okayNews-sample.rb +336 -0
  128. data/test/sample_files/syck-0.55/ext/ruby/samples/okayNews-validate.rb +341 -0
  129. data/test/sample_files/syck-0.55/ext/ruby/samples/okayRpc-client.rb +51 -0
  130. data/test/sample_files/syck-0.55/ext/ruby/samples/okayRpc-server.rb +85 -0
  131. data/test/sample_files/syck-0.55/ext/ruby/samples/yaml-sortHashKeys.rb +128 -0
  132. data/test/sample_files/syck-0.55/ext/ruby/tests/basic.rb +1653 -0
  133. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsAnchorAlias.yml +51 -0
  134. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsBasicTests.yml +282 -0
  135. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsBlockMapping.yml +78 -0
  136. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsBlockSequence.yml +0 -0
  137. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml +102 -0
  138. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsErrorTests.yml +23 -0
  139. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsFlowCollections.yml +73 -0
  140. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsFoldedScalars.yml +215 -0
  141. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsMapInSeq.yml +0 -0
  142. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsNullsAndEmpties.yml +66 -0
  143. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsRubyTests.yml +182 -0
  144. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsSpecificationExamples.yml +2699 -0
  145. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsTypeTransfers.yml +265 -0
  146. data/test/sample_files/syck-0.55/ext/ruby/yts/YtsYpath.yml +221 -0
  147. data/test/sample_files/syck-0.55/ext/ruby/yts/cookbook.rb +159 -0
  148. data/test/sample_files/syck-0.55/ext/ruby/yts/index.yml +10 -0
  149. data/test/sample_files/syck-0.55/ext/ruby/yts/yts.rb +193 -0
  150. data/test/sample_files/syck-0.55/lib/Makefile +497 -0
  151. data/test/sample_files/syck-0.55/lib/Makefile.am +27 -0
  152. data/test/sample_files/syck-0.55/lib/Makefile.in +497 -0
  153. data/test/sample_files/syck-0.55/lib/bytecode.c +1170 -0
  154. data/test/sample_files/syck-0.55/lib/bytecode.re +525 -0
  155. data/test/sample_files/syck-0.55/lib/emitter.c +1224 -0
  156. data/test/sample_files/syck-0.55/lib/gram.c +1894 -0
  157. data/test/sample_files/syck-0.55/lib/gram.h +79 -0
  158. data/test/sample_files/syck-0.55/lib/gram.output +2005 -0
  159. data/test/sample_files/syck-0.55/lib/gram.y +481 -0
  160. data/test/sample_files/syck-0.55/lib/handler.c +174 -0
  161. data/test/sample_files/syck-0.55/lib/implicit.c +2989 -0
  162. data/test/sample_files/syck-0.55/lib/implicit.re +206 -0
  163. data/test/sample_files/syck-0.55/lib/node.c +407 -0
  164. data/test/sample_files/syck-0.55/lib/syck.c +504 -0
  165. data/test/sample_files/syck-0.55/lib/syck.h +458 -0
  166. data/test/sample_files/syck-0.55/lib/syck_st.c +577 -0
  167. data/test/sample_files/syck-0.55/lib/syck_st.h +46 -0
  168. data/test/sample_files/syck-0.55/lib/token.c +2707 -0
  169. data/test/sample_files/syck-0.55/lib/token.re +1139 -0
  170. data/test/sample_files/syck-0.55/lib/yaml2byte.c +250 -0
  171. data/test/sample_files/syck-0.55/lib/yamlbyte.h +170 -0
  172. data/test/sample_files/syck-0.55/stamp-h1 +1 -0
  173. data/test/sample_files/syck-0.55/tests/Basic.c +141 -0
  174. data/test/sample_files/syck-0.55/tests/CuTest.c +294 -0
  175. data/test/sample_files/syck-0.55/tests/CuTest.h +84 -0
  176. data/test/sample_files/syck-0.55/tests/Emit.c +87 -0
  177. data/test/sample_files/syck-0.55/tests/Makefile +480 -0
  178. data/test/sample_files/syck-0.55/tests/Makefile.am +13 -0
  179. data/test/sample_files/syck-0.55/tests/Makefile.in +480 -0
  180. data/test/sample_files/syck-0.55/tests/Parse.c +208 -0
  181. data/test/sample_files/syck-0.55/tests/YTS.c +2310 -0
  182. data/test/sample_files/syck-0.55/tests/YTS.c.erb +326 -0
  183. data/test/sample_files/syck-0.55/tests/YTS.c.rb +44 -0
  184. data/test/test_availability.rb +68 -0
  185. data/test/test_generator.rb +74 -0
  186. metadata +252 -0
@@ -0,0 +1,159 @@
1
+ # vim:sw=4:ts=4
2
+ # $Id: cookbook.rb,v 1.1 2003/06/05 17:30:03 whythluckystiff Exp $
3
+ #
4
+ # Cookbook Generator for YamlTestingSuite
5
+ #
6
+ require 'erb/erbl'
7
+ require 'yaml'
8
+
9
+ ytsFiles = [
10
+ [ 'YtsBasicTests.yml', {
11
+ 'name' => 'Collections',
12
+ 'doc' => []
13
+ } ],
14
+ [ 'YtsFlowCollections.yml', {
15
+ 'name' => 'Inline Collections',
16
+ 'doc' => []
17
+ } ],
18
+ [ 'YtsTypeTransfers.yml', {
19
+ 'name' => 'Basic Types',
20
+ 'doc' => []
21
+ } ],
22
+ [ 'YtsFoldedScalars.yml', {
23
+ 'name' => 'Blocks',
24
+ 'doc' => []
25
+ } ],
26
+ [ 'YtsAnchorAlias.yml', {
27
+ 'name' => 'Aliases and Anchors',
28
+ 'doc' => []
29
+ } ],
30
+ [ 'YtsDocumentSeparator.yml', {
31
+ 'name' => 'Documents',
32
+ 'doc' => []
33
+ } ],
34
+ [ 'YtsRubyTests.yml', {
35
+ 'name' => 'YAML For Ruby',
36
+ 'doc' => []
37
+ } ]
38
+ # [ 'YtsSpecificationExamples.yml', {
39
+ # 'name' => 'Examples from the Specification',
40
+ # 'doc' => []
41
+ # } ]
42
+ ]
43
+
44
+ ytsFiles.each do |yt|
45
+ yt[1]['doc'] = YAML::load_stream( File.open( yt[0] ) )
46
+ yt[1]['href'] = yt[1]['name'].downcase.gsub( /\s+/, '_' )
47
+ end
48
+
49
+ erb = ERbLight.new( <<TMPL
50
+
51
+ <a NAME="__index__"></a>
52
+
53
+ <!-- INDEX BEGIN -->
54
+ <ul>
55
+ <% ytsFiles.each do |yt| %>
56
+
57
+ <li><a HREF="#<%= yt[1]['href'] %>"><%= yt[1]['name'] %></a></li>
58
+ <% if yt[1]['doc'].documents.length > 0 %>
59
+ <ul>
60
+ <%
61
+ yt[1]['doc'].documents.each do |ydoc|
62
+ ydoc['href'] = ydoc['test'].downcase.gsub( /\s+/, '_' ) if ydoc['test']
63
+ %>
64
+ <li><a HREF="#<%= ydoc['href'] %>"><%= ydoc['test'] %></a></li>
65
+ <%
66
+ end
67
+ %>
68
+ </ul>
69
+ <% end %>
70
+
71
+ <% end %>
72
+ </ul>
73
+ <!-- INDEX END -->
74
+
75
+ <% ytsFiles.each do |yt| %>
76
+ <!-- <%= yt[1]['name'].upcase %> START -->
77
+
78
+ <p>
79
+ <hr>
80
+ <h1><a NAME="<%= yt[1]['href'] %>"><%= yt[1]['name'] %></a></h1>
81
+ </p>
82
+
83
+ <% if yt[1]['doc'].documents.length > 0
84
+ yt[1]['doc'].documents.each do |ydoc|
85
+ %>
86
+
87
+ <h2><a NAME="<%= ydoc['href'] %>"><%= ydoc['test'] %></a></h2>
88
+
89
+ <div style="padding: 0px 0px 20px 20px; margin: 0px 0px 0px 0px;">
90
+
91
+ <p>
92
+ <h3>Brief</h3>
93
+ </p>
94
+
95
+ <p><%= ydoc['brief'] %></p>
96
+
97
+ <p>
98
+ <h3>Yaml</h3>
99
+ </p>
100
+
101
+ <table CELLPADDING="1" CELLSPACING="0" BORDER="0" CLASS="yaml-box-border" WIDTH="500">
102
+ <tr><td>
103
+ <table WIDTH="500" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="yaml-box-body">
104
+ <tr><td>
105
+ <table BORDER="0" CELLPADDING="0" CELLSPACING="0">
106
+ <tr><td CLASS="yaml-box-header">&nbsp;<%= ydoc['test'].gsub( ' ', '&nbsp;' ) if ydoc['test'] %>&nbsp;</td>
107
+ <td><tt>&nbsp;</tt></td>
108
+ <td CLASS="yaml-box-link">&nbsp;in&nbsp;YAML?&nbsp;</td></tr>
109
+ </table>
110
+ </td></tr>
111
+ <tr><td>
112
+ <table CELLPADDING="12" CELLSPACING="0">
113
+ <tr><td><pre><%= ydoc['yaml'] %></pre>
114
+ </td></tr>
115
+ </table>
116
+ </td></tr>
117
+ </table>
118
+ </td></tr>
119
+ </table>
120
+
121
+ <p>
122
+ <h3>Ruby</h3>
123
+ </p>
124
+
125
+ <table CELLPADDING="1" CELLSPACING="0" BORDER="0" CLASS="ruby-box-border" WIDTH="500">
126
+ <tr><td>
127
+ <table WIDTH="500" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="ruby-box-body">
128
+ <tr><td>
129
+ <table BORDER="0" CELLPADDING="0" CELLSPACING="0">
130
+ <tr><td CLASS="ruby-box-header">&nbsp;<%= ydoc['test'].gsub( ' ', '&nbsp;' ) if ydoc['test'] %>&nbsp;</td>
131
+ <td><tt>&nbsp;</tt></td>
132
+ <td CLASS="ruby-box-link">&nbsp;in&nbsp;Ruby?&nbsp;</td></tr>
133
+ </table>
134
+ </td></tr>
135
+ <tr><td>
136
+ <table CELLPADDING="12" CELLSPACING="0">
137
+ <tr><td>
138
+ <% if ydoc.has_key?( 'ruby-setup' ) %>
139
+ <div CLASS="ruby-box-highlight"><pre><%= ydoc['ruby-setup'] %></pre></div>
140
+ <% end %>
141
+ <pre><%= ydoc['ruby'] %></pre>
142
+ </td></tr>
143
+ </table>
144
+ </td></tr>
145
+ </table>
146
+ </td></tr>
147
+ </table>
148
+
149
+ </div>
150
+
151
+ <% end
152
+ end %>
153
+
154
+ <!-- <%= yt[1]['name'].upcase %> END -->
155
+ <% end %>
156
+
157
+ TMPL
158
+ )
159
+ puts erb.result
@@ -0,0 +1,10 @@
1
+ - YtsBasicTests
2
+ - YtsBlockMapping
3
+ - YtsFlowCollections
4
+ - YtsTypeTransfers
5
+ - YtsFoldedScalars
6
+ - YtsAnchorAlias
7
+ - YtsDocumentSeparator
8
+ - YtsNullsAndEmpties
9
+ - YtsRubyTests
10
+ - YtsSpecificationExamples
@@ -0,0 +1,193 @@
1
+ # vim:sw=4:ts=4
2
+ # $Id: yts.rb,v 1.3 2005/03/28 14:29:15 why Exp $
3
+ #
4
+ require 'yaml'
5
+
6
+ module YAML
7
+
8
+ #
9
+ # Make a time with the time zone
10
+ #
11
+ def YAML::mktime( year, mon, day, hour, min, sec, usec, zone = "Z" )
12
+ usec = usec.to_s.to_f * 1000000
13
+ val = Time::utc( year.to_i, mon.to_i, day.to_i, hour.to_i, min.to_i, sec.to_i, usec )
14
+ if zone != "Z"
15
+ hour = zone[0,3].to_i * 3600
16
+ min = zone[3,2].to_i * 60
17
+ ofs = (hour + min)
18
+ val = Time.at( val.to_f - ofs )
19
+ end
20
+ return val
21
+ end
22
+
23
+ class Stream
24
+ def ==( doc )
25
+ self.documents == doc.documents
26
+ end
27
+ end
28
+
29
+ class PrivateType
30
+ def ==( pt )
31
+ self.type_id == pt.type_id and self.value == pt.value
32
+ end
33
+ end
34
+
35
+ class DomainType
36
+ def ==( dt )
37
+ self.domain == dt.domain and self.type_id == dt.type_id and self.value == dt.value
38
+ end
39
+ end
40
+
41
+ class SpecialHash
42
+ def ==( h )
43
+ if h.is_a? SpecialHash
44
+ self.default == h.default and not self.keys.detect { |k| self[k] != h[k] }
45
+ else
46
+ false
47
+ end
48
+ end
49
+ def inspect
50
+ "{SpecialHash: @default=#{@default} @hash=#{super}}"
51
+ end
52
+ end
53
+
54
+ end
55
+
56
+ header = " %YAML:1.0"
57
+ YAML::load( File.read( "index.yml" ) ).each do |yst|
58
+
59
+ YAML.load_documents( File.read( yst + ".yml" ) ) do |ydoc|
60
+ #
61
+ # Test the document
62
+ #
63
+ reason = nil
64
+ success = 'no'
65
+ round_trip = 'no'
66
+ round_out = nil
67
+ interval = nil
68
+ if ydoc.has_key?( 'ruby' )
69
+ obj_r = nil
70
+ obj_y = nil
71
+ begin
72
+ eval( ydoc['ruby-setup'] ) if ydoc.has_key?( 'ruby-setup' )
73
+ time = Time.now
74
+ ydoc['yaml'].gsub!( / +$/, '' )
75
+ if ydoc.has_key?( 'documents' )
76
+ obj_y = YAML::load_stream( ydoc['yaml'] )
77
+ else
78
+ obj_y = YAML::load( ydoc['yaml'] )
79
+ end
80
+ interval = Time.now - time
81
+ eval( "obj_r = #{ydoc['ruby']}" )
82
+
83
+ if obj_r == obj_y
84
+ success = 'yes'
85
+
86
+ # Attempt round trip
87
+ unless ydoc['no-round-trip'].is_a?( Array ) and ydoc['no-round-trip'].include?( 'ruby' )
88
+ obj_y2 = nil
89
+ begin
90
+ if obj_y.is_a? YAML::Stream
91
+ round_out = obj_y.emit
92
+ obj_y2 = YAML::load_stream( round_out )
93
+ else
94
+ round_out = obj_y.to_yaml
95
+ obj_y2 = YAML::load( round_out )
96
+ end
97
+ rescue YAML::Error => e
98
+ reason = e.to_s
99
+ end
100
+
101
+ obj_y = obj_y2
102
+ eval( "obj_r = #{ydoc['ruby']}" )
103
+ if obj_r == obj_y
104
+ round_trip = 'yes'
105
+ else
106
+ reason = 'Expected <' + obj_r.inspect + '>, but was <' +
107
+ obj_y2.inspect + '>'
108
+ end
109
+ else
110
+ end
111
+ else
112
+ reason = 'Expected <' + obj_r.inspect + '>, but was <' +
113
+ obj_y.inspect + '>'
114
+ end
115
+ rescue Exception => e
116
+ reason = e.to_s
117
+ end
118
+ else
119
+ reason = 'No Ruby parse information available in the test document.'
120
+ end
121
+
122
+ #
123
+ # Print out YAML result
124
+ #
125
+ puts <<EOY
126
+ ---#{header}
127
+ file: #{yst}
128
+ test: #{ydoc['test']}
129
+ success: #{success}
130
+ round-trip: #{round_trip}
131
+ EOY
132
+ puts "time: %0.6f" % interval if interval
133
+ if round_out and round_trip == 'no'
134
+ round_out.gsub!( /\t/, ' ' )
135
+ round_out.gsub!( /\n/, "\n " )
136
+ puts <<EOY
137
+ round-trip-output: |
138
+ #{round_out}
139
+ EOY
140
+ end
141
+ if reason
142
+ reason.gsub!( /\t/, ' ' )
143
+ reason.gsub!( /\n/, "\n " )
144
+ puts <<EOY
145
+ reason: |
146
+ #{reason}
147
+ EOY
148
+ end
149
+ header = ""
150
+ end
151
+ end
152
+
153
+ # YPath Test is a bit different
154
+ %w(
155
+ YtsYpath.yml
156
+ ).each { |yst|
157
+ YAML.parse_documents( File.open( yst ) ) { |ydoc|
158
+ next unless ydoc.value
159
+ #
160
+ # Test the document
161
+ #
162
+ reason = nil
163
+ success = 'no'
164
+ begin
165
+ obj = ydoc.select( '/data' )[0]
166
+ ydoc = ydoc.transform
167
+ paths = obj.search( ydoc['ypath'] )
168
+ if ydoc['expected'].sort == paths.to_a.sort
169
+ success = 'yes'
170
+ else
171
+ reason = 'Expected <' + ydoc['expected'].inspect + '>, but was <' +
172
+ paths.inspect + '>'
173
+ end
174
+ rescue YAML::Error => e
175
+ reason = e.to_s
176
+ end
177
+ puts <<EOY
178
+ ---
179
+ file: #{yst}
180
+ path: #{ydoc['ypath']}
181
+ test: #{ydoc['test']}
182
+ success: #{success}
183
+ EOY
184
+ if reason
185
+ reason.gsub!( /\t/, ' ' )
186
+ reason.gsub!( /\n/, "\n " )
187
+ puts <<EOY
188
+ reason: |
189
+ #{reason}
190
+ EOY
191
+ end
192
+ }
193
+ }
@@ -0,0 +1,497 @@
1
+ # Makefile.in generated by automake 1.9.5 from Makefile.am.
2
+ # lib/Makefile. Generated from Makefile.in by configure.
3
+
4
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
+ # 2003, 2004, 2005 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
+
16
+
17
+
18
+ SOURCES = $(libsyck_a_SOURCES)
19
+
20
+ srcdir = .
21
+ top_srcdir = ..
22
+
23
+ pkgdatadir = $(datadir)/syck
24
+ pkglibdir = $(libdir)/syck
25
+ pkgincludedir = $(includedir)/syck
26
+ top_builddir = ..
27
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
28
+ INSTALL = /usr/bin/install -c
29
+ install_sh_DATA = $(install_sh) -c -m 644
30
+ install_sh_PROGRAM = $(install_sh) -c
31
+ install_sh_SCRIPT = $(install_sh) -c
32
+ INSTALL_HEADER = $(INSTALL_DATA)
33
+ transform = $(program_transform_name)
34
+ NORMAL_INSTALL = :
35
+ PRE_INSTALL = :
36
+ POST_INSTALL = :
37
+ NORMAL_UNINSTALL = :
38
+ PRE_UNINSTALL = :
39
+ POST_UNINSTALL = :
40
+ subdir = lib
41
+ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
42
+ $(srcdir)/Makefile.in gram.c gram.h
43
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
44
+ am__aclocal_m4_deps = $(top_srcdir)/configure.in
45
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
46
+ $(ACLOCAL_M4)
47
+ mkinstalldirs = $(install_sh) -d
48
+ CONFIG_HEADER = $(top_builddir)/config.h
49
+ CONFIG_CLEAN_FILES =
50
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
51
+ am__vpath_adj = case $$p in \
52
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
53
+ *) f=$$p;; \
54
+ esac;
55
+ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
56
+ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
57
+ libLIBRARIES_INSTALL = $(INSTALL_DATA)
58
+ LIBRARIES = $(lib_LIBRARIES)
59
+ AR = ar
60
+ ARFLAGS = cru
61
+ libsyck_a_AR = $(AR) $(ARFLAGS)
62
+ libsyck_a_LIBADD =
63
+ am_libsyck_a_OBJECTS = emitter.$(OBJEXT) handler.$(OBJEXT) \
64
+ node.$(OBJEXT) syck.$(OBJEXT) syck_st.$(OBJEXT) gram.$(OBJEXT) \
65
+ bytecode.$(OBJEXT) yaml2byte.$(OBJEXT) token.$(OBJEXT) \
66
+ implicit.$(OBJEXT)
67
+ libsyck_a_OBJECTS = $(am_libsyck_a_OBJECTS)
68
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
69
+ depcomp = $(SHELL) $(top_srcdir)/config/depcomp
70
+ am__depfiles_maybe = depfiles
71
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
72
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
73
+ CCLD = $(CC)
74
+ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
75
+ YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
76
+ SOURCES = $(libsyck_a_SOURCES)
77
+ DIST_SOURCES = $(libsyck_a_SOURCES)
78
+ includeHEADERS_INSTALL = $(INSTALL_HEADER)
79
+ HEADERS = $(include_HEADERS)
80
+ ETAGS = etags
81
+ CTAGS = ctags
82
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
83
+ ACLOCAL = ${SHELL} /home/why/sand/syck-0.55/config/missing --run aclocal-1.9
84
+ AMDEP_FALSE = #
85
+ AMDEP_TRUE =
86
+ AMTAR = ${SHELL} /home/why/sand/syck-0.55/config/missing --run tar
87
+ AUTOCONF = ${SHELL} /home/why/sand/syck-0.55/config/missing --run autoconf
88
+ AUTOHEADER = ${SHELL} /home/why/sand/syck-0.55/config/missing --run autoheader
89
+ AUTOMAKE = ${SHELL} /home/why/sand/syck-0.55/config/missing --run automake-1.9
90
+ AWK = gawk
91
+ CC = gcc
92
+ CCDEPMODE = depmode=gcc3
93
+ CFLAGS = -g -O2
94
+ CPP = gcc -E
95
+ CPPFLAGS =
96
+ CYGPATH_W = echo
97
+ DEFS = -DHAVE_CONFIG_H
98
+ DEPDIR = .deps
99
+ ECHO_C =
100
+ ECHO_N = -n
101
+ ECHO_T =
102
+ EGREP = grep -E
103
+ EXEEXT =
104
+ INSTALL_DATA = ${INSTALL} -m 644
105
+ INSTALL_PROGRAM = ${INSTALL}
106
+ INSTALL_SCRIPT = ${INSTALL}
107
+ INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
108
+ LDFLAGS =
109
+ LEX = flex
110
+ LEXLIB = -lfl
111
+ LEX_OUTPUT_ROOT = lex.yy
112
+ LIBOBJS =
113
+ LIBS =
114
+ LN_S = ln -s
115
+ LTLIBOBJS =
116
+ MAKEINFO = ${SHELL} /home/why/sand/syck-0.55/config/missing --run makeinfo
117
+ OBJEXT = o
118
+ PACKAGE = syck
119
+ PACKAGE_BUGREPORT =
120
+ PACKAGE_NAME = syck
121
+ PACKAGE_STRING = syck 0.54
122
+ PACKAGE_TARNAME = syck
123
+ PACKAGE_VERSION = 0.54
124
+ PATH_SEPARATOR = :
125
+ RANLIB = ranlib
126
+ SET_MAKE =
127
+ SHELL = /bin/sh
128
+ STRIP =
129
+ VERSION = 0.54
130
+ YACC = bison -y
131
+ ac_ct_CC = gcc
132
+ ac_ct_RANLIB = ranlib
133
+ ac_ct_STRIP =
134
+ am__fastdepCC_FALSE = #
135
+ am__fastdepCC_TRUE =
136
+ am__include = include
137
+ am__leading_dot = .
138
+ am__quote =
139
+ am__tar = ${AMTAR} chof - "$$tardir"
140
+ am__untar = ${AMTAR} xf -
141
+ bindir = ${exec_prefix}/bin
142
+ build_alias =
143
+ datadir = ${prefix}/share
144
+ exec_prefix = ${prefix}
145
+ host_alias =
146
+ includedir = ${prefix}/include
147
+ infodir = ${prefix}/info
148
+ install_sh = /home/why/sand/syck-0.55/config/install-sh
149
+ libdir = ${exec_prefix}/lib
150
+ libexecdir = ${exec_prefix}/libexec
151
+ localstatedir = ${prefix}/var
152
+ mandir = ${prefix}/man
153
+ mkdir_p = mkdir -p --
154
+ oldincludedir = /usr/include
155
+ prefix = /usr/local
156
+ program_transform_name = s,x,x,
157
+ sbindir = ${exec_prefix}/sbin
158
+ sharedstatedir = ${prefix}/com
159
+ sysconfdir = ${prefix}/etc
160
+ target_alias =
161
+ INCLUDES = -I$(top_srcdir)
162
+ AM_YFLAGS = -d -t -v -p syck
163
+ lib_LIBRARIES = libsyck.a
164
+ include_HEADERS = syck.h syck_st.h
165
+ libsyck_a_SOURCES = \
166
+ emitter.c \
167
+ handler.c \
168
+ node.c \
169
+ syck.c \
170
+ syck_st.c \
171
+ gram.y \
172
+ bytecode.re \
173
+ yaml2byte.c \
174
+ token.re \
175
+ implicit.re
176
+
177
+
178
+ # libsyck_a_LIBADD = $(LEXLIB)
179
+ REC = re2c
180
+ all: all-am
181
+
182
+ .SUFFIXES:
183
+ .SUFFIXES: .c .o .obj .re .y
184
+ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
185
+ @for dep in $?; do \
186
+ case '$(am__configure_deps)' in \
187
+ *$$dep*) \
188
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
189
+ && exit 0; \
190
+ exit 1;; \
191
+ esac; \
192
+ done; \
193
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
194
+ cd $(top_srcdir) && \
195
+ $(AUTOMAKE) --foreign lib/Makefile
196
+ .PRECIOUS: Makefile
197
+ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
198
+ @case '$?' in \
199
+ *config.status*) \
200
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
201
+ *) \
202
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
203
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
204
+ esac;
205
+
206
+ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
207
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
208
+
209
+ $(top_srcdir)/configure: $(am__configure_deps)
210
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
211
+ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
212
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
213
+ install-libLIBRARIES: $(lib_LIBRARIES)
214
+ @$(NORMAL_INSTALL)
215
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
216
+ @list='$(lib_LIBRARIES)'; for p in $$list; do \
217
+ if test -f $$p; then \
218
+ f=$(am__strip_dir) \
219
+ echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
220
+ $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
221
+ else :; fi; \
222
+ done
223
+ @$(POST_INSTALL)
224
+ @list='$(lib_LIBRARIES)'; for p in $$list; do \
225
+ if test -f $$p; then \
226
+ p=$(am__strip_dir) \
227
+ echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
228
+ $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
229
+ else :; fi; \
230
+ done
231
+
232
+ uninstall-libLIBRARIES:
233
+ @$(NORMAL_UNINSTALL)
234
+ @list='$(lib_LIBRARIES)'; for p in $$list; do \
235
+ p=$(am__strip_dir) \
236
+ echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
237
+ rm -f "$(DESTDIR)$(libdir)/$$p"; \
238
+ done
239
+
240
+ clean-libLIBRARIES:
241
+ -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
242
+ gram.h: gram.c
243
+ @if test ! -f $@; then \
244
+ rm -f gram.c; \
245
+ $(MAKE) gram.c; \
246
+ else :; fi
247
+ libsyck.a: $(libsyck_a_OBJECTS) $(libsyck_a_DEPENDENCIES)
248
+ -rm -f libsyck.a
249
+ $(libsyck_a_AR) libsyck.a $(libsyck_a_OBJECTS) $(libsyck_a_LIBADD)
250
+ $(RANLIB) libsyck.a
251
+
252
+ mostlyclean-compile:
253
+ -rm -f *.$(OBJEXT)
254
+
255
+ distclean-compile:
256
+ -rm -f *.tab.c
257
+
258
+ include ./$(DEPDIR)/bytecode.Po
259
+ include ./$(DEPDIR)/emitter.Po
260
+ include ./$(DEPDIR)/gram.Po
261
+ include ./$(DEPDIR)/handler.Po
262
+ include ./$(DEPDIR)/implicit.Po
263
+ include ./$(DEPDIR)/node.Po
264
+ include ./$(DEPDIR)/syck.Po
265
+ include ./$(DEPDIR)/syck_st.Po
266
+ include ./$(DEPDIR)/token.Po
267
+ include ./$(DEPDIR)/yaml2byte.Po
268
+
269
+ .c.o:
270
+ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
271
+ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
272
+ # source='$<' object='$@' libtool=no \
273
+ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
274
+ # $(COMPILE) -c $<
275
+
276
+ .c.obj:
277
+ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
278
+ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
279
+ # source='$<' object='$@' libtool=no \
280
+ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
281
+ # $(COMPILE) -c `$(CYGPATH_W) '$<'`
282
+
283
+ .y.c:
284
+ $(YACCCOMPILE) $<
285
+ if test -f y.tab.h; then \
286
+ to=`echo "$*_H" | sed \
287
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
288
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \
289
+ sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \
290
+ y.tab.h >$*.ht; \
291
+ rm -f y.tab.h; \
292
+ if cmp -s $*.ht $*.h; then \
293
+ rm -f $*.ht ;\
294
+ else \
295
+ mv $*.ht $*.h; \
296
+ fi; \
297
+ fi
298
+ if test -f y.output; then \
299
+ mv y.output $*.output; \
300
+ fi
301
+ sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
302
+ rm -f y.tab.c
303
+ uninstall-info-am:
304
+ install-includeHEADERS: $(include_HEADERS)
305
+ @$(NORMAL_INSTALL)
306
+ test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
307
+ @list='$(include_HEADERS)'; for p in $$list; do \
308
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
309
+ f=$(am__strip_dir) \
310
+ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
311
+ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
312
+ done
313
+
314
+ uninstall-includeHEADERS:
315
+ @$(NORMAL_UNINSTALL)
316
+ @list='$(include_HEADERS)'; for p in $$list; do \
317
+ f=$(am__strip_dir) \
318
+ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
319
+ rm -f "$(DESTDIR)$(includedir)/$$f"; \
320
+ done
321
+
322
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
323
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
324
+ unique=`for i in $$list; do \
325
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
326
+ done | \
327
+ $(AWK) ' { files[$$0] = 1; } \
328
+ END { for (i in files) print i; }'`; \
329
+ mkid -fID $$unique
330
+ tags: TAGS
331
+
332
+ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
333
+ $(TAGS_FILES) $(LISP)
334
+ tags=; \
335
+ here=`pwd`; \
336
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
337
+ unique=`for i in $$list; do \
338
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
339
+ done | \
340
+ $(AWK) ' { files[$$0] = 1; } \
341
+ END { for (i in files) print i; }'`; \
342
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
343
+ test -n "$$unique" || unique=$$empty_fix; \
344
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
345
+ $$tags $$unique; \
346
+ fi
347
+ ctags: CTAGS
348
+ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
349
+ $(TAGS_FILES) $(LISP)
350
+ tags=; \
351
+ here=`pwd`; \
352
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
353
+ unique=`for i in $$list; do \
354
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
355
+ done | \
356
+ $(AWK) ' { files[$$0] = 1; } \
357
+ END { for (i in files) print i; }'`; \
358
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
359
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
360
+ $$tags $$unique
361
+
362
+ GTAGS:
363
+ here=`$(am__cd) $(top_builddir) && pwd` \
364
+ && cd $(top_srcdir) \
365
+ && gtags -i $(GTAGS_ARGS) $$here
366
+
367
+ distclean-tags:
368
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
369
+
370
+ distdir: $(DISTFILES)
371
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
372
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
373
+ list='$(DISTFILES)'; for file in $$list; do \
374
+ case $$file in \
375
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
376
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
377
+ esac; \
378
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
379
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
380
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
381
+ dir="/$$dir"; \
382
+ $(mkdir_p) "$(distdir)$$dir"; \
383
+ else \
384
+ dir=''; \
385
+ fi; \
386
+ if test -d $$d/$$file; then \
387
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
388
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
389
+ fi; \
390
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
391
+ else \
392
+ test -f $(distdir)/$$file \
393
+ || cp -p $$d/$$file $(distdir)/$$file \
394
+ || exit 1; \
395
+ fi; \
396
+ done
397
+ check-am: all-am
398
+ check: check-am
399
+ all-am: Makefile $(LIBRARIES) $(HEADERS)
400
+ installdirs:
401
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
402
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
403
+ done
404
+ install: install-am
405
+ install-exec: install-exec-am
406
+ install-data: install-data-am
407
+ uninstall: uninstall-am
408
+
409
+ install-am: all-am
410
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
411
+
412
+ installcheck: installcheck-am
413
+ install-strip:
414
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
415
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
416
+ `test -z '$(STRIP)' || \
417
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
418
+ mostlyclean-generic:
419
+
420
+ clean-generic:
421
+
422
+ distclean-generic:
423
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
424
+
425
+ maintainer-clean-generic:
426
+ @echo "This command is intended for maintainers to use"
427
+ @echo "it deletes files that may require special tools to rebuild."
428
+ -rm -f gram.c
429
+ -rm -f gram.h
430
+ clean: clean-am
431
+
432
+ clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
433
+
434
+ distclean: distclean-am
435
+ -rm -rf ./$(DEPDIR)
436
+ -rm -f Makefile
437
+ distclean-am: clean-am distclean-compile distclean-generic \
438
+ distclean-tags
439
+
440
+ dvi: dvi-am
441
+
442
+ dvi-am:
443
+
444
+ html: html-am
445
+
446
+ info: info-am
447
+
448
+ info-am:
449
+
450
+ install-data-am: install-includeHEADERS
451
+
452
+ install-exec-am: install-libLIBRARIES
453
+
454
+ install-info: install-info-am
455
+
456
+ install-man:
457
+
458
+ installcheck-am:
459
+
460
+ maintainer-clean: maintainer-clean-am
461
+ -rm -rf ./$(DEPDIR)
462
+ -rm -f Makefile
463
+ maintainer-clean-am: distclean-am maintainer-clean-generic
464
+
465
+ mostlyclean: mostlyclean-am
466
+
467
+ mostlyclean-am: mostlyclean-compile mostlyclean-generic
468
+
469
+ pdf: pdf-am
470
+
471
+ pdf-am:
472
+
473
+ ps: ps-am
474
+
475
+ ps-am:
476
+
477
+ uninstall-am: uninstall-includeHEADERS uninstall-info-am \
478
+ uninstall-libLIBRARIES
479
+
480
+ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
481
+ clean-libLIBRARIES ctags distclean distclean-compile \
482
+ distclean-generic distclean-tags distdir dvi dvi-am html \
483
+ html-am info info-am install install-am install-data \
484
+ install-data-am install-exec install-exec-am \
485
+ install-includeHEADERS install-info install-info-am \
486
+ install-libLIBRARIES install-man install-strip installcheck \
487
+ installcheck-am installdirs maintainer-clean \
488
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
489
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
490
+ uninstall-am uninstall-includeHEADERS uninstall-info-am \
491
+ uninstall-libLIBRARIES
492
+
493
+ .re.c:
494
+ $(REC) $< > $@.new && mv $@.new $@
495
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
496
+ # Otherwise a system limit (for SysV at least) may be exceeded.
497
+ .NOEXPORT: