-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (29 loc) · 902 Bytes
/
Makefile
File metadata and controls
43 lines (29 loc) · 902 Bytes
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
40
41
42
43
CURRENT_DIR=$(shell pwd -P)
BIN_NAME=xcf-thumbnailer.pl
THUMB_NAME=xcf.thumbnailer
TARGET_BIN_DIR=${HOME}/bin
TARGET_THUMB_DIR=${HOME}/.local/share/thumbnailers
TARGET_BIN=${TARGET_BIN_DIR}/${BIN_NAME}
TARGET_THUMB=${TARGET_THUMB_DIR}/${THUMB_NAME}
ORIGIN_BIN=${CURRENT_DIR}/bin/${BIN_NAME}
ORIGIN_THUMB=${CURRENT_DIR}/share/${THUMB_NAME}
help:
@echo "Usage:"
@echo "\tmake install | link | uninstall"
install: make-dir
@test -e "${TARGET_BIN}" || \
cp "${ORIGIN_BIN}" "${TARGET_BIN}"
@test -e "${TARGET_THUMB}" || \
cp "${ORIGIN_THUMB}" "${TARGET_THUMB}"
link: make-dir
@test -e "${TARGET_BIN}" || \
ln -s "${ORIGIN_BIN}" "${TARGET_BIN}"
@test -e "${TARGET_THUMB}" || \
ln -s "${ORIGIN_THUMB}" "${TARGET_THUMB}"
uninstall:
@test -e "${TARGET_BIN}" && \
rm "${TARGET_BIN}"
@test -e "${TARGET_THUMB}" && \
rm "${TARGET_THUMB}"
make-dir:
mkdir -p "${TARGET_THUMB_DIR}"