-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (38 loc) · 1.32 KB
/
Copy pathMakefile
File metadata and controls
44 lines (38 loc) · 1.32 KB
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
PREFIX ?= /usr/local
DESTDIR ?=
BINDIR := $(DESTDIR)$(PREFIX)/bin
DATADIR := $(DESTDIR)$(PREFIX)/share/wslutil
CORE_SCRIPTS := \
wslutil wslutil-config wslutil-doctor wslutil-info wslutil-list wslutil-setup wslutil-setup-linux wslutil-uptime \
win-run win-open win-browser win-copy win-paste win-utf8 win-env \
wslpath-drive
.PHONY: install uninstall check-deps
install:
install -d $(BINDIR) $(DATADIR)/config $(DATADIR)/env $(DATADIR)/lib
for f in $(CORE_SCRIPTS); do \
install -m 0755 bin/$$f $(BINDIR)/$$f; \
done
ln -sf win-browser $(BINDIR)/wslview
cp -R config/. $(DATADIR)/config/
cp -R env/. $(DATADIR)/env/
install -m 0644 lib/wslutil-paths.sh $(DATADIR)/lib/wslutil-paths.sh
install -m 0644 lib/wslutil-setup-common.sh $(DATADIR)/lib/wslutil-setup-common.sh
install -m 0644 lib/wslutil-exes-config.sh $(DATADIR)/lib/wslutil-exes-config.sh
install -m 0644 VERSION $(DATADIR)/VERSION
uninstall:
for f in $(CORE_SCRIPTS) wslview; do \
rm -f $(BINDIR)/$$f; \
done
rm -rf $(DATADIR)/config $(DATADIR)/env $(DATADIR)/lib
rm -f $(DATADIR)/VERSION
# do NOT remove $(DATADIR)/bin (shims) or $(DATADIR) itself
check-deps:
@missing=0; \
for c in yq crudini; do \
if ! command -v $$c >/dev/null 2>&1; then \
echo "missing: $$c"; missing=1; \
else \
echo "ok: $$c"; \
fi; \
done; \
exit $$missing