Skip to content

Commit

Permalink
Exit on failure of dep to build; stop removing ebin directory on clea…
Browse files Browse the repository at this point in the history
…n; stop doing clean on a test build
  • Loading branch information
srstrong committed Dec 25, 2013
1 parent 44bf272 commit 47fbe0c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions erlang.mk
Expand Up @@ -154,7 +154,7 @@ ebin/$(PROJECT).app: $(shell find src -type f -name \*.erl) \
$(call compile_dtl,$(filter %.dtl,$?))) $(call compile_dtl,$(filter %.dtl,$?)))


clean: clean:
$(gen_verbose) rm -rf ebin/ test/*.beam erl_crash.dump $(gen_verbose) rm -rf ebin/* test/*.beam erl_crash.dump


# Dependencies. # Dependencies.


Expand All @@ -181,7 +181,7 @@ $(foreach dep,$(DEPS),$(eval $(call dep_target,$(dep))))
deps: $(ALL_DEPS_DIRS) deps: $(ALL_DEPS_DIRS)
@for dep in $(ALL_DEPS_DIRS) ; do \ @for dep in $(ALL_DEPS_DIRS) ; do \
if [ -f $$dep/Makefile ] ; then \ if [ -f $$dep/Makefile ] ; then \
$(MAKE) -C $$dep ; \ $(MAKE) -C $$dep || exit 1 ; \
else \ else \
echo "include $(CURDIR)/erlang.mk" | $(MAKE) -f - -C $$dep ; \ echo "include $(CURDIR)/erlang.mk" | $(MAKE) -f - -C $$dep ; \
fi ; \ fi ; \
Expand Down Expand Up @@ -242,16 +242,7 @@ endef
$(foreach test,$(CT_SUITES),$(eval $(call test_target,$(test)))) $(foreach test,$(CT_SUITES),$(eval $(call test_target,$(test))))


tests: ERLC_OPTS += -DTEST=1 +'{parse_transform, eunit_autoexport}' tests: ERLC_OPTS += -DTEST=1 +'{parse_transform, eunit_autoexport}'
tests: clean deps app build-tests tests: deps app build-tests
@if [ -d "test" ] ; \
then \
mkdir -p logs/ ; \
$(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) ; \
fi
$(gen_verbose) rm -f test/*.beam

tests_noclean: ERLC_OPTS += -DTEST=1 +'{parse_transform, eunit_autoexport}'
tests_noclean: deps app build-tests
@if [ -d "test" ] ; \ @if [ -d "test" ] ; \
then \ then \
mkdir -p logs/ ; \ mkdir -p logs/ ; \
Expand Down

0 comments on commit 47fbe0c

Please sign in to comment.