-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
51 lines (38 loc) · 1.58 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
NAME=quick-settings-audio-panel
DOMAIN=rayzeq.github.io
OUTPUT_DIR=dist
TS_FILES=extension.ts prefs.ts libs/*.ts libs/libpanel/*.ts
JS_FILES=$(TS_FILES:%.ts=$(OUTPUT_DIR)/%.js)
TARGET=$(OUTPUT_DIR)/$(NAME)@$(DOMAIN).shell-extension.zip
.PHONY: all pack install test clean
all: pack
node_modules: package.json
npm install
# npm install doesn't seems to necessarily update the date on the folder
touch node_modules
po/example.pot: $(JS_FILES)
xgettext --from-code=UTF-8 --output=po/example.pot $(OUTPUT_DIR)/*.js
$(JS_FILES): node_modules $(TS_FILES)
-npx tsc
touch $(OUTPUT_DIR)/libs
$(OUTPUT_DIR)/libs/libpanel/gschemas.compiled: libs/libpanel/*.gschema.xml
mkdir -p $(OUTPUT_DIR)/libs/libpanel/
glib-compile-schemas libs/libpanel/ --targetdir=$(OUTPUT_DIR)/libs/libpanel/
pack: $(OUTPUT_DIR)/libs/libpanel/gschemas.compiled $(JS_FILES) po/example.pot
cp -r stylesheet.css metadata.json LICENSE po/ schemas/ $(OUTPUT_DIR)
cp libs/libpanel/LICENSE $(OUTPUT_DIR)/libs/libpanel/
# for some reason this prevents `gnome-extensions pack` from putting some empty files in the archive
# (because of virtualbox ?)
sleep 1
cd $(OUTPUT_DIR)/ && gnome-extensions pack --extra-source=LICENSE --extra-source=libs --podir=po --force
install: pack
gnome-extensions install $(TARGET) --force
test: install
clear
SHELL_DEBUG=backtrace-warnings env MUTTER_DEBUG_DUMMY_MODE_SPECS=1024x768 dbus-run-session -- gnome-shell --nested --wayland
prefs: install
clear
gnome-extensions prefs [email protected]
journalctl -f -o cat /usr/bin/gjs
clean:
rm -r $(OUTPUT_DIR) node_modules