Mxx_ru 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +4 -3
- data/bin/mxxrugen +197 -0
- data/lib/mxx_ru/cmd_line_option_processor.rb +126 -0
- data/lib/mxx_ru/cpp.rb +1 -0
- data/lib/mxx_ru/cpp/composite.rb +2 -12
- data/lib/mxx_ru/cpp/lib_collection.rb +96 -0
- data/lib/mxx_ru/cpp/mode.rb +72 -10
- data/lib/mxx_ru/cpp/target.rb +85 -136
- data/lib/mxx_ru/cpp/toolset.rb +96 -9
- data/lib/mxx_ru/cpp/toolsets/bcc_win32_family.rb +5 -5
- data/lib/mxx_ru/cpp/toolsets/c89_nsk_family.rb +5 -5
- data/lib/mxx_ru/cpp/toolsets/gcc_family.rb +5 -5
- data/lib/mxx_ru/cpp/toolsets/gcc_mingw.rb +2 -2
- data/lib/mxx_ru/cpp/toolsets/vc8.rb +6 -1
- data/lib/mxx_ru/cpp/toolsets/vc_family.rb +4 -4
- data/lib/mxx_ru/generators/bin-unittest/g.rb +200 -0
- data/lib/mxx_ru/generators/bin-unittest/template.erb +16 -0
- data/lib/mxx_ru/generators/cpp-composite/g.rb +37 -0
- data/lib/mxx_ru/generators/cpp-dll/g.rb +37 -0
- data/lib/mxx_ru/generators/cpp-exe/g.rb +37 -0
- data/lib/mxx_ru/generators/cpp-lib-collection/g.rb +37 -0
- data/lib/mxx_ru/generators/cpp-lib/g.rb +37 -0
- data/lib/mxx_ru/generators/impl/cpp/generation.rb +291 -0
- data/lib/mxx_ru/generators/impl/cpp/template.erb +27 -0
- data/lib/mxx_ru/generators/impl/std_receiver.rb +80 -0
- data/lib/mxx_ru/util.rb +110 -22
- data/lib/mxx_ru/version.rb +38 -0
- data/tests/mxx_ru/generators/cpp/tc_generator.rb +34 -0
- data/tests/mxx_ru/generators/cpp/tc_options.rb +79 -0
- data/tests/mxx_ru/generators/cpp/tc_template_params.rb +45 -0
- data/tests/mxx_ru/lib_collection/a.cpp +8 -0
- data/tests/mxx_ru/lib_collection/a.hpp +8 -0
- data/tests/mxx_ru/lib_collection/a.rb +8 -0
- data/tests/mxx_ru/lib_collection/b.cpp +8 -0
- data/tests/mxx_ru/lib_collection/b.hpp +8 -0
- data/tests/mxx_ru/lib_collection/b.rb +8 -0
- data/tests/mxx_ru/lib_collection/c.cpp +8 -0
- data/tests/mxx_ru/lib_collection/c.hpp +8 -0
- data/tests/mxx_ru/lib_collection/c.rb +8 -0
- data/tests/mxx_ru/lib_collection/collection_a_b.rb +7 -0
- data/tests/mxx_ru/lib_collection/collection_c_d.rb +7 -0
- data/tests/mxx_ru/lib_collection/collection_c_d_e.rb +7 -0
- data/tests/mxx_ru/lib_collection/collection_f.rb +6 -0
- data/tests/mxx_ru/lib_collection/collection_i.rb +6 -0
- data/tests/mxx_ru/lib_collection/d.cpp +8 -0
- data/tests/mxx_ru/lib_collection/d.hpp +8 -0
- data/tests/mxx_ru/lib_collection/d.rb +8 -0
- data/tests/mxx_ru/lib_collection/e.cpp +8 -0
- data/tests/mxx_ru/lib_collection/e.hpp +8 -0
- data/tests/mxx_ru/lib_collection/e.rb +8 -0
- data/tests/mxx_ru/lib_collection/f.cpp +8 -0
- data/tests/mxx_ru/lib_collection/f.hpp +8 -0
- data/tests/mxx_ru/lib_collection/f.rb +7 -0
- data/tests/mxx_ru/lib_collection/g.cpp +8 -0
- data/tests/mxx_ru/lib_collection/g.hpp +8 -0
- data/tests/mxx_ru/lib_collection/g.rb +7 -0
- data/tests/mxx_ru/lib_collection/i.cpp +10 -0
- data/tests/mxx_ru/lib_collection/i.hpp +16 -0
- data/tests/mxx_ru/lib_collection/i.rb +17 -0
- data/tests/mxx_ru/lib_collection/main.cpp +18 -0
- data/tests/mxx_ru/lib_collection/main.rb +12 -0
- data/tests/mxx_ru/lib_collection/tc_lib_collection.rb +17 -0
- data/tests/mxx_ru/toolset/tc_tag_search.rb +68 -0
- data/tests/test_with_compilation.rb +1 -1
- metadata +67 -14
- data/tests/cpp/mswin_res_dll/o/dll.o +0 -0
- data/tests/cpp/mswin_res_exe/o/main.o +0 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
#if !defined( I_HPP )
|
2
|
+
#define I_HPP
|
3
|
+
|
4
|
+
#if defined( I_MSWIN )
|
5
|
+
#if defined( I_PRJ )
|
6
|
+
#define I_TYPE __declspec(dllexport)
|
7
|
+
#else
|
8
|
+
#define I_TYPE __declspec(dllimport)
|
9
|
+
#endif
|
10
|
+
#else
|
11
|
+
#define I_TYPE
|
12
|
+
#endif
|
13
|
+
|
14
|
+
I_TYPE void i();
|
15
|
+
|
16
|
+
#endif
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'mxx_ru/cpp'
|
2
|
+
|
3
|
+
MxxRu::Cpp::dll_target {
|
4
|
+
target 'I'
|
5
|
+
implib_path '.'
|
6
|
+
|
7
|
+
required_prj 'collection_f.rb'
|
8
|
+
required_prj 'g.rb'
|
9
|
+
|
10
|
+
define 'I_PRJ'
|
11
|
+
|
12
|
+
if 'mswin' == toolset.tag( 'target_os' )
|
13
|
+
define 'I_MSWIN'
|
14
|
+
end
|
15
|
+
|
16
|
+
cpp_source 'i.cpp'
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require File.dirname( __FILE__ ) + '/../../test_with_compilation'
|
4
|
+
|
5
|
+
class TC_LibCollection < Test::Unit::TestCase
|
6
|
+
include TestWithCompilation
|
7
|
+
|
8
|
+
test_path 'tests/mxx_ru/lib_collection'
|
9
|
+
|
10
|
+
test_case :successful_compile_and_link do
|
11
|
+
assert_nothing_raised {
|
12
|
+
build( 'main.rb' )
|
13
|
+
clean( 'main.rb' )
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
require 'mxx_ru/cpp/toolset'
|
5
|
+
|
6
|
+
class TC_TagSearch < Test::Unit::TestCase
|
7
|
+
class SpecialObject
|
8
|
+
def each( &block )
|
9
|
+
[ 'first', 'second', 'third' ].each &block
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def setup
|
14
|
+
@ts = MxxRu::Cpp::Toolset.new( 'dummy' )
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_no_tag
|
18
|
+
assert_equal( '12345', @ts.tag( 'missing', '12345' ) )
|
19
|
+
|
20
|
+
assert_raise( MxxRu::Cpp::Toolset::UnknownTagEx ) do
|
21
|
+
@ts.tag( 'missing' )
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_no_tag_array
|
26
|
+
assert_equal( '12345', @ts.tag( [ 'one', 'two', 'three' ], '12345' ) )
|
27
|
+
|
28
|
+
assert_raise( MxxRu::Cpp::Toolset::UnknownTagEx ) do
|
29
|
+
@ts.tag( [ 'one', 'two', 'three' ] )
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_exist
|
34
|
+
tag = 'defined'
|
35
|
+
value = 'value'
|
36
|
+
|
37
|
+
@ts.setup_tag( tag, value )
|
38
|
+
|
39
|
+
assert_equal( value, @ts.tag( tag, 'wrong-search-result' ) )
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_exist_array
|
43
|
+
tags = [ 'first', 'second', 'third' ]
|
44
|
+
values = [ '1', '2', '3' ]
|
45
|
+
|
46
|
+
tags.zip( values ).each do |pair|
|
47
|
+
@ts.setup_tag( *pair )
|
48
|
+
end
|
49
|
+
|
50
|
+
assert_equal( values[ 0 ], @ts.tag( tags, 'wrong-search-result' ) )
|
51
|
+
assert_equal( values[ 1 ],
|
52
|
+
@ts.tag( [ tags[1], tags[0], tags[2] ], 'wrong-search-result' ) )
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_invalid_key_type
|
56
|
+
assert_raise( MxxRu::InvalidValueEx ) do
|
57
|
+
@ts.tag( 1 )
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_special_object_with_each
|
62
|
+
|
63
|
+
@ts.setup_tag( 'second', '2' )
|
64
|
+
assert_equal( '2', @ts.tag( SpecialObject.new, '2222' ) )
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: Mxx_ru
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date:
|
6
|
+
version: 1.4.0
|
7
|
+
date: 2007-02-19 00:00:00 +03:00
|
8
8
|
summary: Mxx_ru (Make++ on Ruby) is a cross-platform build tool
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -29,6 +29,7 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- The Mxx_ru Project
|
31
31
|
files:
|
32
|
+
- bin/mxxrugen
|
32
33
|
- tests/c
|
33
34
|
- tests/cpp
|
34
35
|
- tests/mxx_ru
|
@@ -74,16 +75,11 @@ files:
|
|
74
75
|
- tests/cpp/cpp_sources_glob/some/module/4
|
75
76
|
- tests/cpp/cpp_sources_glob/some/module/funcs.hpp
|
76
77
|
- tests/cpp/cpp_sources_glob/some/module/main.cpp
|
77
|
-
- tests/cpp/cpp_sources_glob/some/module/o
|
78
78
|
- tests/cpp/cpp_sources_glob/some/module/prj.rb
|
79
79
|
- tests/cpp/cpp_sources_glob/some/module/1/f1.cpp
|
80
|
-
- tests/cpp/cpp_sources_glob/some/module/1/o
|
81
80
|
- tests/cpp/cpp_sources_glob/some/module/2/f2.cpp
|
82
|
-
- tests/cpp/cpp_sources_glob/some/module/2/o
|
83
81
|
- tests/cpp/cpp_sources_glob/some/module/3/f3.cpp
|
84
|
-
- tests/cpp/cpp_sources_glob/some/module/3/o
|
85
82
|
- tests/cpp/cpp_sources_glob/some/module/4/f4.cpp
|
86
|
-
- tests/cpp/cpp_sources_glob/some/module/4/o
|
87
83
|
- tests/cpp/mswin_res_dll/build.rb
|
88
84
|
- tests/cpp/mswin_res_dll/dll.cpp
|
89
85
|
- tests/cpp/mswin_res_dll/dll.rb
|
@@ -96,7 +92,6 @@ files:
|
|
96
92
|
- tests/cpp/mswin_res_dll/tc_mswin_res_dll.rb
|
97
93
|
- tests/cpp/mswin_res_dll/h/dll.hpp
|
98
94
|
- tests/cpp/mswin_res_dll/h/res.h
|
99
|
-
- tests/cpp/mswin_res_dll/o/dll.o
|
100
95
|
- tests/cpp/mswin_res_dll/res/tree_fol.bmp
|
101
96
|
- tests/cpp/mswin_res_dll/res/tree_state_1.bmp
|
102
97
|
- tests/cpp/mswin_res_dll/res/tree_state_2.bmp
|
@@ -108,7 +103,6 @@ files:
|
|
108
103
|
- tests/cpp/mswin_res_exe/res
|
109
104
|
- tests/cpp/mswin_res_exe/tc_mswin_res_exe.rb
|
110
105
|
- tests/cpp/mswin_res_exe/h/res.h
|
111
|
-
- tests/cpp/mswin_res_exe/o/main.o
|
112
106
|
- tests/cpp/mswin_res_exe/res/tree_fol.bmp
|
113
107
|
- tests/cpp/mswin_res_exe/res/tree_state_1.bmp
|
114
108
|
- tests/cpp/mswin_res_exe/res/tree_state_2.bmp
|
@@ -163,6 +157,8 @@ files:
|
|
163
157
|
- tests/cpp/vc_cleanup/lib/simple_target_root
|
164
158
|
- tests/mxx_ru/binary_library
|
165
159
|
- tests/mxx_ru/change_default_value
|
160
|
+
- tests/mxx_ru/generators
|
161
|
+
- tests/mxx_ru/lib_collection
|
166
162
|
- tests/mxx_ru/lib_path
|
167
163
|
- tests/mxx_ru/obj_placements
|
168
164
|
- tests/mxx_ru/opt_lib_ext
|
@@ -170,6 +166,7 @@ files:
|
|
170
166
|
- tests/mxx_ru/qt_gen
|
171
167
|
- tests/mxx_ru/target_ext
|
172
168
|
- tests/mxx_ru/tc_makestyle_generator.rb
|
169
|
+
- tests/mxx_ru/toolset
|
173
170
|
- tests/mxx_ru/vc8
|
174
171
|
- tests/mxx_ru/binary_library/tc_binary_library.rb
|
175
172
|
- tests/mxx_ru/binary_library/tc_binary_target_lib_methods.rb
|
@@ -183,6 +180,42 @@ files:
|
|
183
180
|
- tests/mxx_ru/change_default_value/ignoring_by_child_1/child_2.rb
|
184
181
|
- tests/mxx_ru/change_default_value/ok/build.rb
|
185
182
|
- tests/mxx_ru/change_default_value/ok/child_1.rb
|
183
|
+
- tests/mxx_ru/generators/cpp
|
184
|
+
- tests/mxx_ru/generators/cpp/tc_generator.rb
|
185
|
+
- tests/mxx_ru/generators/cpp/tc_options.rb
|
186
|
+
- tests/mxx_ru/generators/cpp/tc_template_params.rb
|
187
|
+
- tests/mxx_ru/lib_collection/a.cpp
|
188
|
+
- tests/mxx_ru/lib_collection/a.hpp
|
189
|
+
- tests/mxx_ru/lib_collection/a.rb
|
190
|
+
- tests/mxx_ru/lib_collection/b.cpp
|
191
|
+
- tests/mxx_ru/lib_collection/b.hpp
|
192
|
+
- tests/mxx_ru/lib_collection/b.rb
|
193
|
+
- tests/mxx_ru/lib_collection/c.cpp
|
194
|
+
- tests/mxx_ru/lib_collection/c.hpp
|
195
|
+
- tests/mxx_ru/lib_collection/c.rb
|
196
|
+
- tests/mxx_ru/lib_collection/collection_a_b.rb
|
197
|
+
- tests/mxx_ru/lib_collection/collection_c_d.rb
|
198
|
+
- tests/mxx_ru/lib_collection/collection_c_d_e.rb
|
199
|
+
- tests/mxx_ru/lib_collection/collection_f.rb
|
200
|
+
- tests/mxx_ru/lib_collection/collection_i.rb
|
201
|
+
- tests/mxx_ru/lib_collection/d.cpp
|
202
|
+
- tests/mxx_ru/lib_collection/d.hpp
|
203
|
+
- tests/mxx_ru/lib_collection/d.rb
|
204
|
+
- tests/mxx_ru/lib_collection/e.cpp
|
205
|
+
- tests/mxx_ru/lib_collection/e.hpp
|
206
|
+
- tests/mxx_ru/lib_collection/e.rb
|
207
|
+
- tests/mxx_ru/lib_collection/f.cpp
|
208
|
+
- tests/mxx_ru/lib_collection/f.hpp
|
209
|
+
- tests/mxx_ru/lib_collection/f.rb
|
210
|
+
- tests/mxx_ru/lib_collection/g.cpp
|
211
|
+
- tests/mxx_ru/lib_collection/g.hpp
|
212
|
+
- tests/mxx_ru/lib_collection/g.rb
|
213
|
+
- tests/mxx_ru/lib_collection/i.cpp
|
214
|
+
- tests/mxx_ru/lib_collection/i.hpp
|
215
|
+
- tests/mxx_ru/lib_collection/i.rb
|
216
|
+
- tests/mxx_ru/lib_collection/main.cpp
|
217
|
+
- tests/mxx_ru/lib_collection/main.rb
|
218
|
+
- tests/mxx_ru/lib_collection/tc_lib_collection.rb
|
186
219
|
- tests/mxx_ru/lib_path/build.rb
|
187
220
|
- tests/mxx_ru/lib_path/bye.c
|
188
221
|
- tests/mxx_ru/lib_path/bye.rb
|
@@ -192,7 +225,6 @@ files:
|
|
192
225
|
- tests/mxx_ru/lib_path/hi_lib
|
193
226
|
- tests/mxx_ru/lib_path/main.c
|
194
227
|
- tests/mxx_ru/lib_path/main.rb
|
195
|
-
- tests/mxx_ru/lib_path/o
|
196
228
|
- tests/mxx_ru/lib_path/tc_lib_path.rb
|
197
229
|
- tests/mxx_ru/obj_placements/tc_custom_subdir.rb
|
198
230
|
- tests/mxx_ru/opt_lib_ext/build.rb
|
@@ -200,7 +232,6 @@ files:
|
|
200
232
|
- tests/mxx_ru/opt_lib_ext/hi.h
|
201
233
|
- tests/mxx_ru/opt_lib_ext/hi.rb
|
202
234
|
- tests/mxx_ru/opt_lib_ext/main.c
|
203
|
-
- tests/mxx_ru/opt_lib_ext/o
|
204
235
|
- tests/mxx_ru/opt_lib_ext/tc_opt_lib_ext.rb
|
205
236
|
- tests/mxx_ru/opt_lib_ext/test-no-ext.rb
|
206
237
|
- tests/mxx_ru/opt_lib_ext/test-with-ext.rb
|
@@ -209,11 +240,11 @@ files:
|
|
209
240
|
- tests/mxx_ru/target_ext/dll_hi.cpp
|
210
241
|
- tests/mxx_ru/target_ext/exe_hi.cpp
|
211
242
|
- tests/mxx_ru/target_ext/lib_hi.cpp
|
212
|
-
- tests/mxx_ru/target_ext/o
|
213
243
|
- tests/mxx_ru/target_ext/prj_dll.rb
|
214
244
|
- tests/mxx_ru/target_ext/prj_exe.rb
|
215
245
|
- tests/mxx_ru/target_ext/prj_lib.rb
|
216
246
|
- tests/mxx_ru/target_ext/tc_target_ext.rb
|
247
|
+
- tests/mxx_ru/toolset/tc_tag_search.rb
|
217
248
|
- tests/mxx_ru/vc8/tc_actual_manifest.rb
|
218
249
|
- tests/mxx_ru/vc8/tc_append_mt_commands.rb
|
219
250
|
- tests/mxx_ru/vc8/tc_default_manifest.rb
|
@@ -284,16 +315,20 @@ files:
|
|
284
315
|
- lib/mxx_ru/binary_library.rb
|
285
316
|
- lib/mxx_ru/binary_target.rb
|
286
317
|
- lib/mxx_ru/binary_unittest.rb
|
318
|
+
- lib/mxx_ru/cmd_line_option_processor.rb
|
287
319
|
- lib/mxx_ru/compat.rb
|
288
320
|
- lib/mxx_ru/cpp
|
289
321
|
- lib/mxx_ru/cpp.rb
|
290
322
|
- lib/mxx_ru/ex.rb
|
323
|
+
- lib/mxx_ru/generators
|
291
324
|
- lib/mxx_ru/makestyle_generator.rb
|
292
325
|
- lib/mxx_ru/textfile_unittest.rb
|
293
326
|
- lib/mxx_ru/util.rb
|
327
|
+
- lib/mxx_ru/version.rb
|
294
328
|
- lib/mxx_ru/cpp/analyzer.rb
|
295
329
|
- lib/mxx_ru/cpp/composite.rb
|
296
330
|
- lib/mxx_ru/cpp/detect_toolset.rb
|
331
|
+
- lib/mxx_ru/cpp/lib_collection.rb
|
297
332
|
- lib/mxx_ru/cpp/mode.rb
|
298
333
|
- lib/mxx_ru/cpp/obj_placement.rb
|
299
334
|
- lib/mxx_ru/cpp/obj_placements
|
@@ -318,6 +353,24 @@ files:
|
|
318
353
|
- lib/mxx_ru/cpp/toolsets/vc7.rb
|
319
354
|
- lib/mxx_ru/cpp/toolsets/vc8.rb
|
320
355
|
- lib/mxx_ru/cpp/toolsets/vc_family.rb
|
356
|
+
- lib/mxx_ru/generators/bin-unittest
|
357
|
+
- lib/mxx_ru/generators/cpp-composite
|
358
|
+
- lib/mxx_ru/generators/cpp-dll
|
359
|
+
- lib/mxx_ru/generators/cpp-exe
|
360
|
+
- lib/mxx_ru/generators/cpp-lib
|
361
|
+
- lib/mxx_ru/generators/cpp-lib-collection
|
362
|
+
- lib/mxx_ru/generators/impl
|
363
|
+
- lib/mxx_ru/generators/bin-unittest/g.rb
|
364
|
+
- lib/mxx_ru/generators/bin-unittest/template.erb
|
365
|
+
- lib/mxx_ru/generators/cpp-composite/g.rb
|
366
|
+
- lib/mxx_ru/generators/cpp-dll/g.rb
|
367
|
+
- lib/mxx_ru/generators/cpp-exe/g.rb
|
368
|
+
- lib/mxx_ru/generators/cpp-lib/g.rb
|
369
|
+
- lib/mxx_ru/generators/cpp-lib-collection/g.rb
|
370
|
+
- lib/mxx_ru/generators/impl/cpp
|
371
|
+
- lib/mxx_ru/generators/impl/std_receiver.rb
|
372
|
+
- lib/mxx_ru/generators/impl/cpp/generation.rb
|
373
|
+
- lib/mxx_ru/generators/impl/cpp/template.erb
|
321
374
|
- examples/exe_and_lib
|
322
375
|
- examples/exe_dll_lib
|
323
376
|
- examples/exe_dll_lib_2
|
@@ -369,8 +422,8 @@ extra_rdoc_files:
|
|
369
422
|
- Rakefile
|
370
423
|
- COPYING
|
371
424
|
- NEWS
|
372
|
-
executables:
|
373
|
-
|
425
|
+
executables:
|
426
|
+
- mxxrugen
|
374
427
|
extensions: []
|
375
428
|
|
376
429
|
requirements: []
|