r2corba 1.4.1-x86-mingw32 → 1.5.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/CHANGES +173 -159
- data/LICENSE +59 -59
- data/README +62 -62
- data/THANKS +54 -52
- data/bin/r2corba +1 -1
- data/bin/ridlc +1 -1
- data/bin/rins +1 -1
- data/lib/corba.rb +16 -16
- data/lib/corba/cbase/IORMap.rb +33 -33
- data/lib/corba/cbase/ORB.rb +237 -231
- data/lib/corba/cbase/Request.rb +133 -133
- data/lib/corba/cbase/Streams.rb +129 -129
- data/lib/corba/cbase/Stub.rb +19 -19
- data/lib/corba/cbase/Typecode.rb +441 -441
- data/lib/corba/cbase/Values.rb +129 -129
- data/lib/corba/cbase/exception.rb +66 -66
- data/lib/corba/cbase/poa.rb +23 -23
- data/lib/corba/cbase/policies.rb +77 -77
- data/lib/corba/cbase/post_require.rb +13 -13
- data/lib/corba/cbase/require.rb +28 -28
- data/lib/corba/cmds/base.rb +85 -85
- data/lib/corba/cmds/test.rb +30 -30
- data/lib/corba/common/Any.rb +91 -91
- data/lib/corba/common/IDL.rb +104 -104
- data/lib/corba/common/ORB.rb +368 -368
- data/lib/corba/common/Object.rb +208 -208
- data/lib/corba/common/Request.rb +19 -19
- data/lib/corba/common/Servant.rb +108 -108
- data/lib/corba/common/Struct.rb +21 -21
- data/lib/corba/common/Stub.rb +79 -79
- data/lib/corba/common/Typecode.rb +1121 -1121
- data/lib/corba/common/Union.rb +55 -55
- data/lib/corba/common/Values.rb +91 -91
- data/lib/corba/common/const.rb +22 -22
- data/lib/corba/common/exception.rb +68 -68
- data/lib/corba/common/require.rb +27 -27
- data/lib/corba/common/version.rb +22 -22
- data/lib/corba/idl/IDL.rb +21 -21
- data/lib/corba/idl/IORTable.pidl +62 -62
- data/lib/corba/idl/TAO_Ext.pidl +46 -46
- data/lib/corba/idl/require.rb +20 -20
- data/lib/corba/jbase/Any.rb +273 -273
- data/lib/corba/jbase/IORMap.rb +35 -35
- data/lib/corba/jbase/ORB.rb +112 -99
- data/lib/corba/jbase/Object.rb +99 -98
- data/lib/corba/jbase/Request.rb +225 -225
- data/lib/corba/jbase/Servant.rb +247 -246
- data/lib/corba/jbase/ServerRequest.rb +127 -127
- data/lib/corba/jbase/Streams.rb +670 -670
- data/lib/corba/jbase/Stub.rb +38 -38
- data/lib/corba/jbase/Typecode.rb +520 -520
- data/lib/corba/jbase/Values.rb +173 -173
- data/lib/corba/jbase/exception.rb +106 -106
- data/lib/corba/jbase/poa.rb +228 -228
- data/lib/corba/jbase/policies.rb +299 -299
- data/lib/corba/jbase/post_require.rb +14 -14
- data/lib/corba/jbase/require.rb +89 -86
- data/lib/corba/naming.rb +14 -14
- data/lib/corba/naming_service.rb +15 -15
- data/lib/corba/poa.rb +15 -15
- data/lib/corba/policies.rb +18 -18
- data/lib/corba/require.rb +17 -17
- data/lib/corba/svcs/ins/cos_naming.rb +426 -426
- data/lib/corba/svcs/ins/ins.rb +526 -526
- data/lib/corba/svcs/ins/naming_service.rb +119 -119
- data/lib/ridlbe/ruby/config.rb +336 -336
- data/lib/ridlbe/ruby/orb.pidlc +0 -0
- data/lib/ridlbe/ruby/require.rb +16 -16
- data/lib/ridlbe/ruby/walker.rb +1582 -1582
- data/mkrf_conf_bingem.rb +151 -101
- data/rakelib/bin.rake +80 -80
- data/rakelib/bin.rb +145 -145
- data/rakelib/build.rake +87 -87
- data/rakelib/config.rake +51 -51
- data/rakelib/config.rb +543 -449
- data/rakelib/ext.rake +242 -242
- data/rakelib/ext.rb +316 -308
- data/rakelib/ext_r2tao.rb +235 -232
- data/rakelib/gem.rake +235 -211
- data/rakelib/gem.rb +145 -145
- data/rakelib/package.rake +26 -26
- data/rakelib/test.rake +23 -23
- data/test/BiDirectional/Test.idl +34 -34
- data/test/BiDirectional/client.rb +131 -131
- data/test/BiDirectional/run_test.rb +68 -68
- data/test/BiDirectional/server.ior +1 -1
- data/test/BiDirectional/server.rb +169 -169
- data/test/CORBA_Services/Naming/BindingIterator/Test.idl +27 -27
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +121 -121
- data/test/CORBA_Services/Naming/BindingIterator/ins.ior +1 -1
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +82 -82
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +109 -109
- data/test/CORBA_Services/Naming/Corbaname/Test.idl +27 -27
- data/test/CORBA_Services/Naming/Corbaname/client.rb +85 -85
- data/test/CORBA_Services/Naming/Corbaname/ins.ior +1 -1
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +88 -88
- data/test/CORBA_Services/Naming/Corbaname/server.rb +135 -135
- data/test/CORBA_Services/Naming/Simple/Test.idl +27 -27
- data/test/CORBA_Services/Naming/Simple/client.rb +84 -84
- data/test/CORBA_Services/Naming/Simple/ins.ior +1 -1
- data/test/CORBA_Services/Naming/Simple/run_test.rb +82 -82
- data/test/CORBA_Services/Naming/Simple/server.rb +109 -109
- data/test/Collocation/Diamond.idl +39 -39
- data/test/Collocation/run_test.rb +52 -52
- data/test/Collocation/test.rb +195 -195
- data/test/Connect_Timeout/Test.idl +27 -27
- data/test/Connect_Timeout/client.rb +111 -111
- data/test/Connect_Timeout/run_test.rb +52 -52
- data/test/DII/Test.idl +27 -27
- data/test/DII/client.rb +115 -115
- data/test/DII/run_test.rb +69 -69
- data/test/DII/server.ior +1 -1
- data/test/DII/server.rb +95 -95
- data/test/DSI/Test.idl +27 -27
- data/test/DSI/client.rb +66 -66
- data/test/DSI/run_test.rb +69 -69
- data/test/DSI/server.ior +1 -1
- data/test/DSI/server.rb +106 -106
- data/test/Exceptions/Test.idl +48 -48
- data/test/Exceptions/client.rb +117 -117
- data/test/Exceptions/run_test.rb +69 -69
- data/test/Exceptions/server.ior +1 -1
- data/test/Exceptions/server.rb +131 -131
- data/test/Hello/Test.idl +27 -27
- data/test/Hello/client.rb +78 -78
- data/test/Hello/run_test.rb +71 -71
- data/test/Hello/server.rb +95 -95
- data/test/IDL_Test/Test.idl +113 -113
- data/test/IDL_Test/Test_inc.idl +17 -17
- data/test/IDL_Test/client.rb +102 -102
- data/test/IDL_Test/run_test.rb +69 -69
- data/test/IDL_Test/server.ior +1 -1
- data/test/IDL_Test/server.rb +99 -99
- data/test/IORMap/Test.idl +27 -27
- data/test/IORMap/client.rb +73 -73
- data/test/IORMap/run_test.rb +69 -69
- data/test/IORMap/server.ior +1 -1
- data/test/IORMap/server.rb +114 -114
- data/test/IORTable/Test.idl +27 -27
- data/test/IORTable/client.rb +75 -75
- data/test/IORTable/run_test.rb +69 -69
- data/test/IORTable/server.ior +1 -1
- data/test/IORTable/server.rb +130 -130
- data/test/Implicit_Conversion/Test.idl +31 -31
- data/test/Implicit_Conversion/client.rb +110 -110
- data/test/Implicit_Conversion/run_test.rb +69 -69
- data/test/Implicit_Conversion/server.ior +1 -1
- data/test/Implicit_Conversion/server.rb +99 -99
- data/test/Multi_Threading/Multiple_ORB/Test.idl +27 -27
- data/test/Multi_Threading/Multiple_ORB/client.rb +82 -82
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +71 -71
- data/test/Multi_Threading/Multiple_ORB/server.rb +108 -108
- data/test/Multi_Threading/Multiple_ORB/server0.ior +1 -1
- data/test/Multi_Threading/Multiple_ORB/server1.ior +1 -1
- data/test/Multi_Threading/Simple/Test.idl +27 -27
- data/test/Multi_Threading/Simple/client.rb +93 -88
- data/test/Multi_Threading/Simple/run_test.rb +69 -69
- data/test/Multi_Threading/Simple/server.ior +1 -1
- data/test/Multi_Threading/Simple/server.rb +117 -117
- data/test/Multi_Threading/Threads/Test.idl +31 -31
- data/test/Multi_Threading/Threads/client.rb +80 -80
- data/test/Multi_Threading/Threads/run_test.rb +76 -76
- data/test/Multi_Threading/Threads/server.ior +1 -1
- data/test/Multi_Threading/Threads/server.rb +119 -119
- data/test/Multi_Threading/Threads/watchdog.ior +1 -1
- data/test/Multi_Threading/Threads/watchdog.rb +87 -87
- data/test/Multiple_Servant_Interfaces/Test.idl +34 -34
- data/test/Multiple_Servant_Interfaces/client.rb +70 -70
- data/test/Multiple_Servant_Interfaces/run_test.rb +69 -69
- data/test/Multiple_Servant_Interfaces/server.ior +1 -1
- data/test/Multiple_Servant_Interfaces/server.rb +102 -102
- data/test/Nil/Test.idl +27 -27
- data/test/Nil/run_test.rb +52 -52
- data/test/Nil/test.rb +78 -78
- data/test/OBV/AbstractInterface/client.rb +179 -179
- data/test/OBV/AbstractInterface/run_test.rb +69 -69
- data/test/OBV/AbstractInterface/server.ior +1 -1
- data/test/OBV/AbstractInterface/server.rb +149 -149
- data/test/OBV/AbstractInterface/test.idl +53 -53
- data/test/OBV/Custom/OBV.idl +18 -18
- data/test/OBV/Custom/OBV_impl.rb +40 -40
- data/test/OBV/Custom/client.rb +86 -86
- data/test/OBV/Custom/run_test.rb +69 -69
- data/test/OBV/Custom/server.ior +1 -1
- data/test/OBV/Custom/server.rb +100 -100
- data/test/OBV/Simple/OBV.idl +15 -15
- data/test/OBV/Simple/OBV_impl.rb +26 -26
- data/test/OBV/Simple/client.rb +86 -86
- data/test/OBV/Simple/run_test.rb +69 -69
- data/test/OBV/Simple/server.ior +1 -1
- data/test/OBV/Simple/server.rb +100 -100
- data/test/OBV/Simple_Event/Event.idl +15 -15
- data/test/OBV/Simple_Event/Event_impl.rb +26 -26
- data/test/OBV/Simple_Event/client.rb +86 -86
- data/test/OBV/Simple_Event/run_test.rb +69 -69
- data/test/OBV/Simple_Event/server.ior +1 -1
- data/test/OBV/Simple_Event/server.rb +100 -100
- data/test/OBV/Supports/client.rb +116 -116
- data/test/OBV/Supports/run_test.rb +69 -69
- data/test/OBV/Supports/server.ior +1 -1
- data/test/OBV/Supports/server.rb +103 -103
- data/test/OBV/Supports/supports.idl +33 -33
- data/test/OBV/Supports/supports_impl.rb +57 -57
- data/test/OBV/Tree/client.rb +116 -116
- data/test/OBV/Tree/run_test.rb +69 -69
- data/test/OBV/Tree/server.ior +1 -1
- data/test/OBV/Tree/server.rb +117 -117
- data/test/OBV/Tree/test.idl +32 -32
- data/test/OBV/Truncatable/Extra.idl +27 -27
- data/test/OBV/Truncatable/Truncatable.idl +105 -105
- data/test/OBV/Truncatable/Truncatable_impl.rb +86 -86
- data/test/OBV/Truncatable/client.rb +279 -279
- data/test/OBV/Truncatable/run_test.rb +69 -69
- data/test/OBV/Truncatable/server.ior +1 -1
- data/test/OBV/Truncatable/server.rb +89 -89
- data/test/OBV/ValueBox/client.rb +497 -497
- data/test/OBV/ValueBox/run_test.rb +69 -69
- data/test/OBV/ValueBox/server.ior +1 -1
- data/test/OBV/ValueBox/server.rb +271 -271
- data/test/OBV/ValueBox/valuebox.idl +101 -101
- data/test/OBV/ValueBox/vb_basic.idl +75 -75
- data/test/OBV/ValueBox/vb_struct.idl +68 -68
- data/test/OBV/ValueBox/vb_union.idl +21 -21
- data/test/Object/Test.idl +27 -27
- data/test/Object/client.rb +112 -103
- data/test/Object/run_test.rb +69 -69
- data/test/Object/server.ior +1 -1
- data/test/Object/server.rb +126 -126
- data/test/POA/Test.idl +27 -27
- data/test/POA/run_test.rb +52 -52
- data/test/POA/test.rb +111 -111
- data/test/Param_Test/Test.idl +182 -182
- data/test/Param_Test/client.rb +277 -277
- data/test/Param_Test/run_test.rb +69 -69
- data/test/Param_Test/server.ior +1 -1
- data/test/Param_Test/server.rb +296 -296
- data/test/Performance/Simple/Test.idl +27 -27
- data/test/Performance/Simple/client.rb +90 -90
- data/test/Performance/Simple/run_test.rb +69 -69
- data/test/Performance/Simple/server.ior +1 -1
- data/test/Performance/Simple/server.rb +95 -95
- data/test/Policies/Test.idl +27 -27
- data/test/Policies/run_test.rb +52 -52
- data/test/Policies/test.rb +144 -144
- data/test/Timeout/client.rb +207 -207
- data/test/Timeout/run_test.rb +69 -69
- data/test/Timeout/server.ior +1 -1
- data/test/Timeout/server.rb +109 -109
- data/test/Timeout/test.idl +19 -19
- data/test/lib/assert.rb +43 -43
- data/test/lib/test.rb +542 -542
- data/test/test_runner.rb +193 -193
- metadata +141 -137
data/rakelib/build.rake
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
#--------------------------------------------------------------------
|
2
|
-
# build.rake - build file
|
3
|
-
#
|
4
|
-
# Author: Martin Corino
|
5
|
-
#
|
6
|
-
# This program is free software; you can redistribute it and/or
|
7
|
-
# modify it under the terms of the R2CORBA LICENSE which is
|
8
|
-
# included with this program.
|
9
|
-
#
|
10
|
-
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
|
-
#--------------------------------------------------------------------
|
13
|
-
|
14
|
-
require File.join(File.dirname(__FILE__), 'config.rb')
|
15
|
-
|
16
|
-
namespace :r2corba do
|
17
|
-
task :build_bin => [R2CORBA::BUILD_CFG]
|
18
|
-
|
19
|
-
#desc 'Compile R2CORBA base IDL files'
|
20
|
-
task :build_idl => [R2CORBA::BUILD_CFG]
|
21
|
-
|
22
|
-
task :build => [R2CORBA::BUILD_CFG] # everything handled in dependecies
|
23
|
-
end
|
24
|
-
|
25
|
-
unless defined?(JRUBY_VERSION)
|
26
|
-
Rake::Task['r2corba:build'].enhance ['r2corba:ext:build']
|
27
|
-
end
|
28
|
-
Rake::Task['r2corba:build'].enhance ['r2corba:bin:build', 'r2corba:build_idl']
|
29
|
-
|
30
|
-
desc 'Build R2CORBA'
|
31
|
-
task :build => 'r2corba:build'
|
32
|
-
|
33
|
-
## compile base IDL
|
34
|
-
|
35
|
-
r2c_idlc_root = File.join('lib','corba','idl')
|
36
|
-
|
37
|
-
orb_pidlc = File.join('lib', 'ridlbe','ruby','orb.pidlc')
|
38
|
-
file orb_pidlc => [R2CORBA::BUILD_CFG] do |t|
|
39
|
-
sh("#{R2CORBA::Config.ridlc} --preprocess --output #{t.name} --stdidl orb.idl")
|
40
|
-
end
|
41
|
-
Rake::Task['r2corba:build_idl'].enhance [orb_pidlc]
|
42
|
-
CLOBBER.include orb_pidlc
|
43
|
-
|
44
|
-
file File.join(r2c_idlc_root,'r2c_orb.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
45
|
-
cmd = R2CORBA::Config.ridlc
|
46
|
-
cmd << " --ignore-pidl --output #{t.name} --namespace=R2CORBA --stdidl" <<
|
47
|
-
" --stubs-only --expand-includes --search-includepath --no-libinit --interface-as-class=TypeCode orb.idl"
|
48
|
-
sh(cmd)
|
49
|
-
end
|
50
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,'r2c_orb.rb')]
|
51
|
-
CLOBBER.include File.join(r2c_idlc_root,'r2c_orb.rb')
|
52
|
-
|
53
|
-
[ ['POA', 'PortableServer.pidl'],
|
54
|
-
['Messaging', 'Messaging.pidl'],
|
55
|
-
['BiDirPolicy', 'BiDirPolicy.pidl'],
|
56
|
-
].each do |stub, pidl|
|
57
|
-
file File.join(r2c_idlc_root,stub+'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
58
|
-
cmd = R2CORBA::Config.ridlc
|
59
|
-
cmd << " --output #{t.name} --namespace=R2CORBA --stdidl --stubs-only --expand-includes --search-includepath --no-libinit #{pidl}"
|
60
|
-
sh(cmd)
|
61
|
-
end
|
62
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,stub+'C.rb')]
|
63
|
-
CLOBBER.include File.join(r2c_idlc_root,stub+'C.rb')
|
64
|
-
end
|
65
|
-
|
66
|
-
unless defined?(JRUBY_VERSION)
|
67
|
-
r2tao_root = File.join('lib','corba','cbase')
|
68
|
-
tao_root = get_config('taoroot')
|
69
|
-
[ 'TAO_Ext', 'IORTable' ].each do |stub|
|
70
|
-
file File.join(r2c_idlc_root,stub+'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
71
|
-
cmd = R2CORBA::Config.ridlc
|
72
|
-
cmd << " --output #{t.name} --namespace=R2CORBA --stdidl --stubs-only --expand-includes -I#{tao_root}" <<
|
73
|
-
" --search-includepath --no-libinit #{File.join(r2c_idlc_root, stub+'.pidl')}"
|
74
|
-
sh(cmd)
|
75
|
-
end
|
76
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,stub+'C.rb')]
|
77
|
-
CLOBBER.include File.join(r2c_idlc_root,stub+'C.rb')
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
file File.join(r2c_idlc_root, 'CosNamingC.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
82
|
-
cmd = R2CORBA::Config.ridlc
|
83
|
-
cmd << " -o #{r2c_idlc_root} --stdidl --expand-includes --search-includepath CosNaming.idl"
|
84
|
-
sh(cmd)
|
85
|
-
end
|
86
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,'CosNamingC.rb')]
|
87
|
-
CLOBBER.include File.join(r2c_idlc_root,'CosNamingC.rb')
|
1
|
+
#--------------------------------------------------------------------
|
2
|
+
# build.rake - build file
|
3
|
+
#
|
4
|
+
# Author: Martin Corino
|
5
|
+
#
|
6
|
+
# This program is free software; you can redistribute it and/or
|
7
|
+
# modify it under the terms of the R2CORBA LICENSE which is
|
8
|
+
# included with this program.
|
9
|
+
#
|
10
|
+
# Copyright (c) Remedy IT Expertise BV
|
11
|
+
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
|
+
#--------------------------------------------------------------------
|
13
|
+
|
14
|
+
require File.join(File.dirname(__FILE__), 'config.rb')
|
15
|
+
|
16
|
+
namespace :r2corba do
|
17
|
+
task :build_bin => [R2CORBA::BUILD_CFG]
|
18
|
+
|
19
|
+
#desc 'Compile R2CORBA base IDL files'
|
20
|
+
task :build_idl => [R2CORBA::BUILD_CFG]
|
21
|
+
|
22
|
+
task :build => [R2CORBA::BUILD_CFG] # everything handled in dependecies
|
23
|
+
end
|
24
|
+
|
25
|
+
unless defined?(JRUBY_VERSION)
|
26
|
+
Rake::Task['r2corba:build'].enhance ['r2corba:ext:build']
|
27
|
+
end
|
28
|
+
Rake::Task['r2corba:build'].enhance ['r2corba:bin:build', 'r2corba:build_idl']
|
29
|
+
|
30
|
+
desc 'Build R2CORBA'
|
31
|
+
task :build => 'r2corba:build'
|
32
|
+
|
33
|
+
## compile base IDL
|
34
|
+
|
35
|
+
r2c_idlc_root = File.join('lib','corba','idl')
|
36
|
+
|
37
|
+
orb_pidlc = File.join('lib', 'ridlbe','ruby','orb.pidlc')
|
38
|
+
file orb_pidlc => [R2CORBA::BUILD_CFG] do |t|
|
39
|
+
sh("#{R2CORBA::Config.ridlc} --preprocess --output #{t.name} --stdidl orb.idl")
|
40
|
+
end
|
41
|
+
Rake::Task['r2corba:build_idl'].enhance [orb_pidlc]
|
42
|
+
CLOBBER.include orb_pidlc
|
43
|
+
|
44
|
+
file File.join(r2c_idlc_root,'r2c_orb.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
45
|
+
cmd = R2CORBA::Config.ridlc
|
46
|
+
cmd << " --ignore-pidl --output #{t.name} --namespace=R2CORBA --stdidl" <<
|
47
|
+
" --stubs-only --expand-includes --search-includepath --no-libinit --interface-as-class=TypeCode orb.idl"
|
48
|
+
sh(cmd)
|
49
|
+
end
|
50
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,'r2c_orb.rb')]
|
51
|
+
CLOBBER.include File.join(r2c_idlc_root,'r2c_orb.rb')
|
52
|
+
|
53
|
+
[ ['POA', 'PortableServer.pidl'],
|
54
|
+
['Messaging', 'Messaging.pidl'],
|
55
|
+
['BiDirPolicy', 'BiDirPolicy.pidl'],
|
56
|
+
].each do |stub, pidl|
|
57
|
+
file File.join(r2c_idlc_root,stub+'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
58
|
+
cmd = R2CORBA::Config.ridlc
|
59
|
+
cmd << " --output #{t.name} --namespace=R2CORBA --stdidl --stubs-only --expand-includes --search-includepath --no-libinit #{pidl}"
|
60
|
+
sh(cmd)
|
61
|
+
end
|
62
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,stub+'C.rb')]
|
63
|
+
CLOBBER.include File.join(r2c_idlc_root,stub+'C.rb')
|
64
|
+
end
|
65
|
+
|
66
|
+
unless defined?(JRUBY_VERSION)
|
67
|
+
r2tao_root = File.join('lib','corba','cbase')
|
68
|
+
tao_root = get_config('taoroot')
|
69
|
+
[ 'TAO_Ext', 'IORTable' ].each do |stub|
|
70
|
+
file File.join(r2c_idlc_root,stub+'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
71
|
+
cmd = R2CORBA::Config.ridlc
|
72
|
+
cmd << " --output #{t.name} --namespace=R2CORBA --stdidl --stubs-only --expand-includes -I#{tao_root}" <<
|
73
|
+
" --search-includepath --no-libinit #{File.join(r2c_idlc_root, stub+'.pidl')}"
|
74
|
+
sh(cmd)
|
75
|
+
end
|
76
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,stub+'C.rb')]
|
77
|
+
CLOBBER.include File.join(r2c_idlc_root,stub+'C.rb')
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
file File.join(r2c_idlc_root, 'CosNamingC.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
82
|
+
cmd = R2CORBA::Config.ridlc
|
83
|
+
cmd << " -o #{r2c_idlc_root} --stdidl --expand-includes --search-includepath CosNaming.idl"
|
84
|
+
sh(cmd)
|
85
|
+
end
|
86
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,'CosNamingC.rb')]
|
87
|
+
CLOBBER.include File.join(r2c_idlc_root,'CosNamingC.rb')
|
data/rakelib/config.rake
CHANGED
@@ -1,52 +1,52 @@
|
|
1
|
-
#--------------------------------------------------------------------
|
2
|
-
# config.rake - build file
|
3
|
-
#
|
4
|
-
# Author: Martin Corino
|
5
|
-
#
|
6
|
-
# This program is free software; you can redistribute it and/or
|
7
|
-
# modify it under the terms of the R2CORBA LICENSE which is
|
8
|
-
# included with this program.
|
9
|
-
#
|
10
|
-
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
|
-
#--------------------------------------------------------------------
|
13
|
-
|
14
|
-
require File.join(File.dirname(__FILE__), 'config.rb')
|
15
|
-
|
16
|
-
namespace :r2corba do
|
17
|
-
task :configure do
|
18
|
-
R2CORBA::Config.define
|
19
|
-
R2CORBA::Config.check
|
20
|
-
R2CORBA::Config.save
|
21
|
-
# find out if more tasks were specified to run after configure
|
22
|
-
while ARGV.shift.to_s =~ /^(r2corba:)?configure$/ do; end
|
23
|
-
# if so start a new rake process to run these
|
24
|
-
unless ARGV.empty?
|
25
|
-
# restarting ensures correct loading of config and the tasks that depend on that
|
26
|
-
exec('rake', *ARGV)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
namespace :config do
|
31
|
-
task :show do
|
32
|
-
R2CORBA::CFGKEYS.each do |ck|
|
33
|
-
puts "%20s => %s" % [ck, get_config(ck)]
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
desc 'Configure R2CORBA build settings (calling with "-- --help" provides usage information).'
|
40
|
-
task :configure => 'r2corba:configure'
|
41
|
-
|
42
|
-
desc 'Show current R2CORBA build settings'
|
43
|
-
task :show => 'r2corba:config:show'
|
44
|
-
|
45
|
-
file R2CORBA::BUILD_CFG do
|
46
|
-
unless File.file?(R2CORBA::BUILD_CFG)
|
47
|
-
STDERR.puts "Build configuration missing! First run 'rake r2corba::configure'."
|
48
|
-
exit(1)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
1
|
+
#--------------------------------------------------------------------
|
2
|
+
# config.rake - build file
|
3
|
+
#
|
4
|
+
# Author: Martin Corino
|
5
|
+
#
|
6
|
+
# This program is free software; you can redistribute it and/or
|
7
|
+
# modify it under the terms of the R2CORBA LICENSE which is
|
8
|
+
# included with this program.
|
9
|
+
#
|
10
|
+
# Copyright (c) Remedy IT Expertise BV
|
11
|
+
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
|
+
#--------------------------------------------------------------------
|
13
|
+
|
14
|
+
require File.join(File.dirname(__FILE__), 'config.rb')
|
15
|
+
|
16
|
+
namespace :r2corba do
|
17
|
+
task :configure do
|
18
|
+
R2CORBA::Config.define
|
19
|
+
R2CORBA::Config.check
|
20
|
+
R2CORBA::Config.save
|
21
|
+
# find out if more tasks were specified to run after configure
|
22
|
+
while ARGV.shift.to_s =~ /^(r2corba:)?configure$/ do; end
|
23
|
+
# if so start a new rake process to run these
|
24
|
+
unless ARGV.empty?
|
25
|
+
# restarting ensures correct loading of config and the tasks that depend on that
|
26
|
+
exec('rake', *ARGV)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
namespace :config do
|
31
|
+
task :show do
|
32
|
+
R2CORBA::CFGKEYS.each do |ck|
|
33
|
+
puts "%20s => %s" % [ck, get_config(ck)]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
desc 'Configure R2CORBA build settings (calling with "-- --help" provides usage information).'
|
40
|
+
task :configure => 'r2corba:configure'
|
41
|
+
|
42
|
+
desc 'Show current R2CORBA build settings'
|
43
|
+
task :show => 'r2corba:config:show'
|
44
|
+
|
45
|
+
file R2CORBA::BUILD_CFG do
|
46
|
+
unless File.file?(R2CORBA::BUILD_CFG)
|
47
|
+
STDERR.puts "Build configuration missing! First run 'rake r2corba::configure'."
|
48
|
+
exit(1)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
52
|
CLOBBER.include R2CORBA::BUILD_CFG
|
data/rakelib/config.rb
CHANGED
@@ -1,450 +1,544 @@
|
|
1
|
-
#--------------------------------------------------------------------
|
2
|
-
# config.rb - build file
|
3
|
-
#
|
4
|
-
# Author: Martin Corino
|
5
|
-
#
|
6
|
-
# This program is free software; you can redistribute it and/or
|
7
|
-
# modify it under the terms of the R2CORBA LICENSE which is
|
8
|
-
# included with this program.
|
9
|
-
#
|
10
|
-
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
|
-
#--------------------------------------------------------------------
|
13
|
-
|
14
|
-
require 'rbconfig'
|
15
|
-
require 'yaml'
|
16
|
-
require 'optparse'
|
17
|
-
|
18
|
-
require 'rake/clean'
|
19
|
-
|
20
|
-
require File.join(File.dirname(__FILE__), '../lib/corba/common/version')
|
21
|
-
|
22
|
-
=begin
|
23
|
-
|
24
|
-
Generic keys defaulted to RB_CONFIG value
|
25
|
-
================================================
|
26
|
-
bindir
|
27
|
-
libdir
|
28
|
-
datadir
|
29
|
-
mandir
|
30
|
-
sysconfdir
|
31
|
-
localstatedir
|
32
|
-
|
33
|
-
custom keys
|
34
|
-
===========
|
35
|
-
Generic
|
36
|
-
|
37
|
-
key default
|
38
|
-
--- ------
|
39
|
-
prefix nil
|
40
|
-
libruby File.join(RB_CONFIG['libdir'], 'ruby'),
|
41
|
-
librubyver RB_CONFIG['rubylibdir'],
|
42
|
-
librubyverarch RB_CONFIG['archdir'],
|
43
|
-
siteruby RB_CONFIG['sitedir'],
|
44
|
-
siterubyver RB_CONFIG['sitelibdir'],
|
45
|
-
siterubyverarch RB_CONFIG['sitearchdir'],
|
46
|
-
rbdir RB_CONFIG['siterubyver']
|
47
|
-
sodir RB_CONFIG['siterubyverarch']
|
48
|
-
|
49
|
-
MRI
|
50
|
-
|
51
|
-
key default
|
52
|
-
--- ------
|
53
|
-
makeprog 'make'
|
54
|
-
without-tao 'no'
|
55
|
-
aceroot nil
|
56
|
-
taoroot nil
|
57
|
-
mpcroot nil
|
58
|
-
aceinstdir $ACE_ROOT/lib || get_config[:sodir]
|
59
|
-
with-ipv6 'no'
|
60
|
-
with-ssl 'no'
|
61
|
-
sslroot '/usr'
|
62
|
-
with-debug 'no'
|
63
|
-
|
64
|
-
Java
|
65
|
-
|
66
|
-
key default
|
67
|
-
--- ------
|
68
|
-
without-jacorb false
|
69
|
-
jacorb_home ENV['JACORB_HOME']
|
70
|
-
=end
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
def self.
|
198
|
-
@@
|
199
|
-
end
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
end
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
1
|
+
#--------------------------------------------------------------------
|
2
|
+
# config.rb - build file
|
3
|
+
#
|
4
|
+
# Author: Martin Corino
|
5
|
+
#
|
6
|
+
# This program is free software; you can redistribute it and/or
|
7
|
+
# modify it under the terms of the R2CORBA LICENSE which is
|
8
|
+
# included with this program.
|
9
|
+
#
|
10
|
+
# Copyright (c) Remedy IT Expertise BV
|
11
|
+
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
|
+
#--------------------------------------------------------------------
|
13
|
+
|
14
|
+
require 'rbconfig'
|
15
|
+
require 'yaml'
|
16
|
+
require 'optparse'
|
17
|
+
|
18
|
+
require 'rake/clean'
|
19
|
+
|
20
|
+
require File.join(File.dirname(__FILE__), '../lib/corba/common/version')
|
21
|
+
|
22
|
+
=begin
|
23
|
+
|
24
|
+
Generic keys defaulted to RB_CONFIG value
|
25
|
+
================================================
|
26
|
+
bindir
|
27
|
+
libdir
|
28
|
+
datadir
|
29
|
+
mandir
|
30
|
+
sysconfdir
|
31
|
+
localstatedir
|
32
|
+
|
33
|
+
custom keys
|
34
|
+
===========
|
35
|
+
Generic
|
36
|
+
|
37
|
+
key default
|
38
|
+
--- ------
|
39
|
+
prefix nil
|
40
|
+
libruby File.join(RB_CONFIG['libdir'], 'ruby'),
|
41
|
+
librubyver RB_CONFIG['rubylibdir'],
|
42
|
+
librubyverarch RB_CONFIG['archdir'],
|
43
|
+
siteruby RB_CONFIG['sitedir'],
|
44
|
+
siterubyver RB_CONFIG['sitelibdir'],
|
45
|
+
siterubyverarch RB_CONFIG['sitearchdir'],
|
46
|
+
rbdir RB_CONFIG['siterubyver']
|
47
|
+
sodir RB_CONFIG['siterubyverarch']
|
48
|
+
|
49
|
+
MRI
|
50
|
+
|
51
|
+
key default
|
52
|
+
--- ------
|
53
|
+
makeprog 'make'
|
54
|
+
without-tao 'no'
|
55
|
+
aceroot nil
|
56
|
+
taoroot nil
|
57
|
+
mpcroot nil
|
58
|
+
aceinstdir $ACE_ROOT/lib || get_config[:sodir]
|
59
|
+
with-ipv6 'no'
|
60
|
+
with-ssl 'no'
|
61
|
+
sslroot '/usr'
|
62
|
+
with-debug 'no'
|
63
|
+
|
64
|
+
Java
|
65
|
+
|
66
|
+
key default
|
67
|
+
--- ------
|
68
|
+
without-jacorb false
|
69
|
+
jacorb_home ENV['JACORB_HOME']
|
70
|
+
=end
|
71
|
+
|
72
|
+
if (Rake::Version::MAJOR.to_i == 10 &&
|
73
|
+
((Rake::Version::MINOR.to_i == 4 && Rake::Version::BUILD.to_i >= 2) ||
|
74
|
+
Rake::Version::MINOR.to_i > 4)) || Rake::Version::MAJOR.to_i > 10
|
75
|
+
|
76
|
+
# patch Rake::Application with method to cleanup ARGV consuming
|
77
|
+
# all Rake options
|
78
|
+
class Rake::Application
|
79
|
+
|
80
|
+
def cleanup_args(argv = ARGV) # :nodoc:
|
81
|
+
return argv if options.r2corba_cleanup_done
|
82
|
+
|
83
|
+
_opt_backup = options
|
84
|
+
@options = OpenStruct.new
|
85
|
+
options.rakelib = ['rakelib']
|
86
|
+
options.trace_output = $stderr
|
87
|
+
|
88
|
+
begin
|
89
|
+
return OptionParser.new do |opts|
|
90
|
+
opts.banner = ""
|
91
|
+
opts.separator ""
|
92
|
+
|
93
|
+
standard_rake_options.each { |args| opts.on(*args) }
|
94
|
+
opts.environment('RAKEOPT')
|
95
|
+
end.parse!(argv)
|
96
|
+
ensure
|
97
|
+
@options = _opt_backup
|
98
|
+
@options.r2corba_cleanup_done = true
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
else
|
104
|
+
|
105
|
+
class Rake::Application
|
106
|
+
|
107
|
+
## noop for other Rake versions
|
108
|
+
def cleanup_args(argv = ARGV) # :nodoc:
|
109
|
+
argv
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
module R2CORBA
|
116
|
+
|
117
|
+
if defined? ::RbConfig
|
118
|
+
RB_CONFIG = ::RbConfig::CONFIG
|
119
|
+
else
|
120
|
+
RB_CONFIG = ::Config::CONFIG
|
121
|
+
end unless defined? RB_CONFIG
|
122
|
+
|
123
|
+
CFGKEYS = %w{prefix
|
124
|
+
bindir
|
125
|
+
libdir
|
126
|
+
datadir
|
127
|
+
mandir
|
128
|
+
sysconfdir
|
129
|
+
localstatedir
|
130
|
+
libruby
|
131
|
+
librubyver
|
132
|
+
librubyverarch
|
133
|
+
siteruby
|
134
|
+
siterubyver
|
135
|
+
siterubyverarch
|
136
|
+
rbdir
|
137
|
+
sodir}
|
138
|
+
|
139
|
+
RBDEFAULTS = %w{bindir
|
140
|
+
libdir
|
141
|
+
datadir
|
142
|
+
mandir
|
143
|
+
sysconfdir
|
144
|
+
localstatedir}
|
145
|
+
|
146
|
+
CONFIG = {
|
147
|
+
:libruby => File.join(RB_CONFIG['libdir'], 'ruby'),
|
148
|
+
:librubyver => RB_CONFIG['rubylibdir'],
|
149
|
+
:librubyverarch => RB_CONFIG['archdir'],
|
150
|
+
:siteruby => RB_CONFIG['sitedir'],
|
151
|
+
:siterubyver => RB_CONFIG['sitelibdir'],
|
152
|
+
:siterubyverarch => RB_CONFIG['sitearchdir'],
|
153
|
+
:rbdir => :siterubyver,
|
154
|
+
:sodir => :siterubyverarch,
|
155
|
+
}
|
156
|
+
|
157
|
+
if defined?(JRUBY_VERSION)
|
158
|
+
CFGKEYS.concat(%w{without-jacorb jacorb_home})
|
159
|
+
CONFIG.merge!({
|
160
|
+
:'without-jacorb' => false,
|
161
|
+
:jacorb_home => ENV['JACORB_HOME'] || ''
|
162
|
+
})
|
163
|
+
BUILD_CFG = '.jrconfig'
|
164
|
+
else
|
165
|
+
CFGKEYS.concat(%w{makeprog without-tao aceroot taoroot mpcroot aceinstdir with-ipv6 with-ssl sslroot with-debug})
|
166
|
+
CONFIG.merge!({
|
167
|
+
:makeprog => 'make',
|
168
|
+
:'without-tao' => false,
|
169
|
+
:aceroot => ENV['ACE_ROOT'] || '',
|
170
|
+
:taoroot => ENV['TAO_ROOT'] || '',
|
171
|
+
:mpcroot => ENV['MPC_ROOT'] || '',
|
172
|
+
:aceinstdir => '',
|
173
|
+
:'with-ipv6' => false,
|
174
|
+
:'with-ssl' => false,
|
175
|
+
:sslroot => ENV['SSL_ROOT'] || (RUBY_PLATFORM =~ /mingw32/ ? '' : '/usr'),
|
176
|
+
:'with-debug' => false,
|
177
|
+
})
|
178
|
+
BUILD_CFG = '.rconfig'
|
179
|
+
end
|
180
|
+
|
181
|
+
module AccessMethods
|
182
|
+
def get_config(key)
|
183
|
+
v = R2CORBA::CONFIG.has_key?(key.to_sym) ? R2CORBA::CONFIG[key.to_sym] : (RBDEFAULTS.include?(key.to_s) ? RB_CONFIG[key.to_s] : nil)
|
184
|
+
v = R2CORBA::CONFIG[v] while Symbol === v && R2CORBA::CONFIG.has_key?(v)
|
185
|
+
v
|
186
|
+
end
|
187
|
+
|
188
|
+
def set_config(key, val)
|
189
|
+
R2CORBA::CONFIG[key.to_sym] = val
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
module Config
|
194
|
+
|
195
|
+
@@ruby_ver = RUBY_VERSION.split('.').collect {|n| n.to_i}
|
196
|
+
|
197
|
+
def self.rb_ver_major
|
198
|
+
@@ruby_ver[0]
|
199
|
+
end
|
200
|
+
|
201
|
+
def self.rb_ver_minor
|
202
|
+
@@ruby_ver[1]
|
203
|
+
end
|
204
|
+
|
205
|
+
def self.rb_ver_release
|
206
|
+
@@ruby_ver[2]
|
207
|
+
end
|
208
|
+
|
209
|
+
@@is_win32 = RUBY_PLATFORM =~ /mingw32/ ? true : false
|
210
|
+
@@is_win64 = (@@is_win32 && (RUBY_PLATFORM =~ /x64/)) ? true : false
|
211
|
+
@@is_linux = RB_CONFIG['target_os'] =~ /linux/ ? true : false
|
212
|
+
@@is_osx = RUBY_PLATFORM =~ /darwin/ ? true : false
|
213
|
+
|
214
|
+
if @@is_linux
|
215
|
+
# determin distro
|
216
|
+
io_args = [$/, {:encoding => 'utf-8'}] if rb_ver_major > 1 || (rb_ver_minor > 8 && rb_ver_major == 1)
|
217
|
+
name = 'linux'
|
218
|
+
if File.readable?('/etc/os-release')
|
219
|
+
# find 'NAME=...'
|
220
|
+
File.foreach('/etc/os-release', *io_args) do |ln|
|
221
|
+
if /^NAME=(.*)$/ =~ ln.strip
|
222
|
+
name = $1.downcase
|
223
|
+
break
|
224
|
+
end
|
225
|
+
end
|
226
|
+
elsif File.readable?('/etc/lsb-release')
|
227
|
+
# find 'DISTRIB_ID='
|
228
|
+
File.foreach('/etc/lsb-release', *io_args) do |ln|
|
229
|
+
if /^DISTRIB_ID=(.*)$/ =~ ln.strip
|
230
|
+
name = $1.downcase
|
231
|
+
break
|
232
|
+
end
|
233
|
+
end
|
234
|
+
elsif File.readable?('/etc/redhat-release')
|
235
|
+
name = File.read('/etc/redhat-release').strip.downcase
|
236
|
+
elsif File.exists?('/etc/SuSE-release')
|
237
|
+
name = 'suse'
|
238
|
+
elsif File.exists?('/etc/debian_version')
|
239
|
+
name = 'debian'
|
240
|
+
end
|
241
|
+
@@linux_distro = case name
|
242
|
+
when /suse/
|
243
|
+
:suse
|
244
|
+
when /fedora/
|
245
|
+
:fedora
|
246
|
+
when /ubuntu/
|
247
|
+
:ubuntu
|
248
|
+
when /red\s*hat/
|
249
|
+
:redhat
|
250
|
+
when /centos/
|
251
|
+
:centos
|
252
|
+
when /debian/
|
253
|
+
:debian
|
254
|
+
else
|
255
|
+
:linux
|
256
|
+
end
|
257
|
+
else
|
258
|
+
@@linux_distro = :none
|
259
|
+
end
|
260
|
+
|
261
|
+
def self.is_win32
|
262
|
+
@@is_win32
|
263
|
+
end
|
264
|
+
def self.is_win64
|
265
|
+
@@is_win64
|
266
|
+
end
|
267
|
+
def self.is_linux
|
268
|
+
@@is_linux
|
269
|
+
end
|
270
|
+
def self.linux_distro
|
271
|
+
@@linux_distro
|
272
|
+
end
|
273
|
+
def self.is_osx
|
274
|
+
@@is_osx
|
275
|
+
end
|
276
|
+
|
277
|
+
@@cpu_cores = (@@is_linux ? `cat /proc/cpuinfo | grep processor | wc -l`.to_i : 1)
|
278
|
+
|
279
|
+
def self.cpu_cores
|
280
|
+
@@cpu_cores
|
281
|
+
end
|
282
|
+
|
283
|
+
@@ridl_local = nil
|
284
|
+
@@ridlc = nil
|
285
|
+
|
286
|
+
def self.ridl_is_local?
|
287
|
+
@@ridl_local
|
288
|
+
end
|
289
|
+
|
290
|
+
def self.ridlc
|
291
|
+
@@ridlc.dup
|
292
|
+
end
|
293
|
+
|
294
|
+
@@rpath_patch = nil
|
295
|
+
|
296
|
+
def self.rpath_patch
|
297
|
+
@@rpath_patch
|
298
|
+
end
|
299
|
+
|
300
|
+
def self.init
|
301
|
+
if defined?(JRUBY_VERSION)
|
302
|
+
# check/set environment settings for JacORB
|
303
|
+
ENV['JACORB_HOME'] ||= get_config('jacorb_home')
|
304
|
+
else
|
305
|
+
|
306
|
+
if Dir[File.join('ext', 'libACE.*')].empty? # Don't check for ACE/TAO installation when executed for binary gem install
|
307
|
+
|
308
|
+
# check/set environment settings for ACE+TAO
|
309
|
+
ENV['ACE_ROOT'] = get_config('aceroot')
|
310
|
+
ENV['TAO_ROOT'] = get_config('taoroot')
|
311
|
+
ENV['MPC_ROOT'] = get_config('mpcroot')
|
312
|
+
|
313
|
+
if is_win32
|
314
|
+
ENV['PATH'] = "#{File.join(ENV['ACE_ROOT'],'lib')}#{';'}#{ENV['PATH']}"
|
315
|
+
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl')
|
316
|
+
elsif RUBY_PLATFORM =~ /darwin/
|
317
|
+
ENV['DYLD_LIBRARY_PATH'] = "#{File.join(ENV['ACE_ROOT'],'lib')}#{File::PATH_SEPARATOR}#{ENV['DYLD_LIBRARY_PATH'] || ""}"
|
318
|
+
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl') && get_config('sslroot')!='/usr'
|
319
|
+
else
|
320
|
+
ENV['LD_LIBRARY_PATH'] = "#{File.join(ENV['ACE_ROOT'],'lib')}#{File::PATH_SEPARATOR}#{ENV['LD_LIBRARY_PATH'] || ""}"
|
321
|
+
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl') && get_config('sslroot')!='/usr'
|
322
|
+
end
|
323
|
+
|
324
|
+
else
|
325
|
+
|
326
|
+
unless is_win32
|
327
|
+
# check for required tools to patch RPATH setting of shared libs
|
328
|
+
if is_osx
|
329
|
+
if system('which install_name_tool > /dev/null 2>&1')
|
330
|
+
@@rpath_patch = 'install_name_tool'
|
331
|
+
else
|
332
|
+
raise 'Installation of binary gem requires an installed version of the install_name_tool utility.'
|
333
|
+
end
|
334
|
+
else
|
335
|
+
if system('which patchelf > /dev/null 2>&1')
|
336
|
+
@@rpath_patch = 'patchelf --set-rpath'
|
337
|
+
elsif system('which chrpath > /dev/null 2>&1')
|
338
|
+
@@rpath_patch = 'chrpath --replace'
|
339
|
+
else
|
340
|
+
raise 'Installation of binary gem requires an installed version of either the patchelf OR chrpath utility.'
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
346
|
+
|
347
|
+
end
|
348
|
+
|
349
|
+
@@ridlc = File.join('bin', 'ridlc')
|
350
|
+
|
351
|
+
# check availability of RIDL; either as gem or in subdir
|
352
|
+
if (@@ridl_local = File.exists?(File.join('ridl', 'lib', 'ridl', 'ridl.rb')))
|
353
|
+
incdirs = [
|
354
|
+
File.expand_path(File.join('ridl', 'lib')),
|
355
|
+
File.expand_path('lib'),
|
356
|
+
ENV['RUBYLIB']
|
357
|
+
].compact
|
358
|
+
ENV['RUBYLIB'] = incdirs.join(File::PATH_SEPARATOR)
|
359
|
+
else # RIDL probably installed as gem
|
360
|
+
incdirs = [
|
361
|
+
File.expand_path('lib'),
|
362
|
+
ENV['RUBYLIB']
|
363
|
+
].compact
|
364
|
+
ENV['RUBYLIB'] = incdirs.join(File::PATH_SEPARATOR)
|
365
|
+
end
|
366
|
+
|
367
|
+
end
|
368
|
+
|
369
|
+
def self.define
|
370
|
+
_argv = Rake.application.cleanup_args(ARGV)
|
371
|
+
OptionParser.new do |opts|
|
372
|
+
opts.banner = "Usage: rake [rake options] -- configure [options]"
|
373
|
+
|
374
|
+
opts.separator ""
|
375
|
+
|
376
|
+
opts.on('--prefix=path',
|
377
|
+
"path prefix of target environment [#{get_config(:prefix)}]") {|v| set_config(:prefix, File.expand_path(v))}
|
378
|
+
opts.on('--bindir=path',
|
379
|
+
"the directory for commands [#{RB_CONFIG['bindir']}]") {|v| CONFIG[:bindir] = v}
|
380
|
+
opts.on('--libdir=path',
|
381
|
+
"the directory for libraries [#{RB_CONFIG['libdir']}]") {|v| CONFIG[:libdir] = v}
|
382
|
+
opts.on('--datadir=path',
|
383
|
+
"the directory for shared data [#{RB_CONFIG['datadir']}]") {|v| CONFIG[:datadir] = v}
|
384
|
+
opts.on('--mandir=path',
|
385
|
+
"the directory for man pages [#{RB_CONFIG['mandir']}]") {|v| CONFIG[:mandir] = v}
|
386
|
+
opts.on('--sysconfdir=path',
|
387
|
+
"the directory for system configuration files [#{RB_CONFIG['sysconfdir']}]") {|v| CONFIG[:sysconfdir] = v}
|
388
|
+
opts.on('--localstatedir=path',
|
389
|
+
"the directory for local state data [#{RB_CONFIG['localstatedir']}]") {|v| CONFIG[:localstatedir] = v}
|
390
|
+
opts.on('--libruby=path',
|
391
|
+
"the directory for ruby libraries [#{get_config('libruby')}]") {|v| CONFIG[:libruby] = v}
|
392
|
+
opts.on('--librubyver=path',
|
393
|
+
"the directory for standard ruby libraries [#{get_config('librubyver')}]") {|v| CONFIG[:librubyver] = v}
|
394
|
+
opts.on('--librubyverarch=path',
|
395
|
+
"the directory for standard ruby extensions [#{get_config('librubyverarch')}]") {|v| CONFIG[:librubyverarch] = v}
|
396
|
+
opts.on('--siteruby=path',
|
397
|
+
"the directory for version-independent aux ruby libraries [#{get_config('siteruby')}]") {|v| CONFIG[:siteruby] = v}
|
398
|
+
opts.on('--siterubyver=path',
|
399
|
+
"the directory for aux ruby libraries [#{get_config('siterubyver')}]") {|v| CONFIG[:siterubyver] = v}
|
400
|
+
opts.on('--siterubyverarch=path',
|
401
|
+
"the directory for aux ruby binaries [#{get_config('siterubyverarch')}]") {|v| CONFIG[:siterubyverarch] = v}
|
402
|
+
opts.on('--rbdir=path',
|
403
|
+
"the directory for ruby scripts [#{get_config(:rbdir)}]") {|v| CONFIG[:rbdir] = v}
|
404
|
+
opts.on('--sodir=path',
|
405
|
+
"the directory for ruby extentions [#{get_config(:sodir)}]") {|v| CONFIG[:sodir] = v}
|
406
|
+
if defined?(JRUBY_VERSION)
|
407
|
+
opts.on('--without-jacorb',
|
408
|
+
"do *not* install JacORB JAR files with R2CORBA [#{get_config('without-jacorb')}]") {|v| CONFIG[:'without-jacorb'] = true}
|
409
|
+
opts.on('--jacorb-home=path',
|
410
|
+
"the path to the root directory of JacORB [#{get_config(:jacorb_home)}]") {|v| CONFIG[:jacorb_home] = v}
|
411
|
+
else
|
412
|
+
opts.on('--makeprog=name',
|
413
|
+
"the make program to compile ruby extentions [#{get_config(:makeprog)}]") {|v| CONFIG[:makeprog] = v}
|
414
|
+
opts.on('--without-tao',
|
415
|
+
"do *not* configure/build/clean the ACE+TAO libraries [#{get_config('without-tao')}]") {|v| CONFIG[:'without-tao'] = true }
|
416
|
+
opts.on('--aceroot=path',
|
417
|
+
"the path to the root directory of ACE [#{get_config(:aceroot)}]") {|v| CONFIG[:aceroot] = v}
|
418
|
+
opts.on('--taoroot=path',
|
419
|
+
"the path to the root directory of TAO [#{get_config(:taoroot)}]") {|v| CONFIG[:taoroot] = v}
|
420
|
+
opts.on('--mpcroot=path',
|
421
|
+
"the path to the root directory of MPC [#{get_config(:mpcroot)}]") {|v| CONFIG[:mpcroot] = v}
|
422
|
+
opts.on('--aceinstdir=path',
|
423
|
+
"the directory where the ACE+TAO dlls are installed (automatically determined if not specified) [#{get_config(:aceinstdir)}]") {|v| CONFIG[:aceinstdir] = v}
|
424
|
+
opts.on('--with-ipv6',
|
425
|
+
"build ACE+TAO libraries with IPv6 support enabled [#{get_config('with-ipv6')}]") {|v| CONFIG[:'with-ipv6'] = true}
|
426
|
+
opts.on('--with-ssl',
|
427
|
+
"build ACE+TAO libraries with SSL support enabled (autodetected with prebuilt ACE/TAO) [#{get_config('with-ssl')}]") {|v| CONFIG[:'with-ssl'] = true}
|
428
|
+
opts.on('--sslroot=path',
|
429
|
+
"the root path where SSL includes and libraries can be found [#{get_config(:sslroot)}]") {|v| CONFIG[:sslroot] = v}
|
430
|
+
opts.on('--with-debug',
|
431
|
+
"build with debugger support [#{get_config('with-debug')}]") {|v| CONFIG[:'with-debug'] = true}
|
432
|
+
end
|
433
|
+
|
434
|
+
opts.separator ""
|
435
|
+
|
436
|
+
opts.on('--help', 'Show this help message') { puts opts; puts; exit }
|
437
|
+
end.parse!(_argv)
|
438
|
+
end
|
439
|
+
|
440
|
+
def self.check
|
441
|
+
if defined?(JRUBY_VERSION)
|
442
|
+
# check availability of JacORB
|
443
|
+
if get_config('jacorb_home')=='' && File.directory?('jacorb')
|
444
|
+
set_config('jacorb_home', File.expand_path('jacorb'))
|
445
|
+
end
|
446
|
+
raise "Cannot find JacORB. Missing JACORB_HOME configuration!" if get_config('jacorb_home').empty?
|
447
|
+
else
|
448
|
+
if Dir[File.join('ext', 'libACE.*')].empty? # Don't check for ACE/TAO installation when executed for binary gem install
|
449
|
+
|
450
|
+
if get_config('without-tao') && !(File.directory?(File.join('ACE','ACE_wrappers')) || File.directory?(File.join('ACE','ACE')))
|
451
|
+
|
452
|
+
# check if a user defined ACE/TAO location is specified or we're using a system standard install
|
453
|
+
if get_config('aceroot').empty?
|
454
|
+
# assume system standard install; will be checked below
|
455
|
+
set_config('aceroot', '/usr/include')
|
456
|
+
set_config('taoroot', '/usr/include')
|
457
|
+
set_config('mpcroot', '/usr/share/mpc')
|
458
|
+
set_config('aceinstdir', get_config('libdir')) if get_config('aceinstdir').empty?
|
459
|
+
else
|
460
|
+
set_config('aceinstdir', File.join(get_config('aceroot'), 'lib')) if get_config('aceinstdir').empty?
|
461
|
+
end
|
462
|
+
|
463
|
+
else
|
464
|
+
# check availability of ACE/TAO
|
465
|
+
if get_config('aceroot').empty? && (File.directory?(File.join('ACE','ACE_wrappers')) || File.directory?(File.join('ACE','ACE')))
|
466
|
+
set_config('aceroot', File.directory?(File.join('ACE','ACE_wrappers')) ? File.expand_path(File.join('ACE','ACE_wrappers')) : File.expand_path(File.join('ACE','ACE')))
|
467
|
+
end
|
468
|
+
if get_config('taoroot').empty? && (File.directory?(File.join(get_config('aceroot'),'TAO')) || File.directory?(File.join('ACE','TAO')))
|
469
|
+
set_config('taoroot', File.directory?(File.join(get_config('aceroot'),'TAO')) ? File.expand_path(File.join(get_config('aceroot'),'TAO')) : File.expand_path(File.join('ACE','TAO')))
|
470
|
+
end
|
471
|
+
if get_config('mpcroot').empty? && (File.directory?(File.join(get_config('aceroot'),'MPC')) || File.directory?(File.join('ACE','MPC')))
|
472
|
+
set_config('mpcroot', File.directory?(File.join(get_config('aceroot'),'MPC')) ? File.expand_path(File.join(get_config('aceroot'),'MPC')) : File.expand_path(File.join('ACE','MPC')))
|
473
|
+
end
|
474
|
+
|
475
|
+
set_config('aceinstdir', get_config('sodir')) if get_config('aceinstdir').empty?
|
476
|
+
end
|
477
|
+
|
478
|
+
raise 'Cannot find ACE+TAO. Missing ACE_ROOT configuration!' if get_config('aceroot').empty? || !File.directory?(File.join(get_config('aceroot'), 'ace'))
|
479
|
+
raise 'Cannot find ACE+TAO. Missing TAO_ROOT configuration!' if get_config('taoroot').empty? || !File.directory?(File.join(get_config('taoroot'), 'tao'))
|
480
|
+
raise 'Cannot find MPC. Missing MPC_ROOT configuration!' if get_config('mpcroot').empty? || !File.file?(File.join(get_config('mpcroot'), 'mpc.pl'))
|
481
|
+
|
482
|
+
unless get_config('without-tao') || get_config('with-ssl')
|
483
|
+
set_config('with-ssl', Dir.glob(File.join(get_config('aceroot'), 'lib', '*ACE_SLL.*')).empty?() ? false : true)
|
484
|
+
end
|
485
|
+
|
486
|
+
if is_osx
|
487
|
+
if system('which install_name_tool > /dev/null 2>&1')
|
488
|
+
@@rpath_patch = 'install_name_tool'
|
489
|
+
else
|
490
|
+
raise 'Building R2CORBA requires an installed version of the install_name_tool utility.'
|
491
|
+
end
|
492
|
+
end
|
493
|
+
|
494
|
+
else
|
495
|
+
|
496
|
+
unless is_win32
|
497
|
+
# check for required tools to patch RPATH setting of shared libs
|
498
|
+
if is_osx
|
499
|
+
if system('which install_name_tool > /dev/null 2>&1')
|
500
|
+
@@rpath_patch = 'install_name_tool'
|
501
|
+
else
|
502
|
+
raise 'Installation of binary gem requires an installed version of the install_name_tool utility.'
|
503
|
+
end
|
504
|
+
else
|
505
|
+
if system('which patchelf > /dev/null 2>&1')
|
506
|
+
@@rpath_patch = 'patchelf --set-rpath'
|
507
|
+
elsif system('which chrpath > /dev/null 2>&1')
|
508
|
+
@@rpath_patch = 'chrpath --replace'
|
509
|
+
else
|
510
|
+
raise 'Installation of binary gem requires an installed version of either the patchelf OR chrpath utility.'
|
511
|
+
end
|
512
|
+
end
|
513
|
+
end
|
514
|
+
|
515
|
+
end
|
516
|
+
end
|
517
|
+
|
518
|
+
# check availability of RIDL; either as gem or in subdir
|
519
|
+
unless File.exists?(File.join('ridl', 'lib', 'ridl', 'ridl.rb')) || (`gem search -i -q ridl`.strip) == 'true'
|
520
|
+
raise "Missing RIDL installation. R2CORBA requires RIDL installed either as gem or in subdirectory ridl."
|
521
|
+
end
|
522
|
+
end
|
523
|
+
|
524
|
+
def self.save
|
525
|
+
File.open(BUILD_CFG, 'w') do |f|
|
526
|
+
f << YAML.dump(CONFIG)
|
527
|
+
end
|
528
|
+
end
|
529
|
+
|
530
|
+
def self.load
|
531
|
+
if File.file?(BUILD_CFG)
|
532
|
+
File.open(BUILD_CFG, 'r') do |f|
|
533
|
+
CONFIG.merge!(YAML.load(f.read))
|
534
|
+
end
|
535
|
+
init
|
536
|
+
end
|
537
|
+
end
|
538
|
+
end
|
539
|
+
end
|
540
|
+
|
541
|
+
include R2CORBA::AccessMethods
|
542
|
+
|
543
|
+
# load current config (if any)
|
450
544
|
R2CORBA::Config.load
|