blogtool/Makefile

31 lines
482 B
Makefile
Raw Normal View History

2020-12-23 01:48:34 -06:00
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
all: release
.PHONY: clean
clean:
rm -f blogtool .deps
2020-12-23 01:48:34 -06:00
.PHONY: run
run:
crystal run src/blogtool.cr
2020-12-23 10:18:47 -06:00
release: dependencies
2020-12-23 01:48:34 -06:00
crystal build --release --no-debug src/blogtool.cr
2020-12-23 10:18:47 -06:00
dependencies:
[ -e .deps ] || shards install
touch .deps
debug: dependencies
2020-12-23 10:18:47 -06:00
crystal build src/blogtool.cr
test:
2020-12-23 10:18:47 -06:00
cd testsite && ../blogtool
2020-12-23 01:48:34 -06:00
install:
2020-12-23 10:18:47 -06:00
install blogtool $(PREFIX)/bin/
mkdir -p /etc/blogtool
install testsite/base.html /etc/blogtool/