Fix some warnings from mix

This commit is contained in:
Carlos Martín Nieto
2016-11-14 17:09:35 +01:00
parent 1d30af24c4
commit 9e9aa23af7
2 changed files with 13 additions and 7 deletions

12
mix.exs
View File

@@ -54,11 +54,13 @@ defmodule Mix.Tasks.Compile.Nif do
exts = Keyword.get(config, :exts, [:c])
compiler = Keyword.get(config, :compilers, ["cc", "gcc", "clang"]) |> find_compiler
if cflags = System.get_env("CFLAGS") do
# FIXME: this isn't going to work too well with quoted spaces
# inside arguments
flags = [flags, String.split(cflags)]
end
flags =
case cflags = System.get_env("CFLAGS") do
# FIXME: this isn't going to work too well with quoted spaces
# inside arguments
true -> [flags, String.split(cflags)]
_ -> flags
end
# Create the directory (e.g. "priv/")
File.mkdir_p!(Path.dirname(file))