File: rebar.config.script

package info (click to toggle)
erlang-bitcask 2.0.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,612 kB
  • sloc: erlang: 7,929; ansic: 2,954; makefile: 229; exp: 86; sh: 14
file content (48 lines) | stat: -rw-r--r-- 1,757 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
PulseBuild = case os:getenv("BITCASK_PULSE") of
                 false ->
                     false;
                 _ ->
                     true
             end,
case PulseBuild of
    true ->
        PulseOpts =
            [{pulse_no_side_effect,[{erlang,display,1}]},
             {pulse_side_effect,
              [ {bitcask_nifs, '_', '_'}

              , {bitcask_file, '_', '_'}
              , {bitcask_time, tstamp, 0}

              , {prim_file, '_', '_'}
              , {file, '_', '_'}
              , {filelib, '_', '_'}
              , {os, '_', '_'} ]},

             {pulse_replace_module,
              [ {gen_server, pulse_gen_server}
              , {application, pulse_application}
              , {supervisor, pulse_supervisor} ]}
            ],
        PulseCFlags = [{"CFLAGS", "$CFLAGS -DPULSE"}],
        UpdConfig = case lists:keysearch(eunit_compile_opts, 1, CONFIG) of
                        {value, {eunit_compile_opts, Opts}} ->
                            lists:keyreplace(eunit_compile_opts,
                                             1,
                                             CONFIG,
                                             {eunit_compile_opts, Opts ++ PulseOpts});
                        _ ->
                            [{eunit_compile_opts, PulseOpts} | CONFIG]
                    end,
        case lists:keysearch(port_env, 1, UpdConfig) of
            {value, {port_env, PortEnv}} ->
                lists:keyreplace(port_env,
                                 1,
                                 UpdConfig,
                                 {port_env, PortEnv ++ PulseCFlags});
            _ ->
                [{port_env, PulseCFlags} | UpdConfig]
        end;
    false ->
        CONFIG
end.