feat: add more targets to makefile (ex: install)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
1e63606f72
commit
e6a6da7a78
1 changed files with 32 additions and 1 deletions
33
Makefile
33
Makefile
|
@ -1,6 +1,37 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
|
||||
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
|
||||
|
||||
CURRENT_UID := $(shell id -u)
|
||||
CURRENT_GID := $(shell id -g)
|
||||
ifeq ($(CURRENT_UID),0)
|
||||
PREFIX=/usr
|
||||
else
|
||||
PREFIX=$(HOME)/.local
|
||||
endif
|
||||
|
||||
|
||||
all: build
|
||||
|
||||
prepare:
|
||||
shards install
|
||||
|
||||
build:
|
||||
shards build --error-trace
|
||||
shards build --error-trace -Dpreview_mt
|
||||
@echo SUCCESS
|
||||
|
||||
watch:
|
||||
watchexec --restart --delay-run 3 -c -e cr make build
|
||||
|
||||
spec: test
|
||||
test:
|
||||
crystal spec --error-trace
|
||||
|
||||
install:
|
||||
install \
|
||||
-m 755 \
|
||||
bin/docmachine \
|
||||
$(PREFIX)/bin
|
||||
|
||||
.PHONY: spec test build all prepare install
|
||||
|
|
Loading…
Reference in a new issue