This repository was archived by the owner on Sep 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (45 loc) · 1.37 KB
/
Makefile
File metadata and controls
53 lines (45 loc) · 1.37 KB
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
TARGET = microdude
PREFIX = $(DESTDIR)/usr/local
BINDIR = $(PREFIX)/bin
ICON_THEME_DIR = /usr/share/icons/hicolor
ICON_DIR = $(ICON_THEME_DIR)/scalable/apps
DESKTOP_FILES_DIR = /usr/share/applications
all: build
build: test
python3 setup.py bdist_egg
install:
python3 setup.py install
install -D res/$(TARGET) $(BINDIR)/$(TARGET)
install -D res/$(TARGET).svg $(ICON_DIR)
gtk-update-icon-cache $(ICON_THEME_DIR)
install -D res/$(TARGET).desktop $(DESKTOP_FILES_DIR)
for po in locale/*.po; do \
locale=$${po%.*}; \
dest_dir="/usr/share/$$locale/LC_MESSAGES/"; \
mkdir -p $$dest_dir; \
msgfmt $$locale.po -o $$dest_dir/$(TARGET).mo; \
done
uninstall:
rm $(BINDIR)/$(TARGET)
rm $(ICON_DIR)/$(TARGET).svg
gtk-update-icon-cache $(ICON_THEME_DIR)
rm $(DESKTOP_FILES_DIR)/$(TARGET).desktop
for po in locale/*.po; do \
locale=$${po%.*}; \
dest_dir="/usr/share/$$locale/LC_MESSAGES/"; \
rm -f $$dest_dir/$(TARGET).mo; \
done
update_pot:
xgettext -L Glade microdude/resources/gui.glade --omit-header -o locale/messages.pot
xgettext -L Python microdude/editor.py --keyword=_ -j -o locale/messages.pot
for po in locale/*.po; do \
msgmerge -U $$po locale/messages.pot; \
done
test:
python3 -m unittest discover
clean:
python3 setup.py clean --all
py3clean .
rm -rf dist $(shell python3 setup.py --name).egg-info
rm -rf .eggs
find . -name '*~' | xargs rm -f