forked from jahendrie/cheat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (27 loc) · 875 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
################################################################################
# Makefile for cheat.sh
#
# Technically, no 'making' occurs, since it's just a shell script, but
# let us not quibble over trivialities such as these.
################################################################################
PREFIX=/usr
SRC=src
SRCFILE=cheat.sh
DESTFILE=cheat
DOC=doc
DATA=data
MANPATH=$(PREFIX)/share/man/man1
MANFILE=cheat.1.gz
DATAPATH=$(PREFIX)/share/cheat
SHEETPATH=$(DATAPATH)/sheets
install:
install -D -m 0755 $(SRC)/$(SRCFILE) $(PREFIX)/bin/$(DESTFILE)
mkdir -vp $(DATAPATH)
cp -rv $(DATA) $(SHEETPATH)
install -v -D -m 0644 LICENSE $(DATAPATH)/LICENSE
install -v -D -m 0644 README $(DATAPATH)/README
install -D -m 0644 $(DOC)/$(MANFILE) $(MANPATH)/$(MANFILE)
uninstall:
rm -f $(PREFIX)/bin/$(DESTFILE)
rm -rf $(DATAPATH)
rm -f $(MANPATH)/$(MANFILE)