-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 845 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
LUA ?= lua
FENNEL ?= ./bin/fennel
DESTDIR ?=
PREFIX ?= /usr/local
BIN_DIR ?= $(PREFIX)/bin
build: moongarden
moongarden: src/core.fnl
@echo "#!/usr/bin/env $(LUA)" > $@
@$(FENNEL) --compile --no-metadata --require-as-include $< >> $@
@chmod 755 $@
install: moongarden
mkdir -p $(DESTDIR)$(BIN_DIR) && \
cp moongarden $(DESTDIR)$(BIN_DIR)/
test: moongarden
@$(LUA) test/init.lua
uploadrock: rockspecs/moongarden-$(VERSION)-1.rockspec
luarocks --local build $<
$(HOME)/.luarocks/bin/moongarden --version | grep $(VERSION)
luarocks --local remove moongarden
luarocks upload --sign --api-key $(shell pass luarocks-api-key) $<
luarocks --local install moongarden
$(HOME)/.luarocks/bin/moongarden --version | grep $(VERSION)
luarocks --local remove moongarden
clean:
@rm moongarden
.PHONY: build moongarden test clean uploadrock