forked from direnv/direnv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (27 loc) · 753 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
34
35
36
37
DESTDIR ?= /usr/local
RONN := $(shell which ronn >/dev/null 2>&1 && echo "ronn -w --manual=direnv --organization=0x2a" || echo "@echo 'Could not generate manpage because ronn is missing. gem install ronn' || ")
RONNS = $(wildcard man/*.ronn)
ROFFS = $(RONNS:.ronn=)
.PHONY: all man html test release install
#all: build man test
all: build man
build: direnv
direnv: *.go
go fmt
go build -o direnv
clean:
rm -f direnv
%.1: %.1.ronn
$(RONN) -r $<
man: $(ROFFS)
test: direnv
go test
./test/direnv-test.sh
release: build
./script/release `./direnv version`
git tag v`./direnv version`
install: all
install -d bin $(DESTDIR)/bin
install -d man $(DESTDIR)/share/man/man1
cp direnv $(DESTDIR)/bin
cp -R man/*.1 $(DESTDIR)/share/man/man1