Skip to content

Commit

Permalink
Makefile best practices
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos authored Feb 23, 2024
1 parent 3d9a8d8 commit 7e51706
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
REBAR:=$(shell which rebar3 || echo ./rebar3)
REBAR_URL:="https://s3.amazonaws.com/rebar3/rebar3"
.PHONY: test

all: clean build

$(REBAR):
curl -o rebar3 $(REBAR_URL) && chmod +x rebar3

.PHONY: build
build: $(REBAR)
$(REBAR) compile

.PHONY: release
release: $(REBAR)
$(REBAR) release

.PHONY: fresh
fresh: $(REBAR)
rm -Rf _build
$(REBAR) clean

.PHONY: clean
clean: $(REBAR)
$(REBAR) clean

.PHONY: test
test: $(REBAR)
$(REBAR) eunit
$(REBAR) dialyzer

0 comments on commit 7e51706

Please sign in to comment.