~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/test_server/src/ts_erl_config.erl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
 
%% 
4
 
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
5
 
%% 
 
3
%%
 
4
%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
 
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
11
 
%% 
 
11
%%
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
16
 
%% 
 
16
%%
17
17
%% %CopyrightEnd%
18
18
%%
19
19
 
70
70
    ShlibRules = ts_lib:subst(ShlibRules0, Vars),
71
71
    [{'SHLIB_RULES', ShlibRules}|Vars].
72
72
 
73
 
erts_lib_name(multi_threaded, win32) ->
 
73
erts_lib_name(multi_threaded, {win32, V}) ->
74
74
    link_library("erts_MD" ++ case is_debug_build() of
75
75
                                  true -> "d";
76
76
                                  false -> ""
77
77
                              end,
78
 
                 win32);
79
 
erts_lib_name(single_threaded, win32) ->
 
78
                 {win32, V});
 
79
erts_lib_name(single_threaded, {win32, V}) ->
80
80
    link_library("erts_ML" ++ case is_debug_build() of
81
81
                                  true -> "d";
82
82
                                  false -> ""
83
83
                              end,
84
 
                 win32);
 
84
                 {win32, V});
85
85
erts_lib_name(multi_threaded, OsType) ->
86
86
    link_library("erts_r", OsType);
87
87
erts_lib_name(single_threaded, OsType) ->
107
107
                   ErtsIncludeInternal,
108
108
                   ErtsLib,
109
109
                   ErtsLibInternal};
110
 
              {Type, Root, Target} when Type == clearcase; Type == srctree ->
 
110
              {srctree, Root, Target} ->
111
111
                  Erts = filename:join([Root, "erts"]),
112
112
                  ErtsInclude = filename:join([Erts, "include"]),
113
113
                  ErtsIncludeTarget = filename:join([ErtsInclude, Target]),
146
146
        case erl_root(Vars) of
147
147
            {installed, Root} ->
148
148
                filename:join([Root, "usr", "include"]);
149
 
            {Type, Root, Target} when Type == clearcase; Type == srctree ->
 
149
            {srctree, Root, Target} ->
150
150
                filename:join([Root, "erts", "emulator", "beam"])
151
151
                    ++ " -I" ++ filename:join([Root, "erts", "emulator"])
152
152
                    ++ system_include(Root, Vars)
161
161
        case ts_lib:var(os, Vars) of
162
162
            "Windows" ++ _T -> "sys/win32";
163
163
            "VxWorks" -> "sys.vxworks";
164
 
            "OSE" -> "sys/ose";
165
164
            _ -> "sys/unix"
166
165
        end,
167
166
    " -I" ++ filename:nativename(filename:join([Root, "erts", "emulator", SysDir])).
180
179
                     {srctree, _Root, _Target} when OsType =:= vxworks ->
181
180
                         {filename:join(Dir, "lib"),
182
181
                          filename:join([Dir, "src"])};
183
 
                     {Type, _Root, Target} when Type == clearcase; Type == srctree ->
 
182
                     {srctree, _Root, Target} ->
184
183
                         {filename:join([Dir, "obj", Target]),
185
184
                          filename:join([Dir, "src", Target])}
186
185
                 end}
219
218
                    {unix,_} ->
220
219
                        "-lpthread";
221
220
                    _ -> 
222
 
                        "" % VxWorks or OSE
 
221
                        "" % VxWorks
223
222
                end,
224
223
    CrossCompile = case OsType of
225
224
                       vxworks -> "true";
247
246
                 case erl_root(Vars) of
248
247
                     {installed, _Root} ->
249
248
                         filename:join([Dir, "priv", "lib"]);
250
 
                     {Type, _Root, Target} when Type == clearcase; Type == srctree ->
 
249
                     {srctree, _Root, Target} ->
251
250
                         filename:join([Dir, "priv", "lib", Target])
252
251
                 end,
253
252
                 filename:join(Dir, "include")}
267
266
        end,
268
267
    [{jinterface_classpath, filename:nativename(ClassPath)}|Vars].
269
268
 
270
 
%% Unused!
271
 
% ig_vars(Vars) ->
272
 
%     {Lib0, Incl} = 
273
 
%       case erl_root(Vars) of
274
 
%           {installed, Root} ->
275
 
%               Base = filename:join([Root, "usr"]),
276
 
%               {filename:join([Base, "lib"]), 
277
 
%                filename:join([Base, "include"])};
278
 
%           {Type, Root, Target} when Type == clearcase; Type == srctree ->
279
 
%               {filename:join([Root, "lib", "ig", "obj", Target]),
280
 
%                filename:join([Root, "lib", "ig", "include"])}
281
 
%       end,
282
 
%     [{ig_libdir, filename:nativename(Lib0)},
283
 
%      {ig_include, filename:nativename(Incl)}|Vars].
284
 
 
285
269
lib_dir(Vars, Lib) ->
286
270
    LibLibDir = case Lib of
287
271
                    erts ->
318
302
erl_root(Vars) ->
319
303
    Root = code:root_dir(),
320
304
    case ts_lib:erlang_type() of
321
 
        {clearcase, _Version} ->
322
 
            Target = get_var(target, Vars),
323
 
            {clearcase, Root, Target};
324
305
        {srctree, _Version} ->
325
306
            Target = get_var(target, Vars),
326
307
            {srctree, Root, Target};
350
331
sock_libraries(vxworks) ->
351
332
    "";
352
333
sock_libraries(ose) ->
353
 
    "";
354
 
sock_libraries(_Other) ->
355
 
    exit({sock_libraries, not_supported}).
356
 
 
 
334
    "".
357
335
 
358
336
link_library(LibName,{win32, _}) ->
359
337
    LibName ++ ".lib";