forked from pop-os/cosmic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (42 loc) · 1.16 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
# Basic Makefile
# Retrieve the UUID from ``metadata.json``
UUID = $(shell grep -E '^[ ]*"uuid":' ./metadata.json | sed 's@^[ ]*"uuid":[ ]*"\(.\+\)",[ ]*@\1@')
ifeq ($(XDG_DATA_HOME),)
XDG_DATA_HOME = $(HOME)/.local/share
endif
ifeq ($(strip $(DESTDIR)),)
INSTALLBASE = $(XDG_DATA_HOME)/gnome-shell/extensions
else
INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions
endif
INSTALLNAME = $(UUID)
SRC = applications.js \
dark.css \
extension.js \
light.css \
metadata.json \
overview.js \
prefs.js \
schemas/gschemas.compiled \
schemas/org.gnome.shell.extensions.pop-cosmic.gschema.xml \
settings.js \
stylesheet.css \
topBarButton.js
$(info UUID is "$(UUID)")
.PHONY: all clean install zip-file
all: $(SRC)
rm -rf build
for i in $^ ; do \
mkdir -p build/$$(dirname $$i) ; \
cp $$i build/$$i ; \
done
schemas/gschemas.compiled: schemas/*.gschema.xml
glib-compile-schemas schemas
clean:
rm -rf build
install: all
rm -rf $(INSTALLBASE)/$(INSTALLNAME)
mkdir -p $(INSTALLBASE)/$(INSTALLNAME)
cp -r build/* $(INSTALLBASE)/$(INSTALLNAME)/
zip-file: all
cd build && zip -qr "../$(UUID)$(VSTRING).zip" .