-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
75 lines (62 loc) · 1.86 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
EXT_NAME = gnome-clipboard
UUID = $(EXT_NAME)@b00f.github.io
BUNDLE = $(UUID).shell-extension.zip
POT_FILE = ./po/$(EXT_NAME).pot
SOURCES = src/*.ts src/*.css
all: depcheck pack
compile:
@sh scripts/transpile.sh
depcheck:
@echo depcheck
@if ! command -v tsc >/dev/null; then \
echo \
echo 'You must install TypeScript to transpile'; \
exit 1; \
fi
pack: compile
@gnome-extensions pack --force --gettext-domain=$(EXT_NAME) dist \
--extra-source=clipboardItem.js \
--extra-source=clipboardPanel.js \
--extra-source=prefs.js \
--extra-source=scrollMenu.js \
--extra-source=history.js \
--extra-source=historyMenu.js \
--extra-source=confirmDialog.js \
--extra-source=menuItem.js \
--extra-source=store.js \
--extra-source=searchBox.js \
--extra-source=actionBar.js \
--extra-source=settings.js \
--extra-source=log.js \
--extra-source=utils.js \
--extra-source=README.md \
--extra-source=LICENSE
@echo extension packed!
install: pack
@gnome-extensions install $(BUNDLE) --force
@echo extension installed!
enable:
@gnome-extensions enable $(UUID)
@echo extension enabled!
disable:
@gnome-extensions disable $(UUID)
@echo extension disbled!
update-transaltions:
@xgettext -L JavaScript --no-wrap --no-location --sort-output --from-code=UTF-8 -k_ -kN_ -o $(POT_FILE) dist/*.js --package-name $(EXT_NAME)
@for f in ./po/*.po ; do \
msgmerge --no-location -N $$f $(POT_FILE) -o $$f ;\
done
test_wayland: install
# https://wiki.gnome.org/Attic/GnomeShell/Extensions/Writing#Extension_Creation
@dbus-run-session -- gnome-shell --nested --wayland
test: depcheck compile install enable restart-shell
restart-shell:
echo "Restart shell!"
if bash -c 'xprop -root &> /dev/null'; then \
pkill -HUP gnome-shell; \
else \
gnome-session-quit --logout; \
fi
sleep 3
listen:
journalctl -o cat -n 0 -f "$$(which gnome-shell)" | grep -v warning