File: Makefile

package info (click to toggle)
pyacidobasic 2.5-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,180 kB
  • ctags: 131
  • sloc: python: 1,183; xml: 71; makefile: 32; sh: 6
file content (42 lines) | stat: -rw-r--r-- 1,139 bytes parent folder | download | duplicates (2)
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 = 
LRELEASE = lrelease-qt4
PYPACKAGE = pyacidobasic
SHAREDIR = $(DESTDIR)/usr/share/$(PYPACKAGE)
SOURCES = $(shell ls *.py | grep -v ^Ui_)

all:	Ui_main.py Ui_prelevement.py Ui_curvecontrol.py pyacidobasic.1.gz languages
	python setup.py build

pyacidobasic.1.gz: pyacidobasic.1
	gzip -c9 $< > $@

pyacidobasic.1: manpage.xml
	xsltproc --nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl manpage.xml

clean:
	rm -f *~ *.pyc Ui_*.py *.1 *.1.gz lang/*.qm
	rm -rf build

install:
	install -d $(SHAREDIR)
	python setup.py install --root $(DESTDIR) --prefix=/usr
	mkdir -p $(DESTDIR)/usr/share/applications
	cp pyacidobasic.desktop $(DESTDIR)/usr/share/applications


languages: tsfiles
	$(LRELEASE) lang/*.ts 2>/dev/null || lrelease lang/*.ts

tsfiles: 
	cd lang; pylupdate4 pyacidobasic.pro

helpfiles:
	@$(MAKE) -C help

Ui_main.py: main.ui
	pyuic4 $< | sed -e 's/^from qwt_plot/from PyQt4.Qwt5/' -e 's%\(icons/[-:a-zA-Z_0-9]*\.svg\)%/usr/share/$(PYPACKAGE)/\1%g' -e 's%../../../../../usr/share/icons%/usr/share/icons%' > $@

Ui_%.py: %.ui
	pyuic4 $< > $@

.PHONY: clean all install languages helpfiles tsfiles