diff options
Diffstat (limited to 'src/rebar_port_compiler.erl')
-rw-r--r-- | src/rebar_port_compiler.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl index 906bcb0..7af45eb 100644 --- a/src/rebar_port_compiler.erl +++ b/src/rebar_port_compiler.erl @@ -495,9 +495,10 @@ expand_command(TmplName, Env, InFiles, OutFile) -> %% %% Given a string, determine if it is expandable -%% +%% A string is defined as expandable if it contains itself +%% (eg. CFLAGS = -m64 $CFLAGS) is_expandable(InStr) -> - case re:run(InStr,"\\\$",[{capture,none}]) of + case re:run(InStr,"\\\$"++InStr,[{capture,none}]) of match -> true; nomatch -> false end. @@ -626,6 +627,11 @@ default_env() -> {"darwin9.*-64$", "CXXFLAGS", "-m64 $CXXFLAGS"}, {"darwin9.*-64$", "LDFLAGS", "-arch x86_64 $LDFLAGS"}, + %% OS X Lion onwards flags for 64-bit + {"darwin1[0-4].*-64$", "CFLAGS", "-m64 $CFLAGS"}, + {"darwin1[0-4].*-64$", "CXXFLAGS", "-m64 $CXXFLAGS"}, + {"darwin1[0-4].*-64$", "LDFLAGS", "-arch x86_64 $LDFLAGS"}, + %% OS X Snow Leopard, Lion, and Mountain Lion flags for 32-bit {"darwin1[0-2].*-32", "CFLAGS", "-m32 $CFLAGS"}, {"darwin1[0-2].*-32", "CXXFLAGS", "-m32 $CXXFLAGS"}, |