 
         maybe_clean(app, options)
 
-        compiled? = cond do
-          not is_nil(opts[:compile]) ->
-            do_compile dep, config
-          mix?(dep) ->
-            do_mix dep, config
-          make?(dep) ->
-            do_make dep, config
-          dep.manager == :rebar ->
-            do_rebar dep, config
-          dep.manager == :rebar3 ->
-            do_rebar3 dep, config
-          true ->
-            shell.error "Could not compile #{inspect app}, no \"mix.exs\", \"rebar.config\" or \"Makefile\" " <>
-              "(pass :compile as an option to customize compilation, set it to \"false\" to do nothing)"
-            false
-        end
+        compiled? =
+          cond do
+            not is_nil(opts[:compile]) ->
+              do_compile(dep, config)
+
+            mix?(dep) ->
+              do_mix(dep, config)
+
+            make?(dep) ->
+              do_make(dep, config)
+
+            dep.manager == :rebar ->
+              do_rebar(dep, config)
+
+            dep.manager == :rebar3 ->
+              do_rebar3(dep, config)
+
+            true ->
+              shell.error(
+                "Could not compile #{inspect(app)}, no \"mix.exs\", \"rebar.config\" or \"Makefile\" " <>
+                  "(pass :compile as an option to customize compilation, set it to \"false\" to do nothing)"
+              )
+
+              false
+          end
 
         unless mix?(dep), do: build_structure(dep, config)
         # We should touch fetchable dependencies even if they

    makefile_win? = makefile_win?(dep)

    command =
      case :os.type do
        {:win32, _} when makefile_win? ->
          "nmake /F Makefile.win"
        {:unix, type} when type in [:freebsd, :openbsd] ->
          "gmake"
        _ ->
          "make"
      end

  `b` is included in the compilation step, pass `--include-children`.
  """

  import Mix.Dep, only: [loaded: 1, available?: 1, loaded_by_name: 2, make?: 1, mix?: 1]

  @switches [include_children: :boolean, force: :boolean]

  @spec run(OptionParser.argv()) :: :ok
  def run(args) do
    unless "--no-archives-check" in args do
      Mix.Task.run("archive.check", args)
    end

    Mix.Project.get!()

    case OptionParser.parse(args, switches: @switches) do
      {opts, [], _} ->
        # Because this command may be invoked explicitly with
        # deps.compile, we simply try to compile any available
        # dependency.
        compile(Enum.filter(loaded(env: Mix.env()), &available?/1), opts)

      {opts, tail, _} ->
        compile(loaded_by_name(tail, [env: Mix.env()] ++ opts), opts)
    end
  end

  @doc false
  def compile(deps, options \\ []) do
    shell = Mix.shell()
    config = Mix.Project.deps_config()

    Mix.Task.run("deps.precompile")

    compiled =
      Enum.map(deps, fn %Mix.Dep{app: app, status: status, opts: opts, scm: scm} = dep ->
