|
| 1 | +#/*************************************************************************** |
| 2 | +# * * |
| 3 | +# * This program is free software; you can redistribute it and/or modify * |
| 4 | +# * it under the terms of the GNU General Public License as published by * |
| 5 | +# * the Free Software Foundation; either version 2 of the License, or * |
| 6 | +# * (at your option) any later version. * |
| 7 | +# * * |
| 8 | +# ***************************************************************************/ |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +# Makefile for a PyQGIS plugin |
| 13 | + |
| 14 | +# global |
| 15 | +PLUGINNAME = postgres91plusauditor |
| 16 | +PY_FILES = __init__.py $(PLUGINNAME).py |
| 17 | +EXTRAS = metadata.txt resources.qrc |
| 18 | +TOOL_DIR = gui core ui qgiscombomanager qgissettingmanager |
| 19 | +ICONS_DIR = icons |
| 20 | + |
| 21 | +UI_SOURCES=$(wildcard ui/*.ui) |
| 22 | +UI_FILES=$(join $(dir $(UI_SOURCES)), $(notdir $(UI_SOURCES:%.ui=%.py))) |
| 23 | +RC_SOURCES=$(wildcard *.qrc) |
| 24 | +RC_FILES=$(patsubst %.qrc,%.py,$(RC_SOURCES)) |
| 25 | +LN_SOURCES=$(wildcard i18n/*.ts) |
| 26 | +LN_FILES=$(join $(dir $(LN_SOURCES)), $(notdir $(LN_SOURCES:%.ts=%.qm))) |
| 27 | + |
| 28 | +GEN_FILES = ${UI_FILES} ${RC_FILES} |
| 29 | + |
| 30 | +all: $(GEN_FILES) |
| 31 | +ui: $(UI_FILES) |
| 32 | +resources: $(RC_FILES) |
| 33 | + |
| 34 | +$(UI_FILES): ui/%.py: ui/%.ui |
| 35 | + pyuic4 -o $@ $< |
| 36 | + |
| 37 | +$(RC_FILES): %.py: %.qrc |
| 38 | + pyrcc4 -o $@ $< |
| 39 | + |
| 40 | +$(LN_FILES): i18n/%.qm: i18n/%.ts |
| 41 | + lrelease-qt4 $< |
| 42 | + |
| 43 | +clean: |
| 44 | + rm -f $(GEN_FILES) *.pyc |
| 45 | + |
| 46 | +compile: $(UI_FILES) $(RC_FILES) $(LN_FILES) |
| 47 | + |
| 48 | +transup: |
| 49 | + pylupdate4 -noobsolete $(UI_SOURCES) $(PLUGINNAME).py gui/*.py core/*.py -ts i18n/$(PLUGINNAME)_fr.ts |
| 50 | + |
| 51 | +deploy: |
| 52 | + mkdir -p $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) |
| 53 | + cp -rvf * $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)/ |
0 commit comments