File: Makefile

package info (click to toggle)
othman 1.0.0-3
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 3,332 kB
  • sloc: python: 923; makefile: 69
file content (46 lines) | stat: -rw-r--r-- 1,118 bytes parent folder | download
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
DESTDIR?=/
PREFIX?=$(DESTDIR)/usr
datadir?=$(PREFIX)/share
INSTALL=install
PYTHON=/usr/bin/python3
SOURCES=$(wildcard *.desktop.in)
TARGETS=${SOURCES:.in=}
TEST_DEPS=0

all: $(TARGETS) icons

icons:
	install -d icons; 
	for i in 96 72 64 48 36 32 24 22 16; do \
		convert Othman-128.png -resize $${i}x$${i} icons/Othman-$${i}.png; \
	done

othman-data/ix.db: othman-data/quran.db
	rm othman-data/ix.db || :
	$(PYTHON) gen-index.py

pos:
	make -C po all

install: all
	[ $(TEST_DEPS) == "1" ] && $(PYTHON) -c 'import gi; gi.require_version("Gtk", "3.0")' || :
	rm othman-data/quran-kareem.png || :
	$(INSTALL) -d $(datadir)/applications/
	$(INSTALL) -m 0644 Othman.desktop $(datadir)/applications/
	for i in 96 72 64 48 36 32 24 22 16; do \
		install -d $(datadir)/icons/hicolor/$${i}x$${i}/apps; \
		$(INSTALL) -m 0644 -D icons/Othman-$${i}.png $(datadir)/icons/hicolor/$${i}x$${i}/apps/Othman.png; \
	done

%.desktop: %.desktop.in pos
	echo "updating .desktop"
	intltool-merge -d po $< $@

clean:
	rm -f othman-data/ix.db
	rm -f othman-data/quran-kareem.png
	rm -rf build
	rm -f po/*.mo
	rm -rf locale
	rm -rf icons