changeset 252:39080a271bf3 pyqt5

fix the makefile
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 05 Nov 2017 02:49:14 +0100
parents 3ce39af93e77
children 8b1678851b54 156edbd0733a
files Makefile
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Oct 22 03:40:44 2017 +0200
+++ b/Makefile	Sun Nov 05 02:49:14 2017 +0100
@@ -1,17 +1,18 @@
 
-# find all .ui files and generate corresponding filenames ending in .py
-PY_FILES = $(patsubst %.ui, %.py, $(wildcard *.ui))
+UI_FILES = $(wildcard *.ui)
+UI_PY_FILES = $(UI_FILES:%.ui=Ui_%.py)
 RC_FILES = $(patsubst %.qrc, %_rc.py, $(wildcard *.qrc))
 
-all: $(PY_FILES) $(RC_FILES)
+all: $(UI_PY_FILES) $(RC_FILES)
 
-%.py: %.ui
-	pyuic5 -o Ui_$@ $<
+Ui_%.py: %.ui
+	pyuic5 -o $@ $<
 
 %_rc.py: %.qrc
 	pyrcc5 -o $@ $<
 
 .PHONY: clean
 clean:
-	#rm $(PY_FILES)
+	rm $(UI_PY_FILES)
+	rm $(RC_FILES)
 	rm *.pyc