2024-02-15 17:56:31 +00:00
|
|
|
# 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
|
2023-01-20 08:20:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
2024-02-15 17:56:31 +00:00
|
|
|
prepare:
|
|
|
|
shards install
|
|
|
|
|
2023-01-20 08:20:55 +00:00
|
|
|
build:
|
2024-02-15 17:56:31 +00:00
|
|
|
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
|