fancy 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -1
- data/Rakefile +8 -0
- data/bin/fyi +25 -20
- data/bin/ifancy +39 -5
- data/{extconf.rb → boot/extconf.rb} +1 -1
- data/boot/fancy_ext/block_env.rb +0 -14
- data/boot/fancy_ext/kernel.rb +6 -2
- data/boot/rbx-compiler/parser/fancy_parser.bundle +0 -0
- data/examples/actor.fy +37 -0
- data/examples/armstrong_numbers.fy +1 -1
- data/examples/curl_async.fy +37 -0
- data/examples/echo.fy +1 -1
- data/examples/factorial.fy +1 -1
- data/examples/future_composition.fy +20 -0
- data/examples/game_of_life.fy +2 -2
- data/examples/person.fy +4 -8
- data/examples/rbx/blocks.fy +1 -1
- data/examples/return.fy +1 -1
- data/examples/struct.fy +9 -0
- data/lib/argv.fy +2 -2
- data/lib/array.fy +157 -0
- data/lib/block.fy +18 -1
- data/lib/boot.fy +5 -1
- data/lib/compiler/ast/class_def.fy +1 -1
- data/lib/compiler/ast/identifier.fy +2 -2
- data/lib/compiler/ast/message_send.fy +2 -2
- data/lib/compiler/ast/method_def.fy +2 -2
- data/lib/compiler/ast/try_catch.fy +5 -1
- data/lib/documentation.fy +1 -1
- data/lib/enumerable.fy +3 -7
- data/lib/enumerator.fy +77 -0
- data/lib/false_class.fy +52 -0
- data/lib/fancy_spec.fy +40 -12
- data/lib/fdoc.fy +2 -2
- data/lib/file.fy +8 -1
- data/lib/future.fy +23 -2
- data/lib/iteration.fy +60 -0
- data/lib/main.fy +4 -4
- data/lib/nil_class.fy +14 -22
- data/lib/number.fy +51 -0
- data/lib/object.fy +126 -43
- data/lib/package/installer.fy +1 -1
- data/lib/parser/ext/lexer.lex +6 -1
- data/lib/parser/ext/parser.y +18 -0
- data/lib/parser/methods.fy +20 -2
- data/lib/proxy.fy +20 -3
- data/lib/rbx.fy +0 -1
- data/lib/rbx/array.fy +4 -138
- data/lib/rbx/block.fy +25 -1
- data/lib/rbx/class.fy +21 -0
- data/lib/rbx/exception.fy +1 -0
- data/lib/rbx/fiber.fy +1 -0
- data/lib/rbx/file.fy +8 -0
- data/lib/rbx/integer.fy +0 -8
- data/lib/rbx/method.fy +34 -7
- data/lib/rbx/no_method_error.fy +8 -1
- data/lib/rbx/object.fy +3 -32
- data/lib/rbx/range.fy +13 -1
- data/lib/rbx/regexp.fy +3 -0
- data/lib/rbx/string.fy +6 -1
- data/lib/rbx/system.fy +20 -2
- data/lib/set.fy +2 -2
- data/lib/string.fy +1 -1
- data/lib/struct.fy +15 -12
- data/lib/symbol.fy +2 -2
- data/lib/true_class.fy +16 -20
- data/lib/version.fy +1 -1
- data/tests/argv.fy +1 -0
- data/tests/array.fy +33 -2
- data/tests/block.fy +44 -0
- data/tests/class.fy +102 -88
- data/tests/control_flow.fy +131 -8
- data/tests/enumerator.fy +85 -0
- data/tests/exception.fy +13 -13
- data/tests/file.fy +4 -13
- data/tests/future.fy +26 -0
- data/tests/method.fy +83 -72
- data/tests/nil_class.fy +20 -13
- data/tests/number.fy +16 -9
- data/tests/object.fy +39 -20
- data/tests/string.fy +7 -0
- data/tests/true_class.fy +4 -4
- data/tools/fancy-mode.el +1 -1
- metadata +15 -20
- data/boot/compiler/parser/ext/fancy_parser.bundle +0 -0
- data/boot/rbx-compiler/parser/Makefile +0 -162
- data/boot/rbx-compiler/parser/lexer.c +0 -2316
- data/boot/rbx-compiler/parser/lexer.h +0 -315
- data/boot/rbx-compiler/parser/parser.c +0 -3105
- data/boot/rbx-compiler/parser/parser.h +0 -114
- data/lib/lazy_array.fy +0 -23
- data/lib/parser/ext/Makefile +0 -162
- data/lib/parser/ext/fancy_parser.bundle +0 -0
- data/lib/parser/ext/lexer.c +0 -2360
- data/lib/parser/ext/lexer.h +0 -315
- data/lib/parser/ext/parser.c +0 -3382
- data/lib/parser/ext/parser.h +0 -118
- data/lib/rbx/false_class.fy +0 -58
data/tests/object.fy
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
FancySpec describe: Object with: {
|
2
2
|
it: "should dynamically evaluate a message-send with no arguments" when: {
|
3
3
|
obj = 42
|
4
|
-
obj
|
4
|
+
obj send_message: 'to_s . should == "42"
|
5
5
|
}
|
6
6
|
|
7
7
|
it: "should dynamically evaluate a message-send with a list of arguments" when: {
|
8
8
|
obj = "hello, world"
|
9
|
-
obj
|
9
|
+
obj send_message: 'from:to: with_params: [0,4] . should == "hello"
|
10
10
|
}
|
11
11
|
|
12
12
|
it: "should dynamically define slotvalues" when: {
|
@@ -22,11 +22,7 @@ FancySpec describe: Object with: {
|
|
22
22
|
}
|
23
23
|
self a_singleton_method should == "a singleton method!"
|
24
24
|
self undefine_singleton_method: 'a_singleton_method
|
25
|
-
|
26
|
-
self a_singleton_method should == nil # should not get here
|
27
|
-
} catch NoMethodError => e {
|
28
|
-
e method_name should == "a_singleton_method"
|
29
|
-
}
|
25
|
+
{ self a_singleton_method } should raise: NoMethodError
|
30
26
|
}
|
31
27
|
|
32
28
|
it: "should return its class" when: {
|
@@ -79,25 +75,25 @@ FancySpec describe: Object with: {
|
|
79
75
|
# boolean messages
|
80
76
|
|
81
77
|
it: "should be true for calling and: with non-nil values" for: 'and: when: {
|
82
|
-
'foo and: 'bar . should ==
|
78
|
+
'foo and: 'bar . should == 'bar
|
83
79
|
}
|
84
80
|
|
85
81
|
it: "should be false for calling and: with a nil value" for: 'and: when: {
|
86
|
-
'foo and: nil . should ==
|
82
|
+
'foo and: nil . should == nil
|
87
83
|
}
|
88
84
|
|
89
85
|
it: "should be true for calling && with non-nil values" for: '&& when: {
|
90
|
-
('foo && 'bar) should ==
|
86
|
+
('foo && 'bar) should == 'bar
|
91
87
|
}
|
92
88
|
|
93
89
|
it: "should be false for calling && with a nil value" for: '&& when: {
|
94
|
-
('foo && nil) should ==
|
90
|
+
('foo && nil) should == nil
|
95
91
|
}
|
96
92
|
|
97
93
|
|
98
94
|
it: "should be true for calling or: with any value" for: 'or: when: {
|
99
|
-
'foo or: 'bar . should ==
|
100
|
-
'foo or: nil . should ==
|
95
|
+
'foo or: 'bar . should == 'foo
|
96
|
+
'foo or: nil . should == 'foo
|
101
97
|
}
|
102
98
|
|
103
99
|
it: "should be true for calling || with any value" for: '|| when: {
|
@@ -108,19 +104,19 @@ FancySpec describe: Object with: {
|
|
108
104
|
# end boolean messages
|
109
105
|
|
110
106
|
it: "should NOT be nil for non-nil values" for: 'nil? when: {
|
111
|
-
'foo nil? should ==
|
112
|
-
1 nil? should ==
|
113
|
-
"hello" nil? should ==
|
107
|
+
'foo nil? should == false
|
108
|
+
1 nil? should == false
|
109
|
+
"hello" nil? should == false
|
114
110
|
}
|
115
111
|
|
116
112
|
it: "should NOT be false for non-nil values" for: 'false? when: {
|
117
|
-
'foo false? should ==
|
118
|
-
"hello, world" false? should ==
|
113
|
+
'foo false? should == false
|
114
|
+
"hello, world" false? should == false
|
119
115
|
}
|
120
116
|
|
121
117
|
it: "should not be true" for: 'true? when: {
|
122
|
-
'foo true? should ==
|
123
|
-
"hello, world" true? should ==
|
118
|
+
'foo true? should == false
|
119
|
+
"hello, world" true? should == false
|
124
120
|
}
|
125
121
|
|
126
122
|
it: "should return the correct value" for: 'returning:do: when: {
|
@@ -130,4 +126,27 @@ FancySpec describe: Object with: {
|
|
130
126
|
arr << 3
|
131
127
|
} . should == [1,2,3]
|
132
128
|
}
|
129
|
+
|
130
|
+
it: "should only call a method if the receiver responds to it using a RespondsToProxy" for: 'if_responds? when: {
|
131
|
+
class SomeClass {
|
132
|
+
def some_method {
|
133
|
+
'it_works!
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
s = SomeClass new
|
138
|
+
s if_responds? some_method should == 'it_works!
|
139
|
+
s if_responds? some_undefined_method should == nil
|
140
|
+
}
|
141
|
+
|
142
|
+
it: "should call the backtick: method when using the '`' syntax" for: 'backtick: when: {
|
143
|
+
`cat #{__FILE__}` should == (File read: __FILE__)
|
144
|
+
|
145
|
+
# override backticks
|
146
|
+
def backtick: str {
|
147
|
+
str + " - NOT!"
|
148
|
+
}
|
149
|
+
|
150
|
+
`ls -al` should == "ls -al - NOT!"
|
151
|
+
}
|
133
152
|
}
|
data/tests/string.fy
CHANGED
@@ -99,4 +99,11 @@ FancySpec describe: String with: {
|
|
99
99
|
|
100
100
|
"hello, #{x}, Fancy #{'rocks to_s upcase}!!" should == "hello, world, Fancy ROCKS!!"
|
101
101
|
}
|
102
|
+
|
103
|
+
it: "should return the String as a Symbol" for: 'to_sym when: {
|
104
|
+
"foo" to_sym should == 'foo
|
105
|
+
"foo:bar:" to_sym should == 'foo:bar:
|
106
|
+
"FooBar?!" to_sym should == 'FooBar?!
|
107
|
+
"+-&/^\?a!" to_sym should '+-&/^\?a!
|
108
|
+
}
|
102
109
|
}
|
data/tests/true_class.fy
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
FancySpec describe: TrueClass with: {
|
2
2
|
it: "should be true for calling and: with non-nil value" for: 'and: when: {
|
3
3
|
true and: true . should == true
|
4
|
-
true and: 'bar . should ==
|
4
|
+
true and: 'bar . should == 'bar
|
5
5
|
}
|
6
6
|
|
7
7
|
it: "should be false for calling and: with a nil value" for: 'and: when: {
|
8
|
-
true and: nil . should ==
|
8
|
+
true and: nil . should == nil
|
9
9
|
}
|
10
10
|
|
11
11
|
it: "should be true for calling && with non-nil value" for: '&& when: {
|
12
12
|
(true && true) should == true
|
13
|
-
(true && 'bar) should ==
|
13
|
+
(true && 'bar) should == 'bar
|
14
14
|
}
|
15
15
|
|
16
16
|
it: "should be false for calling && with a nil value" for: '&& when: {
|
17
|
-
(true && nil) should ==
|
17
|
+
(true && nil) should == nil
|
18
18
|
}
|
19
19
|
|
20
20
|
it: "should be true for calling or: with both non-nil values" for: 'or: when: {
|
data/tools/fancy-mode.el
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
"match" "case" "->" "=>") ;; keywords
|
10
10
|
|
11
11
|
'(;; symbols
|
12
|
-
("\\('\\(\\([^\s\n]+\\|\\]+\\)\\)\\)" 1 font-lock-reference-face)
|
12
|
+
("\\('\\(\\([^\s\n\(\)\{\}]+\\|\\]+\\)\\)\\)" 1 font-lock-reference-face)
|
13
13
|
;; fixnums
|
14
14
|
("[0-9]+" . 'font-lock-variable-name-face)
|
15
15
|
;; floats
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fancy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Christopher Bertels
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-04-28 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -38,7 +38,7 @@ executables:
|
|
38
38
|
- fdoc
|
39
39
|
- fyi
|
40
40
|
extensions:
|
41
|
-
- extconf.rb
|
41
|
+
- boot/extconf.rb
|
42
42
|
extra_rdoc_files: []
|
43
43
|
|
44
44
|
files:
|
@@ -46,7 +46,7 @@ files:
|
|
46
46
|
- LICENSE
|
47
47
|
- AUTHORS
|
48
48
|
- Rakefile
|
49
|
-
- extconf.rb
|
49
|
+
- boot/extconf.rb
|
50
50
|
- ruby_lib/fancy.rb
|
51
51
|
- lib/argv.fy
|
52
52
|
- lib/array.fy
|
@@ -81,7 +81,9 @@ files:
|
|
81
81
|
- lib/directory.fy
|
82
82
|
- lib/documentation.fy
|
83
83
|
- lib/enumerable.fy
|
84
|
+
- lib/enumerator.fy
|
84
85
|
- lib/eval.fy
|
86
|
+
- lib/false_class.fy
|
85
87
|
- lib/fancy_spec.fy
|
86
88
|
- lib/fdoc.fy
|
87
89
|
- lib/fdoc_hook.fy
|
@@ -90,7 +92,7 @@ files:
|
|
90
92
|
- lib/file.fy
|
91
93
|
- lib/future.fy
|
92
94
|
- lib/hash.fy
|
93
|
-
- lib/
|
95
|
+
- lib/iteration.fy
|
94
96
|
- lib/main.fy
|
95
97
|
- lib/method.fy
|
96
98
|
- lib/nil_class.fy
|
@@ -117,7 +119,6 @@ files:
|
|
117
119
|
- lib/rbx/documentation.fy
|
118
120
|
- lib/rbx/environment_variables.fy
|
119
121
|
- lib/rbx/exception.fy
|
120
|
-
- lib/rbx/false_class.fy
|
121
122
|
- lib/rbx/fiber.fy
|
122
123
|
- lib/rbx/file.fy
|
123
124
|
- lib/rbx/fixnum.fy
|
@@ -153,13 +154,7 @@ files:
|
|
153
154
|
- lib/parser/ext/ext.c
|
154
155
|
- lib/parser/ext/ext.h
|
155
156
|
- lib/parser/ext/extconf.rb
|
156
|
-
- lib/parser/ext/fancy_parser.bundle
|
157
|
-
- lib/parser/ext/lexer.c
|
158
|
-
- lib/parser/ext/lexer.h
|
159
157
|
- lib/parser/ext/lexer.lex
|
160
|
-
- lib/parser/ext/Makefile
|
161
|
-
- lib/parser/ext/parser.c
|
162
|
-
- lib/parser/ext/parser.h
|
163
158
|
- lib/parser/ext/parser.y
|
164
159
|
- lib/parser/ext/README
|
165
160
|
- tests/argv.fy
|
@@ -169,8 +164,10 @@ files:
|
|
169
164
|
- tests/class.fy
|
170
165
|
- tests/control_flow.fy
|
171
166
|
- tests/documentation.fy
|
167
|
+
- tests/enumerator.fy
|
172
168
|
- tests/exception.fy
|
173
169
|
- tests/file.fy
|
170
|
+
- tests/future.fy
|
174
171
|
- tests/hash.fy
|
175
172
|
- tests/method.fy
|
176
173
|
- tests/nil_class.fy
|
@@ -190,6 +187,7 @@ files:
|
|
190
187
|
- bin/fdoc
|
191
188
|
- bin/fyi
|
192
189
|
- bin/ifancy
|
190
|
+
- examples/actor.fy
|
193
191
|
- examples/argv.fy
|
194
192
|
- examples/arithmetic.fy
|
195
193
|
- examples/armstrong_numbers.fy
|
@@ -201,6 +199,7 @@ files:
|
|
201
199
|
- examples/class.fy
|
202
200
|
- examples/closures.fy
|
203
201
|
- examples/constant_access.fy
|
202
|
+
- examples/curl_async.fy
|
204
203
|
- examples/default_args.fy
|
205
204
|
- examples/define_methods.fy
|
206
205
|
- examples/documentation.fy
|
@@ -213,6 +212,7 @@ files:
|
|
213
212
|
- examples/files.fy
|
214
213
|
- examples/finally.fy
|
215
214
|
- examples/future.fy
|
215
|
+
- examples/future_composition.fy
|
216
216
|
- examples/futures.fy
|
217
217
|
- examples/game_of_life.fy
|
218
218
|
- examples/hashes.fy
|
@@ -246,6 +246,7 @@ files:
|
|
246
246
|
- examples/ruby_require.fy
|
247
247
|
- examples/ruby_send.fy
|
248
248
|
- examples/singleton_methods.fy
|
249
|
+
- examples/struct.fy
|
249
250
|
- examples/stupid_quicksort.fy
|
250
251
|
- examples/threads.fy
|
251
252
|
- examples/tuple.fy
|
@@ -258,7 +259,6 @@ files:
|
|
258
259
|
- doc/features.md
|
259
260
|
- boot/code_loader.rb
|
260
261
|
- boot/compile.fy
|
261
|
-
- boot/compiler/parser/ext/fancy_parser.bundle
|
262
262
|
- boot/fancy_ext/block_env.rb
|
263
263
|
- boot/fancy_ext/class.rb
|
264
264
|
- boot/fancy_ext/console.rb
|
@@ -299,12 +299,7 @@ files:
|
|
299
299
|
- boot/rbx-compiler/parser/fancy_parser.bundle
|
300
300
|
- boot/rbx-compiler/parser/fancy_parser.c
|
301
301
|
- boot/rbx-compiler/parser/fancy_parser.h
|
302
|
-
- boot/rbx-compiler/parser/lexer.c
|
303
|
-
- boot/rbx-compiler/parser/lexer.h
|
304
302
|
- boot/rbx-compiler/parser/lexer.lex
|
305
|
-
- boot/rbx-compiler/parser/Makefile
|
306
|
-
- boot/rbx-compiler/parser/parser.c
|
307
|
-
- boot/rbx-compiler/parser/parser.h
|
308
303
|
- boot/rbx-compiler/parser/parser.rb
|
309
304
|
- boot/rbx-compiler/parser/parser.y
|
310
305
|
- boot/rbx-compiler/parser/Rakefile
|
Binary file
|
@@ -1,162 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
#### Start of system configuration section. ####
|
5
|
-
|
6
|
-
srcdir = /Users/backtype/projects/fancy/boot/rbx-compiler/parser
|
7
|
-
topdir = /Users/backtype/projects/rubinius/vm/capi/include
|
8
|
-
hdrdir = $(topdir)
|
9
|
-
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
|
-
prefix = $(DESTDIR)/Users/backtype/projects/rubinius
|
11
|
-
exec_prefix = $(prefix)
|
12
|
-
install_prefix = $(DESTDIR)
|
13
|
-
includedir = $(prefix)/include
|
14
|
-
bindir = $(DESTDIR)/Users/backtype/projects/rubinius/bin
|
15
|
-
sysconfdir = $(prefix)/etc
|
16
|
-
localedir = $(datarootdir)/locale
|
17
|
-
rubylibdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site
|
18
|
-
sitedir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site
|
19
|
-
oldincludedir = $(DESTDIR)/usr/include
|
20
|
-
libexecdir = $(exec_prefix)/libexec
|
21
|
-
rubyhdrdir = $(DESTDIR)/Users/backtype/projects/rubinius/vm/capi/include
|
22
|
-
libdir = $(exec_prefix)/lib
|
23
|
-
dvidir = $(docdir)
|
24
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
25
|
-
psdir = $(docdir)
|
26
|
-
infodir = $(datarootdir)/info
|
27
|
-
datadir = $(datarootdir)
|
28
|
-
archdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site/x86_64-darwin10.5.0
|
29
|
-
sharedstatedir = $(prefix)/com
|
30
|
-
localstatedir = $(prefix)/var
|
31
|
-
pdfdir = $(docdir)
|
32
|
-
htmldir = $(docdir)
|
33
|
-
datarootdir = $(prefix)/share
|
34
|
-
sbindir = $(exec_prefix)/sbin
|
35
|
-
sitelibdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site
|
36
|
-
mandir = $(datarootdir)/man
|
37
|
-
sitearchdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site/x86_64-darwin10.5.0
|
38
|
-
|
39
|
-
CC = gcc
|
40
|
-
LIBRUBY = $(LIBRUBY_SO)
|
41
|
-
LIBRUBY_A =
|
42
|
-
LIBRUBYARG_SHARED =
|
43
|
-
LIBRUBYARG_STATIC =
|
44
|
-
|
45
|
-
RUBY_EXTCONF_H =
|
46
|
-
cflags =
|
47
|
-
optflags =
|
48
|
-
debugflags =
|
49
|
-
warnflags =
|
50
|
-
CFLAGS = -fPIC -ggdb3 -O2 -fPIC
|
51
|
-
INCFLAGS = -I. -I. -I/Users/backtype/projects/rubinius/vm/capi/include -I/Users/backtype/projects/fancy/boot/rbx-compiler/parser
|
52
|
-
DEFS =
|
53
|
-
CPPFLAGS =
|
54
|
-
CXXFLAGS = $(CFLAGS)
|
55
|
-
ldflags =
|
56
|
-
dldflags =
|
57
|
-
archflag =
|
58
|
-
DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
|
59
|
-
LDSHARED = gcc -dynamic -bundle -undefined suppress -flat_namespace
|
60
|
-
AR = ar
|
61
|
-
EXEEXT =
|
62
|
-
|
63
|
-
RUBY_INSTALL_NAME = rbx
|
64
|
-
RUBY_SO_NAME = rubinius-1.2.3dev
|
65
|
-
arch = x86_64-darwin10.5.0
|
66
|
-
sitearch = x86_64-darwin10.5.0
|
67
|
-
ruby_version = 1.8
|
68
|
-
ruby = /Users/backtype/projects/rubinius/bin/rbx
|
69
|
-
RUBY = $(ruby)
|
70
|
-
RM = rm -f
|
71
|
-
MAKEDIRS = mkdir -p
|
72
|
-
INSTALL = install -c
|
73
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
74
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
75
|
-
COPY = cp
|
76
|
-
|
77
|
-
#### End of system configuration section. ####
|
78
|
-
|
79
|
-
preload =
|
80
|
-
|
81
|
-
libpath = . $(libdir)
|
82
|
-
LIBPATH = -L. -L$(libdir)
|
83
|
-
DEFFILE =
|
84
|
-
|
85
|
-
CLEANFILES = mkmf.log
|
86
|
-
DISTCLEANFILES =
|
87
|
-
|
88
|
-
extout =
|
89
|
-
extout_prefix =
|
90
|
-
target_prefix =
|
91
|
-
LOCAL_LIBS =
|
92
|
-
LIBS = $(LIBRUBYARG_STATIC) -lfl
|
93
|
-
SRCS = fancy_parser.c lexer.c parser.c
|
94
|
-
OBJS = fancy_parser.o lexer.o parser.o
|
95
|
-
TARGET = fancy_parser
|
96
|
-
DLLIB = $(TARGET).bundle
|
97
|
-
EXTSTATIC =
|
98
|
-
STATIC_LIB =
|
99
|
-
|
100
|
-
BINDIR = $(bindir)
|
101
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
102
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
103
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
104
|
-
|
105
|
-
TARGET_SO = $(DLLIB)
|
106
|
-
CLEANLIBS = $(TARGET).bundle
|
107
|
-
CLEANOBJS = *.o *.bak
|
108
|
-
|
109
|
-
all: $(DLLIB)
|
110
|
-
static: $(STATIC_LIB)
|
111
|
-
.PHONY: all install static install-so install-rb
|
112
|
-
.PHONY: clean clean-so clean-rb
|
113
|
-
|
114
|
-
clean:
|
115
|
-
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
116
|
-
|
117
|
-
distclean: clean
|
118
|
-
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
119
|
-
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
120
|
-
|
121
|
-
realclean: distclean
|
122
|
-
install: install-so install-rb
|
123
|
-
|
124
|
-
install-so: $(RUBYARCHDIR)
|
125
|
-
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
126
|
-
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
127
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
128
|
-
install-rb: pre-install-rb install-rb-default
|
129
|
-
install-rb-default: pre-install-rb-default
|
130
|
-
pre-install-rb: Makefile
|
131
|
-
pre-install-rb-default: Makefile
|
132
|
-
$(RUBYARCHDIR):
|
133
|
-
$(MAKEDIRS) $@
|
134
|
-
|
135
|
-
site-install: site-install-so site-install-rb
|
136
|
-
site-install-so: install-so
|
137
|
-
site-install-rb: install-rb
|
138
|
-
|
139
|
-
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
140
|
-
|
141
|
-
.cc.o:
|
142
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
143
|
-
|
144
|
-
.cxx.o:
|
145
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
146
|
-
|
147
|
-
.cpp.o:
|
148
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
149
|
-
|
150
|
-
.C.o:
|
151
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
152
|
-
|
153
|
-
.c.o:
|
154
|
-
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
155
|
-
|
156
|
-
$(DLLIB): $(OBJS) Makefile
|
157
|
-
@-$(RM) $@
|
158
|
-
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
$(OBJS): ruby.h defines.h
|