Skip to content

Commit

Permalink
Alter compile_erl macro to force erlc to use absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Ovchar committed Mar 26, 2018
1 parent 1f6f459 commit 86dc5ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/erlc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ ebin/:
$(verbose) mkdir -p ebin/

define compile_erl
$(erlc_verbose) erlc -v $(if $(IS_DEP),$(filter-out -Werror,$(ERLC_OPTS)),$(ERLC_OPTS)) -o ebin/ \
-pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $(1))
cd /var/tmp; \
$(erlc_verbose) erlc -v $(if $(IS_DEP),$(filter-out -Werror,$(ERLC_OPTS)),$(ERLC_OPTS)) -o $(realpath ebin/) \
-pa $(realpath ebin/) -I $(realpath include/) $(realpath $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $(1)))
endef

ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) $(wildcard src/$(PROJECT).app.src)
Expand Down

0 comments on commit 86dc5ae

Please sign in to comment.