Debian Codegraph @

eyesjunior/layouts/Makefile

raw
1 PYUIC?=pyuic5
2 PYRCC?=pyrcc5
3 PY_VERSION ?= 3
4
5 UI_FILES = $(wildcard *.ui)
6 RC_FILES = $(wildcard *.qrc)
7
8 UI_COMPILED = $(patsubst %.ui, ui_%.py, $(UI_FILES))
9 RC_COMPILED = $(patsubst %.qrc, %_rc.py, $(RC_FILES))
10
11 ifeq ($(PY_VERSION),3)
12 ifneq (,$(findstring pyrcc4,$(PYRCC)))
13 override PYRCC += -py3
14 endif
15 endif
16 $(info PYRCC=$(PYRCC))
17
18
19 all: $(UI_COMPILED) $(RC_COMPILED)
20
21 install:
22 echo "Nothing to install, except when a debian package is built;"
23 echo "then the install will be managed by the packaging system."
24
25 clean:
26 rm -f $(UI_COMPILED) $(RC_COMPILED)
27 rm -rf *.pyc *~ __pycache__
28
29 ui_%.py: %.ui
30 $(PYUIC) --from-import $< -o $@
31
32
33 %_rc.py: %.qrc
34 $(PYRCC) $< -o $@
35
36 .PHONY: all clean install