-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
49 lines (41 loc) · 1.76 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
40
41
42
43
44
45
46
47
48
49
# Makefile for cqfd
PREFIX?=/usr/local
.PHONY: all help install uninstall test tests
all: help
help:
@echo "Available make targets:"
@echo " help: This help message"
@echo " install: Install script, doc and resources"
@echo " uninstall: Remove script, doc and resources"
@echo " tests: Run functional tests"
install:
install -d $(DESTDIR)$(PREFIX)/bin/
install -m 0755 cqfd $(DESTDIR)$(PREFIX)/bin/
install -d $(DESTDIR)$(PREFIX)/share/doc/cqfd/
install -m 0644 AUTHORS CHANGELOG.md LICENSE README.md $(DESTDIR)$(PREFIX)/share/doc/cqfd/
install -d $(DESTDIR)$(PREFIX)/share/cqfd/samples/
install -m 0644 samples/* $(DESTDIR)$(PREFIX)/share/cqfd/samples/
completionsdir=$${COMPLETIONSDIR:-$$(pkg-config --define-variable=prefix=$(PREFIX) \
--define-variable=datadir=$(PREFIX)/share \
--variable=completionsdir \
bash-completion)}; \
if [ -n "$$completionsdir" ]; then \
install -d $(DESTDIR)$$completionsdir/; \
install -m 644 bash-completion $(DESTDIR)$$completionsdir/cqfd; \
fi
uninstall:
rm -rf $(DESTDIR)$(PREFIX)/bin/cqfd \
$(DESTDIR)$(PREFIX)/share/doc/cqfd \
$(DESTDIR)$(PREFIX)/share/cqfd
completionsdir=$${COMPLETIONSDIR:-$$(pkg-config --define-variable=prefix=$(PREFIX) \
--define-variable=datadir=$(PREFIX)/share \
--variable=completionsdir \
bash-completion)}; \
if [ -n "$$completionsdir" ]; then \
rm -rf $(DESTDIR)$$completionsdir/cqfd; \
fi
user-install user-uninstall:
user-%:
$(MAKE) $* PREFIX=$$HOME/.local
test tests:
@$(MAKE) -C tests