Mxx_ru 1.5.5 → 1.5.6
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/NEWS +10 -0
- data/Rakefile +1 -1
- data/bin/mxxrugen +1 -1
- data/lib/mxx_ru/cpp/analyzer.rb +5 -6
- data/lib/mxx_ru/cpp/target.rb +10 -1
- data/lib/mxx_ru/cpp/toolset.rb +7 -0
- data/lib/mxx_ru/cpp/toolsets/gcc_family.rb +12 -7
- data/lib/mxx_ru/generators/cpp-build-root/template.erb +1 -1
- data/lib/mxx_ru/version.rb +1 -1
- data/tests/cpp/lib_from_lib_dependecies/a.cpp +3 -3
- metadata +22 -40
- data/tests/cpp/mswin_res_dll/o/dll.o +0 -0
- data/tests/cpp/mswin_res_exe/src/o/main.o +0 -0
data/NEWS
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
Changes in Mxx_ru
|
|
2
2
|
|
|
3
|
+
1.5.6 version (2012.09.10)
|
|
4
|
+
|
|
5
|
+
Method Cpp::Target#source_encoding for setting default encoding source files was added.
|
|
6
|
+
|
|
7
|
+
Method Cpp::Toolset#force_cpp0x_std for setting a flag includes "-std=c++0x" compiler option was added.
|
|
8
|
+
|
|
9
|
+
Fixes at cpp-build-root generator.
|
|
10
|
+
|
|
11
|
+
Fixes at Gcc_family toolsets build options.
|
|
12
|
+
|
|
3
13
|
1.3.0 version (2006.05.15)
|
|
4
14
|
|
|
5
15
|
New command line argument --mxx-rebuild.
|
data/Rakefile
CHANGED
data/bin/mxxrugen
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#--
|
|
2
2
|
# Copyright (c) 1996-2004, Yauheni Akhotnikau
|
|
3
3
|
# Copyright (c) 2004-2006, JSC Intervale
|
|
4
|
-
# Copyright (c) 2006, The Mxx_ru Project
|
|
4
|
+
# Copyright (c) 2006-2011, The Mxx_ru Project
|
|
5
5
|
# All rights reserved.
|
|
6
6
|
#
|
|
7
7
|
# Redistribution and use in source and binary forms, with or without modification,
|
data/lib/mxx_ru/cpp/analyzer.rb
CHANGED
|
@@ -87,7 +87,6 @@ module MxxRu
|
|
|
87
87
|
# Add paths to header files.
|
|
88
88
|
# [_a_paths_] Should be Array of Strings.
|
|
89
89
|
def add_include_paths( a_paths )
|
|
90
|
-
|
|
91
90
|
a_paths.each { |p|
|
|
92
91
|
if !@include_paths.include?( p )
|
|
93
92
|
@include_paths << p
|
|
@@ -96,17 +95,17 @@ module MxxRu
|
|
|
96
95
|
end
|
|
97
96
|
|
|
98
97
|
# Perform file analisys.
|
|
99
|
-
def analyze
|
|
98
|
+
def analyze ( a_encoding )
|
|
100
99
|
# Current list of keys should be taken to avoid
|
|
101
100
|
# dynamic growth of file list.
|
|
102
|
-
# Repeat iterations until source file list changes stop
|
|
101
|
+
# Repeat iterations until source file list changes stop
|
|
103
102
|
old_size = 0
|
|
104
103
|
files = @sources.keys
|
|
105
104
|
while old_size != files.size
|
|
106
105
|
files.each { |file_name|
|
|
107
106
|
current = @sources[ file_name ]
|
|
108
107
|
if !current.is_processed
|
|
109
|
-
process_file( file_name, current )
|
|
108
|
+
process_file( file_name, current, a_encoding )
|
|
110
109
|
end
|
|
111
110
|
}
|
|
112
111
|
|
|
@@ -146,12 +145,12 @@ module MxxRu
|
|
|
146
145
|
# Process next file.
|
|
147
146
|
# [_a_file_name_] File name.
|
|
148
147
|
# [_a_file_obj_] Corresponding object.
|
|
149
|
-
def process_file( a_file_name, a_file_obj )
|
|
148
|
+
def process_file( a_file_name, a_file_obj, a_encoding )
|
|
150
149
|
|
|
151
150
|
# Gather file names list from include directives.
|
|
152
151
|
std_path_included = Array.new
|
|
153
152
|
local_path_included = Array.new
|
|
154
|
-
IO.foreach( a_file_name ) { |line|
|
|
153
|
+
IO.foreach( a_file_name , encoding: a_encoding ) { |line|
|
|
155
154
|
r = @@include_regex.match( line )
|
|
156
155
|
if nil != r
|
|
157
156
|
if "<" == r[ 1 ]
|
data/lib/mxx_ru/cpp/target.rb
CHANGED
|
@@ -508,6 +508,8 @@ module MxxRu
|
|
|
508
508
|
attr_reader :mxx_target_name
|
|
509
509
|
# Optimization mode. By default, speed optimization is used.
|
|
510
510
|
attr_reader :mxx_optimization
|
|
511
|
+
# Default encoding source files.
|
|
512
|
+
attr_reader :mxx_encoding
|
|
511
513
|
|
|
512
514
|
# Generator for methods to manipulation with 'runtime_mode',
|
|
513
515
|
# 'rtti_mode', 'rtl_mode', 'threading_mode' and so on.
|
|
@@ -662,6 +664,8 @@ module MxxRu
|
|
|
662
664
|
# True if toolset has completely defined all compiler and linker options required.
|
|
663
665
|
@mxx_all_options_defined = false
|
|
664
666
|
|
|
667
|
+
@mxx_encoding = Encoding.find("Binary")
|
|
668
|
+
|
|
665
669
|
Target::initialize_spreadable_option_instance_variables( self )
|
|
666
670
|
end
|
|
667
671
|
|
|
@@ -893,6 +897,11 @@ module MxxRu
|
|
|
893
897
|
end
|
|
894
898
|
end
|
|
895
899
|
|
|
900
|
+
# Set encoding source files.
|
|
901
|
+
def source_encoding( a_encoding )
|
|
902
|
+
@mxx_encoding = Encoding.find("#{a_encoding}")
|
|
903
|
+
end
|
|
904
|
+
|
|
896
905
|
# Perform build of the target.
|
|
897
906
|
def build
|
|
898
907
|
if nil == @mxx_last_build_result
|
|
@@ -1083,7 +1092,7 @@ module MxxRu
|
|
|
1083
1092
|
analyzer.add_include_paths( mxx_all_include_paths )
|
|
1084
1093
|
|
|
1085
1094
|
# Performing analisys.
|
|
1086
|
-
analyzer.analyze
|
|
1095
|
+
analyzer.analyze mxx_encoding
|
|
1087
1096
|
|
|
1088
1097
|
# Getting results of analysis.
|
|
1089
1098
|
mxx_c_files.each { |s|
|
data/lib/mxx_ru/cpp/toolset.rb
CHANGED
|
@@ -1210,6 +1210,13 @@ module MxxRu
|
|
|
1210
1210
|
p + source_name + s
|
|
1211
1211
|
end
|
|
1212
1212
|
|
|
1213
|
+
public
|
|
1214
|
+
|
|
1215
|
+
# Sets a flag includes "-std=c++0x" compiler option.
|
|
1216
|
+
# Using at gnu-compilers.
|
|
1217
|
+
def force_cpp0x_std
|
|
1218
|
+
end
|
|
1219
|
+
|
|
1213
1220
|
end # class Toolset
|
|
1214
1221
|
|
|
1215
1222
|
# Current toolset.
|
|
@@ -47,6 +47,7 @@ module MxxRu
|
|
|
47
47
|
|
|
48
48
|
def initialize( a_name )
|
|
49
49
|
super( a_name )
|
|
50
|
+
@is_cpp0x_std = false
|
|
50
51
|
end
|
|
51
52
|
|
|
52
53
|
# Returns C compiler name.
|
|
@@ -90,16 +91,12 @@ module MxxRu
|
|
|
90
91
|
end
|
|
91
92
|
|
|
92
93
|
if RTL_STATIC == target.mxx_rtl_mode
|
|
93
|
-
target.linker_option( "
|
|
94
|
+
target.linker_option( "-static-libgcc" )
|
|
94
95
|
else
|
|
95
|
-
target.linker_option( "
|
|
96
|
+
target.linker_option( "-shared-libgcc" )
|
|
96
97
|
end
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
if target.target_type.name == DllTargetType::TYPE ||
|
|
100
|
-
target.target_type.name == MacOSBundleTargetType::TYPE
|
|
101
|
-
target.compiler_option( "-fPIC" )
|
|
102
|
-
end
|
|
99
|
+
target.compiler_option( "-fPIC" )
|
|
103
100
|
|
|
104
101
|
# If C++ files are exist, linker should use stdc++ library.
|
|
105
102
|
if target.mxx_cpp_files.size
|
|
@@ -113,6 +110,10 @@ module MxxRu
|
|
|
113
110
|
target.mxx_all_include_paths.each { |p|
|
|
114
111
|
target.compiler_option( "-I" + p )
|
|
115
112
|
}
|
|
113
|
+
|
|
114
|
+
if true == @is_cpp0x_std
|
|
115
|
+
target.cpp_compiler_option( "-std=c++0x" )
|
|
116
|
+
end
|
|
116
117
|
end
|
|
117
118
|
|
|
118
119
|
# See description at MxxRu::Cpp::Toolset#obj_file_ext.
|
|
@@ -317,6 +318,10 @@ module MxxRu
|
|
|
317
318
|
library_name
|
|
318
319
|
end
|
|
319
320
|
|
|
321
|
+
# Sets a flag includes "-std=c++0x" compiler option.
|
|
322
|
+
def force_cpp0x_std
|
|
323
|
+
@is_cpp0x_std = true
|
|
324
|
+
end
|
|
320
325
|
end # class GccFamily
|
|
321
326
|
|
|
322
327
|
# For compatibility with previous versions.
|
data/lib/mxx_ru/version.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#include <cstdio>
|
|
2
|
-
|
|
3
|
-
void A() { std::printf( "A2\n" ); }
|
|
1
|
+
#include <cstdio>
|
|
2
|
+
|
|
3
|
+
void A() { std::printf( "A2\n" ); }
|
metadata
CHANGED
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: Mxx_ru
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
- 1
|
|
7
|
-
- 5
|
|
8
|
-
- 5
|
|
9
|
-
version: 1.5.5
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.5.6
|
|
5
|
+
prerelease:
|
|
10
6
|
platform: ruby
|
|
11
|
-
authors:
|
|
7
|
+
authors:
|
|
12
8
|
- The Mxx_ru Project
|
|
13
9
|
autorequire:
|
|
14
10
|
bindir: bin
|
|
15
11
|
cert_chain: []
|
|
16
|
-
|
|
17
|
-
date: 2011-10-22 00:00:00 +04:00
|
|
18
|
-
default_executable:
|
|
12
|
+
date: 2012-09-10 00:00:00.000000000 Z
|
|
19
13
|
dependencies: []
|
|
20
|
-
|
|
21
14
|
description:
|
|
22
15
|
email: eao197@yahoo.com
|
|
23
|
-
executables:
|
|
16
|
+
executables:
|
|
24
17
|
- mxxrugen
|
|
25
18
|
extensions: []
|
|
26
|
-
|
|
27
|
-
extra_rdoc_files:
|
|
19
|
+
extra_rdoc_files:
|
|
28
20
|
- README
|
|
29
21
|
- Rakefile
|
|
30
22
|
- COPYING
|
|
31
23
|
- NEWS
|
|
32
|
-
files:
|
|
24
|
+
files:
|
|
33
25
|
- bin/mxxrugen
|
|
34
26
|
- tests/cpp/cpp_sources_glob/build.rb
|
|
35
27
|
- tests/cpp/cpp_sources_glob/some/module/1/f1.cpp
|
|
@@ -62,7 +54,6 @@ files:
|
|
|
62
54
|
- tests/cpp/mswin_res_dll/h/res.h
|
|
63
55
|
- tests/cpp/mswin_res_dll/main.cpp
|
|
64
56
|
- tests/cpp/mswin_res_dll/main.rb
|
|
65
|
-
- tests/cpp/mswin_res_dll/o/dll.o
|
|
66
57
|
- tests/cpp/mswin_res_dll/res/tree_fol.bmp
|
|
67
58
|
- tests/cpp/mswin_res_dll/res/tree_state_1.bmp
|
|
68
59
|
- tests/cpp/mswin_res_dll/res/tree_state_2.bmp
|
|
@@ -74,7 +65,6 @@ files:
|
|
|
74
65
|
- tests/cpp/mswin_res_exe/res/tree_state_2.bmp
|
|
75
66
|
- tests/cpp/mswin_res_exe/src/main.cpp
|
|
76
67
|
- tests/cpp/mswin_res_exe/src/main.rc
|
|
77
|
-
- tests/cpp/mswin_res_exe/src/o/main.o
|
|
78
68
|
- tests/cpp/mswin_res_exe/tc_mswin_res_exe.rb
|
|
79
69
|
- tests/cpp/rucodegen/host_config.cpp
|
|
80
70
|
- tests/cpp/rucodegen/host_config.rb
|
|
@@ -331,39 +321,31 @@ files:
|
|
|
331
321
|
- Rakefile
|
|
332
322
|
- COPYING
|
|
333
323
|
- NEWS
|
|
334
|
-
has_rdoc: true
|
|
335
324
|
homepage: http://www.rubyforge.com/projects/mxx-ru
|
|
336
325
|
licenses: []
|
|
337
|
-
|
|
338
326
|
post_install_message:
|
|
339
|
-
rdoc_options:
|
|
327
|
+
rdoc_options:
|
|
340
328
|
- -S
|
|
341
329
|
- --main
|
|
342
330
|
- README
|
|
343
|
-
require_paths:
|
|
331
|
+
require_paths:
|
|
344
332
|
- lib
|
|
345
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
333
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
346
334
|
none: false
|
|
347
|
-
requirements:
|
|
348
|
-
- -
|
|
349
|
-
- !ruby/object:Gem::Version
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
version: "0"
|
|
353
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
|
+
requirements:
|
|
336
|
+
- - ! '>='
|
|
337
|
+
- !ruby/object:Gem::Version
|
|
338
|
+
version: '0'
|
|
339
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
354
340
|
none: false
|
|
355
|
-
requirements:
|
|
356
|
-
- -
|
|
357
|
-
- !ruby/object:Gem::Version
|
|
358
|
-
|
|
359
|
-
- 0
|
|
360
|
-
version: "0"
|
|
341
|
+
requirements:
|
|
342
|
+
- - ! '>='
|
|
343
|
+
- !ruby/object:Gem::Version
|
|
344
|
+
version: '0'
|
|
361
345
|
requirements: []
|
|
362
|
-
|
|
363
346
|
rubyforge_project:
|
|
364
|
-
rubygems_version: 1.
|
|
347
|
+
rubygems_version: 1.8.24
|
|
365
348
|
signing_key:
|
|
366
349
|
specification_version: 3
|
|
367
350
|
summary: Mxx_ru (Make++ on Ruby) is a cross-platform build tool
|
|
368
351
|
test_files: []
|
|
369
|
-
|
|
Binary file
|
|
Binary file
|