File: Makefile

package info (click to toggle)
othman 0.4.0-3
  • links: PTS, VCS
  • area: non-free
  • in suites: stretch
  • size: 3,584 kB
  • ctags: 142
  • sloc: sql: 12,855; python: 875; makefile: 63; sh: 19
file content (42 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (3)
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
DESTDIR?=/
datadir?=$(DESTDIR)/usr/share
INSTALL=install

SOURCES=$(wildcard *.desktop.in)
TARGETS=${SOURCES:.in=} othman-data/quran.db

all: $(TARGETS) icons

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

othman-data/ix.db: othman-data/quran.db
	rm othman-data/ix.db || :
	python gen-index.py

othman-data/quran.db: othman-data/quran.sql othman-data/update-othmani.sql
	rm $@ || :
	cat $^ | sqlite3 $@

pos:
	make -C po all

install: all
	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 Othman-$${i}.png $(datadir)/icons/hicolor/$${i}x$${i}/apps/Othman.png; \
	done

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

clean:
	rm -f $(TARGETS) othman-data/ix.db
	for i in 96 72 64 48 36 32 24 22 16; do \
		rm -f Othman-$${i}.png; \
	done