Skip to content

Commit

Permalink
Rename erlson_parse_transform.erl to erlson_pt.erl
Browse files Browse the repository at this point in the history
  • Loading branch information
alavrik committed Jul 9, 2011
1 parent 5599172 commit 3a888a1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/erlson.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-ifndef(__ERLSON_HRL__).
-define(__ERLSON_HRL__,1).

-compile({parse_transform, erlson_parse_transform}).
-compile({parse_transform, erlson_pt}).

-endif.
18 changes: 10 additions & 8 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ERL_SOURCES = erl_parse.erl erlson_parse_transform.erl erlson.erl erlson_tests.erl
ERL_SOURCES = erl_parse.erl erlson_pt.erl erlson.erl
ERL_TESTS = erlson_tests.erl
TEST = erlson_tests

ERL = erl
Expand All @@ -7,34 +8,35 @@ EBIN_DIR = $(PWD)
ERLC_FLAGS = -pa $(EBIN_DIR)

ERL_OBJECTS = $(ERL_SOURCES:%.erl=$(EBIN_DIR)/%.beam)
ERL_TEST_OBJECTS = $(ERL_TESTS:%.erl=$(EBIN_DIR)/%.beam)

.PHONY: all test


all: $(ERL_SOURCES) $(ERL_OBJECTS) expand test
all: $(ERL_SOURCES) $(ERL_OBJECTS) expand test


erlson_tests.erl: erlson_parse_transform.erl erlson.erl
erlson_tests.erl: $(ERL_SOURCES)
#cp ../test/$@ $@
touch -r $< $@
touch $@


$(ERL_OBJECTS): %.beam: %.erl
$(ERL_OBJECTS) $(ERL_TEST_OBJECTS): %.beam: %.erl
$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $<


%.erl: %.yrl
$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $<


test: $(ERL_OBJECTS)
test: $(ERL_TESTS) $(ERL_OBJECTS) $(ERL_TEST_OBJECTS)
$(ERL) -pa . -I . -noshell -s eunit test $(TEST) -s erlang halt #init stop


expand: $(ERL_OBJECTS) erlson_tests.P
expand: erlson_tests.erl erlson_tests.P

%.P: %.erl
$(ERL) -pa . -I . -noshell -eval "compile:file($<,'P')" -s erlang halt #init stop
$(ERL) -pa . -I . -noshell -eval "compile:file(\"$<\",'P')" -s erlang halt #init stop


clean:
Expand Down
2 changes: 1 addition & 1 deletion src/erlson_parse_transform.erl → src/erlson_pt.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%% OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
%% WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-module(erlson_parse_transform).
-module(erlson_pt).

-export([parse_transform/2]).

Expand Down

0 comments on commit 3a888a1

Please sign in to comment.