-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (33 loc) · 1.2 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
.PHONY: all clean install-desktop install-schema install install-user
uninstall-desktop uninstall-schema uninstall
PREFIX ?= $(shell echo 'import sys; print(sys.prefix)' | python)
desktopfile=$(wildcard *.desktop)
schemadir=$(realpath $(dir $(shell which glib-compile-schemas))/../share/glib-2.0/schemas)
schemafile=$(wildcard *.gschema.xml)
all:
cd po && $(MAKE)
./setup.py build
clean:
cd po && $(MAKE) clean
rm -fr build __pycache__
install-desktop:
mkdir -p $(PREFIX)/share/applications
cp -f $(desktopfile) $(PREFIX)/share/applications
install-schema:
mkdir -p $(schemadir)
cp -f $(schemafile) $(schemadir)
glib-compile-schemas $(schemadir)
install: install-desktop install-schema
./setup.py install --prefix=$(PREFIX) --record install_log.txt
cd po && $(MAKE) install
install-user: install-schema
./setup.py install --user --record install_log.txt
cd po && $(MAKE) install PREFIX=$(shell echo 'import site; print(site.USER_BASE)' | python)
uninstall-desktop:
rm -f $(PREFIX)/share/applications/$(desktopfile)
uninstall-schema:
rm -f $(schemadir)/$(schemafile)
glib-compile-schemas $(schemadir)
uninstall: uninstall-desktop uninstall-schema
xargs rm -fr < install_log.txt
rm -f install_log.txt