<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><br>Here is my test:<br><br><span style="color: rgb(0, 255, 0);">makefile:</span><br>PROJECT = test<br>include erlang.mk<br><br><span style="color: rgb(0, 255, 0);">erlang.mk</span><br>include deps/horse/erlang.mk<br><br>.PHONY: all start clean<br><br>INCLUDE = "include"<br><br>EBIN = "ebin"<br><br>HORSE = "deps/horse/ebin"<br><br>DEPS_DIR = "deps"<br><br>MODULE = "test02.erl"<br><br>all: <br> erlc -o ${EBIN} -I ${INCLUDE} \<br> src/*.erl<br><br>start:<br> erl -pa ${EBIN} ${HORSE} \<br> -eval 'horse:app_perf(horse), init:stop().'<br><br>deps/horse:<br> git clone -n -- https://github.com/extend/horse $(DEPS_DIR)/horse<br> cd $(DEPS_DIR)/horse; git checkout -q master<br> $(MAKE) -C $(DEPS_DIR)/horse<br><br>perfs: ERLC_OPTS += -DPERF=1 +'{parse_transform, horse_autoexport}'<br>%perfs: clean deps deps/horse app<br>perfs: deps deps/horse app<br> $(gen_verbose) erl -noshell -pa ebin deps/horse/ebin \<br> -eval 'horse:app_perf($(PROJECT)), init:stop().'<br><br><br>#clean:<br># rm -rf ebin/*.beam<br><br><span style="color: rgb(0, 255, 0);">and my test:</span><br>-module(test01).<br>-compile({parse_transform, horse_autoexport}).<br>-export([test_fun/0,<br> horse_do_nothing/0,<br> horse_rfc2019/0<br> ]).<br><br>-include("test.hrl").<br><br>test_fun() -><br> io:format("this is Test01/test01~n"), ok.<br><br><br>horse_do_nothing() -><br> io:format("test01 running horse test~n"),<br> ok.<br><br>horse_rfc2019() -><br> horse:repeat(100000, test_fun()).<br><br><br><br><div></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2015-04-09 17:33:29, "Loïc Hoguin" <<a href="mailto:essen@ninenines.eu">essen@ninenines.eu</a>> wrote:
>Show me the Makefile.
>
>On 04/09/2015 12:28 PM, Fisher wrote:
>> Thanks for your answer!
>> and i already added an include to my makefile like this:
>> include deps/horse/erlang.mk !!!
>> and the error still here -.-
>>
>>
>>
>>
>>
>>
>> At 2015-04-09 17:24:02, "Loïc Hoguin" <<a href="mailto:essen@ninenines.eu">essen@ninenines.eu</a>> wrote:
>>>Hey,
>>>
>>>These instructions apply only if you use erlang.mk. For rebar I think
>>>you will need to add the project as a dependency and then the option to
>>>use the parse_transform, though I am not sure on the details.
>>>
>>>Cheers,
>>>
>>>On 04/09/2015 10:28 AM, Fisher wrote:
>>>> Hi, all!
>>>> I am trying horse:https://github.com/extend/horse
>>>> I got it in this folder: MyProject -> deps -> horse
>>>> I added this in my makefile like the website says:
>>>>
>>>> deps/horse:
>>>> git clone -n -- https://github.com/extend/horse$(DEPS_DIR)/horse
>>>> cd $(DEPS_DIR)/horse ; git checkout -q master
>>>> $(MAKE) -C $(DEPS_DIR)/horse
>>>>
>>>> perfs: ERLC_OPTS += -DPERF=1 +'{parse_transform, horse_autoexport}'
>>>> perfs: clean deps deps/horse app
>>>> $(gen_verbose) erl -noshell -pa ebin deps/horse/ebin \
>>>> -eval 'horse:app_perf($(PROJECT)), init:stop().'
>>>>
>>>> then i compile: make perfs
>>>> and i got this error:
>>>>
>>>> src/test01.erl: undefined parse transform 'horse_autoexport'
>>>>
>>>> i tried add {erl_opts, [{parse_transform, horse_autoexport}]} to my app file
>>>> or i add -compile([{parse_transform, horse_autoexport}]) to test01.erl
>>>> module
>>>> but the error continue.
>>>>
>>>> anyone can help? thanks!
>>>>
>>>> _______________________________________________
>>>> erlang-questions mailing list
>>>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
>>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> erlang-questions mailing list
>>>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
>>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>>
>>>
>>>--
>>>Loïc Hoguin
>>>http://ninenines.eu
>>
>
>--
>Loïc Hoguin
>http://ninenines.eu
</pre></div></div>