31 lines
482 B
Makefile
31 lines
482 B
Makefile
ifeq ($(PREFIX),)
|
|
PREFIX := /usr/local
|
|
endif
|
|
|
|
all: release
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f blogtool .deps
|
|
|
|
.PHONY: run
|
|
run:
|
|
crystal run src/blogtool.cr
|
|
|
|
release: dependencies
|
|
crystal build --release --no-debug src/blogtool.cr
|
|
|
|
dependencies:
|
|
[ -e .deps ] || shards install
|
|
touch .deps
|
|
debug: dependencies
|
|
crystal build src/blogtool.cr
|
|
|
|
test:
|
|
cd testsite && ../blogtool
|
|
|
|
install:
|
|
install blogtool $(PREFIX)/bin/
|
|
mkdir -p /etc/blogtool
|
|
install testsite/base.html /etc/blogtool/
|