~rdoering/ubuntu/lucid/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/stdlib/src/erl_compile.erl

  • Committer: Elliot Murphy
  • Date: 2009-12-22 02:56:21 UTC
  • mfrom: (3.3.5 sid)
  • Revision ID: elliot@elliotmurphy.com-20091222025621-qv3rja8gbpiabkbe
* Merge with Debian testing; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - 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.
* Fixed dialyzer(1) manpage which was placed into section 3 and conflicted
  with dialyzer(3erl).
* New upstream release (it adds a new binary package erlang-erl-docgen).
* Refreshed patches, removed most of emacs.patch which is applied upstream.
* Linked run_test binary from erlang-common-test package to /usr/bin.
* Fixed VCS headers in debian/control.
* Moved from prebuilt manpages to generated from sources. This adds
  erlang-manpages binary package and xsltproc build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
compiler(".core") ->   {compile,         compile_core};
32
32
compiler(".mib") ->    {snmpc,           compile};
33
33
compiler(".bin") ->    {snmpc,           mib_to_hrl};
 
34
compiler(".xrl") ->    {leex,            compile};
34
35
compiler(".yrl") ->    {yecc,            compile};
35
36
compiler(".script") -> {systools,        script2boot};
36
37
compiler(".rel") ->    {systools,        compile_rel};
43
44
 
44
45
%% Entry from command line.
45
46
 
 
47
-type cmd_line_arg() :: atom() | string().
 
48
 
 
49
-spec compile_cmdline([cmd_line_arg()]) -> no_return().
 
50
 
46
51
compile_cmdline(List) ->
47
52
    case compile(List) of
48
53
        ok -> my_halt(0);
76
81
            error
77
82
    end.
78
83
 
79
 
-spec compiler_runner([_]) -> no_return().
 
84
-spec compiler_runner([cmd_line_arg()]) -> no_return().
80
85
 
81
86
compiler_runner(List) ->
82
87
    %% We don't want the current directory in the code path.
83
88
    %% Remove it.
84
89
    Path = [D || D <- code:get_path(), D =/= "."],
85
 
    code:set_path(Path),
 
90
    true = code:set_path(Path),
86
91
    exit({compiler_result, compile1(List)}).
87
92
 
88
93
%% Parses the first part of the option list.