-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (29 loc) · 1.03 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
NAME=rectangle
DOMAIN=acristoffers.me
.PHONY: all pack install clean
all: dist/extension.js dist/prefs.ui dist/icons
node_modules: package.json
npm install
dist/extension.js dist/prefs.js: node_modules src/extension.ts src/prefs.ts
tsc --build tsconfig.json
dist/prefs.ui:
@cp ui/prefs.ui dist/prefs.ui
dist/icons:
@mkdir -p dist/icons
@cp -r res/placement-icons/* dist/icons/
@cp res/*.svg dist/icons
schemas/gschemas.compiled: schemas/org.gnome.shell.extensions.$(NAME).gschema.xml
glib-compile-schemas schemas
$(NAME).zip: dist/extension.js dist/prefs.js dist/prefs.ui schemas/gschemas.compiled dist/icons
@rm dist/tsconfig.tsbuildinfo
@cp -r schemas dist/
@cp metadata.json dist/
@cp src/stylesheet.css dist/
@(cd dist && zip ../$(NAME).zip -9r .)
pack: $(NAME).zip
install: $(NAME).zip
@touch ~/.local/share/gnome-shell/extensions/$(NAME)@$(DOMAIN)
@rm -rf ~/.local/share/gnome-shell/extensions/$(NAME)@$(DOMAIN)
@mv dist ~/.local/share/gnome-shell/extensions/$(NAME)@$(DOMAIN)
clean:
@rm -rf dist node_modules $(NAME).zip