From e9226c05d5133bfeb380c5de08d521142f7ac566 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Mon, 2 Jan 2023 19:06:33 +0100 Subject: [PATCH] Cleanup `Makefile` --- Makefile | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 84144a86..8b7772a4 100644 --- a/Makefile +++ b/Makefile @@ -4,19 +4,35 @@ PREFIX ?= /usr/local SHARD_BIN ?= ../../bin CRFLAGS ?= -Dpreview_mt -build: bin/ameba -bin/ameba: +.PHONY: build +build: $(SHARDS_BIN) build $(CRFLAGS) + +.PHONY: lint +lint: build + ./bin/ameba --all + +.PHONY: spec +spec: + $(CRYSTAL_BIN) spec + +.PHONY: clean clean: rm -f ./bin/ameba ./bin/ameba.dwarf + +.PHONY: install install: build mkdir -p $(PREFIX)/bin cp ./bin/ameba $(PREFIX)/bin + +.PHONY: bin bin: build mkdir -p $(SHARD_BIN) cp ./bin/ameba $(SHARD_BIN) + +.PHONY: run_file run_file: cp -n ./bin/ameba.cr $(SHARD_BIN) || true -test: build - $(CRYSTAL_BIN) spec - ./bin/ameba --all + +.PHONY: test +test: spec lint