-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can now properly compile + load hex apps
- Loading branch information
Showing
2 changed files
with
107 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Core: Miscellaneous. | ||
# | ||
# The miscellaneous tests use the prefix "core-", not "core-misc-". | ||
|
||
CORE_ELIXIR_TARGETS = $(call list_targets,core-elixir) | ||
|
||
.PHONY: core-elixir $(CORE_ELIXIR_TARGETS) | ||
|
||
core-elixir: $(CORE_ELIXIR_TARGETS) | ||
|
||
core-test-project: init | ||
|
||
$i "Bootstrap a new OTP library named $(APP)" | ||
$t mkdir $(APP)/ | ||
$t cp ../erlang.mk $(APP)/ | ||
$t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v | ||
|
||
$i "Configure Makefile" | ||
$i echo "ERLC_OPTS += +debug_info +'{parse_transform,lager_transform}'" >> $(APP)/Makefile | ||
$i echo "DEPS += lager" >> $(APP)/Makefile | ||
$i echo "DEPS += jason" >> $(APP)/Makefile | ||
$i echo "DEPS += phoenix" >> $(APP)/Makefile | ||
$i echo "dep_jason = git https://github.com/michalmuskala/jason.git master" >> $(APP)/Makefile | ||
$i echo "dep_phoenix = hex 1.7.2" >> $(APP)/Makefile | ||
|
||
$i "Make deps" | ||
$t $(MAKE) -C $(APP) deps $v | ||
|
||
$i "Check deps have compiled" | ||
$t test -d $(APP)/deps/lager/ebin | ||
$t test -d $(APP)/deps/jason/ebin | ||
$t test -d $(APP)/deps/phoenix/ebin | ||
|
||
$i "Make the app" | ||
$t $(MAKE) -C $(APP) app $v | ||
|
||
$i "Get started apps" | ||
$t $(ERL) -pa $(APP)/ebin/ $(APP)/apps/*/ebin/ -eval " \ | ||
{ok, Apps} = application:ensure_all_started(exte), | ||
true = lists:member(lager, Apps), | ||
true = lists:member(jason, Apps), | ||
true = lists:member(phoenix, Apps), | ||
halt()" |