diff options
author | Oleksiy Kebkal <[email protected]> | 2017-01-05 11:52:46 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-04-25 15:54:03 +0200 |
commit | 094ece5472c07b50c38d7d6f369fbf6f97968a89 (patch) | |
tree | 280b45493108b5ff53689051036807d2589786c4 /test/core_makedep.mk | |
parent | f638c36f5c6ca817bf9cc69d54ef785d2867e5d5 (diff) | |
download | erlang.mk-094ece5472c07b50c38d7d6f369fbf6f97968a89.tar.gz erlang.mk-094ece5472c07b50c38d7d6f369fbf6f97968a89.tar.bz2 erlang.mk-094ece5472c07b50c38d7d6f369fbf6f97968a89.zip |
core/erlc.mk: added src subfolders support in makedep.erl
Diffstat (limited to 'test/core_makedep.mk')
-rw-r--r-- | test/core_makedep.mk | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/core_makedep.mk b/test/core_makedep.mk new file mode 100644 index 0000000..9e5e053 --- /dev/null +++ b/test/core_makedep.mk @@ -0,0 +1,43 @@ +# Core: COMPILE_FIRST dependencies generation. + +CORE_MAKEDEP_CASES = behaviour import +CORE_MAKEDEP_TARGETS = $(addprefix core-makedep-,$(CORE_MAKEDEP_CASES)) + +.PHONY: core-makedep $(CORE_MAKEDEP_TARGETS) + +core-makedep: $(CORE_MAKEDEP_TARGETS) + +core-makedep-behaviour: build clean + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + $t mkdir $(APP)/src/core + $i "Generate related .erl files" + $t printf "%s\n" "-module(human)." "-callback live() -> 'ok'." > $(APP)/src/core/human.erl + $t printf "%s\n" "-module(boy)." "-behaviour(human)." "-export([live/0])." "live() -> ok." > $(APP)/src/boy.erl + $t $(MAKE) -C $(APP) $v + $i "Check that all compiled files exist" + $t test -f $(APP)/$(APP).d + $t test -f $(APP)/ebin/$(APP).app + $t test -f $(APP)/ebin/boy.beam + $t test -f $(APP)/ebin/human.beam + +core-makedep-import: build clean + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + $t mkdir $(APP)/src/core + $i "Generate related .erl files" + $t printf "%s\n" "-module(human)." "-export([live/0])." "live() -> ok." > $(APP)/src/core/human.erl + $t printf "%s\n" "-module(boy)." "-import(human,[live/0])." > $(APP)/src/boy.erl + $t $(MAKE) -C $(APP) $v + $i "Check that all compiled files exist" + $t test -f $(APP)/$(APP).d + $t test -f $(APP)/ebin/$(APP).app + $t test -f $(APP)/ebin/boy.beam + $t test -f $(APP)/ebin/human.beam + $t grep COMPILE $(APP)/$(APP).d | grep core + + |