-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
37 lines (29 loc) · 1.03 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
MKDIR=mkdir -p
CP=cp
DESTDIR=
PREFIX=/usr/local
SH=/bin/sh
all: none
none:
@echo "Nothing to be done, run `make install` instead"
install: bin bashcomp zshcomp scripts doc
bin: tdm tdmctl
$(MKDIR) $(DESTDIR)$(PREFIX)/bin
$(CP) $^ $(DESTDIR)$(PREFIX)/bin
sed -i -e "s_PREFIX=/usr/local_PREFIX=$(PREFIX)_" $(DESTDIR)$(PREFIX)/bin/tdmctl
bashcomp: tdmctl.bashcomp
$(MKDIR) $(DESTDIR)$(PREFIX)/share/bash-completion/completions
$(CP) $^ $(DESTDIR)$(PREFIX)/share/bash-completion/completions/tdmctl
zshcomp: _tdmctl
$(MKDIR) $(DESTDIR)$(PREFIX)/share/zsh/site-functions
$(CP) $^ $(DESTDIR)$(PREFIX)/share/zsh/site-functions
scripts: tdmexit tdminit
$(MKDIR) $(DESTDIR)$(PREFIX)/share/tdm
$(CP) $^ $(DESTDIR)$(PREFIX)/share/tdm
$(MKDIR) $(DESTDIR)$(PREFIX)/share/tdm/sessions
$(MKDIR) $(DESTDIR)$(PREFIX)/share/tdm/extra
$(SH) ./links.sh /usr/bin $(DESTDIR)$(PREFIX)/share/tdm/sessions
doc: tdm.1
$(MKDIR) $(DESTDIR)$(PREFIX)/share/man/man1
$(CP) $^ $(DESTDIR)$(PREFIX)/share/man/man1
ln -s $^ $(DESTDIR)$(PREFIX)/share/man/man1/tdmctl.1