diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -1,11 +1,26 @@ -PY=BoxerPanelWidget.py BoxerDockWidget.py +UI=BoxerDockWidget.ui +GEN_PY=$(patsubst %.ui,%.py,$(UI)) +SRC_PY=$(filter-out $(GEN_PY), $(wildcard *.py)) +FORMATTED_COOKIE=$(patsubst %,.formatted.%,$(SRC_PY)) -all: $(PY) +all: $(GEN_PY) -clean: - rm -f $(PY) +reformat: clean-formatted-cookie format -#BoxerPanelWidget.py: BoxerPanelWidget.ui +format: $(FORMATTED_COOKIE) + +clean: clean-gen clean-formatted-cookie + +clean-formatted-cookie: + rm -f $(FORMATTED_COOKIE) + +clean-gen: + rm -f $(GEN_PY) %.py: %.ui pyside-uic -o $@ $< + +.formatted.%.py: %.py .style.yapf + @echo yapf -i $(filter %.py,$<) + @yapf -i $(filter %.py,$<); if [ "$$?" = 2 ]; then exit 0; fi + @touch $@ |