mirror of
https://github.com/correl/rebar.git
synced 2024-12-24 03:00:16 +00:00
Remove port_first_files support
This commit is contained in:
parent
2be2f2bfe7
commit
4d2d3c3af3
2 changed files with 3 additions and 25 deletions
|
@ -41,9 +41,6 @@
|
|||
%% expression pass. Default is `"c_src/*.c"'
|
||||
{port_sources, ["c_src/*.c", {"R14", ["c_src/*.c"]}]}.
|
||||
|
||||
%% Port files to compile before the rest.
|
||||
{port_first_files, ["c_src/first.c", "c_src/second.c"]}.
|
||||
|
||||
%% Port compilation environment variables. See rebar_port_compiler.erl for
|
||||
%% more info. Default is `[]'
|
||||
{port_envs, []}.
|
||||
|
|
|
@ -88,37 +88,18 @@
|
|||
%%
|
||||
|
||||
compile(Config, AppFile) ->
|
||||
%% Allow the user to specify that dependent files get built first
|
||||
FirstFiles = expand_sources(rebar_config:get(Config,
|
||||
port_first_files, []), []),
|
||||
|
||||
%% Compose list of sources from config file -- defaults to c_src/*.c
|
||||
Sources = expand_sources(rebar_config:get_list(Config, port_sources,
|
||||
["c_src/*.c"]), []),
|
||||
Env = setup_env(Config),
|
||||
|
||||
{FirstNewBins, FirstExistingBins} = case FirstFiles of
|
||||
[] ->
|
||||
{[], []};
|
||||
_ ->
|
||||
compile_each(FirstFiles, Config,
|
||||
Env, [], [])
|
||||
end,
|
||||
case Sources of
|
||||
[] ->
|
||||
ok;
|
||||
_ ->
|
||||
|
||||
%% Remove first files from found files
|
||||
RestFiles = [Source || Source <- Sources,
|
||||
not lists:member(Source, FirstFiles)],
|
||||
Env = setup_env(Config),
|
||||
|
||||
%% Compile each of the sources
|
||||
{NewBins, ExistingBins} = compile_each(RestFiles, Config, Env,
|
||||
[], []),
|
||||
|
||||
NewBins = FirstNewBins ++ NewBins,
|
||||
ExistingBins = FirstExistingBins ++ ExistingBins,
|
||||
{NewBins, ExistingBins} = compile_each(Sources, Config, Env,
|
||||
[], []),
|
||||
|
||||
%% Construct the driver name and make sure priv/ exists
|
||||
SoSpecs = so_specs(Config, AppFile, NewBins ++ ExistingBins),
|
||||
|
|
Loading…
Reference in a new issue