Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix rebar.config and clean up Makefile

This fixes a major issue when erl_xslt is required as dependency in
another project via rebar.

Before this fix, `rebar compile` was broken because of missing compile
flags. The build only succeeded when invoked with `make`.
  • Loading branch information...
commit d95c5ca2ff76817afcaf1a38533ba1256b8e8538 1 parent f037239
@KlausTrainer authored
Showing with 3 additions and 6 deletions.
  1. +1 −4 Makefile
  2. +2 −2 rebar.config
View
5 Makefile
@@ -1,8 +1,5 @@
-CFLAGS = "-O3 -fPIC -shared -Wall $(shell pkg-config --cflags libxslt)"
-LDFLAGS = "$(shell pkg-config --libs libxslt)"
-
all:
- @CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) rebar compile
+ @rebar compile
check: all
@rebar eunit 2> /dev/null
View
4 rebar.config
@@ -1,7 +1,7 @@
{port_specs, [{"priv/erl_xslt.so", ["c_src/*.c"]}]}.
{port_env, [
- {".*", "CFLAGS", "$CFLAGS"},
- {".*", "LDFLAGS", "$LDFLAGS"}
+ {".*", "CFLAGS", "$CFLAGS -O3 `pkg-config --cflags libxslt`"},
+ {".*", "LDFLAGS", "$LDFLAGS `pkg-config --libs libxslt`"}
]}.
Please sign in to comment.
Something went wrong with that request. Please try again.