diff --git a/Makefile b/Makefile index dabe359..4741ed2 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,26 @@ -gui: pyqt +.PHONY: gui +gui: relational_gui/survey.py relational_gui/maingui.py relational_gui/rel_edit.py relational_gui/resources.py -pyqt: +relational_gui/survey.py: pyuic5 relational_gui/survey.ui > relational_gui/survey.py + +relational_gui/maingui.py: pyuic5 relational_gui/maingui.ui > relational_gui/maingui.py - pyuic5 relational_gui/rel_edit.ui > relational_gui/rel_edit.py - pyrcc5 relational_gui/resources.qrc > relational_gui/resources.py sed -i 's/QtWidgets.QPlainTextEdit/editor.Editor/g' relational_gui/maingui.py echo 'from . import editor' >> relational_gui/maingui.py +relational_gui/rel_edit.py: + pyuic5 relational_gui/rel_edit.ui > relational_gui/rel_edit.py + +relational_gui/resources.py: + pyrcc5 relational_gui/resources.qrc > relational_gui/resources.py + + +.PHONY: test test: ./driver.py +.PHONY: dist dist: clean rm -rf /tmp/relational/ rm -rf /tmp/relational-* @@ -23,10 +33,9 @@ dist: clean #(cd /tmp; tar -zcf relational.tar.gz relational-*/) (cd /tmp; tar -zcf relational.tar.gz relational/) mv /tmp/relational.tar.gz ./relational_`./relational_gui.py -v | grep Relational | cut -d" " -f2`.orig.tar.gz - -release: dist gpg --sign --armor --detach-sign ./relational_`./relational_gui.py -v | grep Relational | cut -d" " -f2`.orig.tar.gz +.PHONY: clean clean: rm -rf `find -name "*~"` rm -rf `find -name "*pyc"` @@ -41,16 +50,19 @@ clean: rm -f relational_gui/rel_edit.py rm -f relational_gui/resources.py +.PHONY: install-relational-cli install-relational-cli: python3 setup/relational-cli.setup.py install --root=$${DESTDIR:-/}; rm -rf build; install -D relational_gui.py $${DESTDIR:-/}/usr/bin/relational-cli install -D relational-cli.1 $${DESTDIR:-/}/usr/share/man/man1/relational-cli.1 +.PHONY: install-python3-relational install-python3-relational: python3 setup/python3-relational.setup.py install --root=$${DESTDIR:-/}; rm -rf build; +.PHONY: install-relational install-relational: python3 setup/relational.setup.py install --root=$${DESTDIR:-/}; rm -rf build; @@ -59,4 +71,5 @@ install-relational: install -m0644 -D relational_gui/resources/relational.png $${DESTDIR:-/}/usr/share/pixmaps/relational.png install -D relational.1 $${DESTDIR:-/}/usr/share/man/man1/relational.1 +.PHONY: install install: install-relational-cli install-python3-relational install-relational