forked from projectatomic/atomic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 1 KB
/
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
38
39
# Installation directories.
PREFIX ?= $(DESTDIR)/usr
SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
PROFILEDIR ?= $(DESTDIR)/etc/profile.d
PYTHON ?= /usr/bin/python
BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions/
all: python-build docs
test:
sh ./test.sh
python-build: atomic
$(PYTHON) setup.py build
pylint -E --additional-builtins _ atomic
MANPAGES_MD = $(wildcard docs/*.md)
docs/%.1: docs/%.1.md
go-md2man -in $< -out [email protected] && mv [email protected] $@
docs: $(MANPAGES_MD:%.md=%)
clean:
$(PYTHON) setup.py clean
-rm -rf build *~ \#* *pyc .#*
install: all
$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
[ -d $(SYSCONFDIR) ] || mkdir -p $(SYSCONFDIR)
install -m 644 atomic.sysconfig $(SYSCONFDIR)/atomic
[ -d $(PROFILEDIR) ] || mkdir -p $(PROFILEDIR)
install -m 644 atomic.sh $(PROFILEDIR)
install -d $(PREFIX)/share/man/man1
install -m 644 $(basename $(MANPAGES_MD)) $(PREFIX)/share/man/man1
-mkdir -p $(BASHCOMPLETIONDIR)
install -m 644 bash/atomic $(BASHCOMPLETIONDIR)