Permalink
Browse files

Add rebar.config as alternative to autoconf + makefiles

This gets the C compilation flags right on Mac OS without me having to
understand why they were wrong in the first place.
  • Loading branch information...
legoscia committed Sep 4, 2012
1 parent 864cf8f commit 481fc3c4da5c5dac6600bb4157963639f1647e0c
Showing with 23 additions and 0 deletions.
  1. +23 −0 rebar.config
View
@@ -0,0 +1,23 @@
+%% -*- erlang -*-
+
+%% This magically sets the right compilation flags for your platform
+%% (as long as Rebar supports it):
+{port_specs,
+ [{"priv/gsuffixtree", ["c_src/gsuffixtree/main.c", "c_src/gsuffixtree/gsuffix_tree.c"]},
+ {"priv/suffixtree", ["c_src/suffixtree/main.c", "c_src/suffixtree/suffix_tree.c"]}]}.
+
+%% These modules are needed for the parse transform:
+{erl_first_files,
+ ["src/wrangler_parse.erl",
+ "src/wrangler_expand_rule.erl",
+ "src/wrangler_scan.erl",
+ "src/wrangler_epp_dodger.erl",
+ "src/wrangler_syntax.erl",
+ "src/wrangler_syntax_lib.erl",
+ "src/wrangler_misc.erl",
+ "src/api_ast_traverse.erl",
+ "src/api_refac.erl"]}.
+
+%% This corresponds to "make elisp":
+{post_hooks,
+ [{compile, "cp elisp/wrangler.el.src elisp/wrangler.el && escript ebin/dynamic_menu_items >>wrangler.el"}]}.

1 comment on commit 481fc3c

@sntran

This comment has been minimized.

Show comment
Hide comment
@sntran

sntran Sep 24, 2012

Thank you for this!

sntran commented on 481fc3c Sep 24, 2012

Thank you for this!

Please sign in to comment.