Skip to content

Commit

Permalink
added Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 7, 2013
1 parent 048d179 commit 1ed2ec0
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 392 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
tmp/
.idea
*.qgs
tmp/
ui_*.py
resources.py
*.qm

53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#/***************************************************************************
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU General Public License as published by *
# * the Free Software Foundation; either version 2 of the License, or *
# * (at your option) any later version. *
# * *
# ***************************************************************************/



# Makefile for a PyQGIS plugin

# global
PLUGINNAME = intersectit
PY_FILES = __init__.py $(PLUGINAME).py
EXTRAS = metadata.txt resources.qrc
TOOL_DIR = gui core ui qgiscombomanager qgissettingmanager
ICONS_DIR = icons

UI_SOURCES=$(wildcard ui/*.ui)
UI_FILES=$(join $(dir $(UI_SOURCES)), $(notdir $(UI_SOURCES:%.ui=%.py)))
RC_SOURCES=$(wildcard *.qrc)
RC_FILES=$(patsubst %.qrc,%.py,$(RC_SOURCES))
LN_SOURCES=$(wildcard i18n/*.ts)
LN_FILES=$(join $(dir $(LN_SOURCES)), $(notdir $(LN_SOURCES:%.ts=%.qm)))

GEN_FILES = ${UI_FILES} ${RC_FILES}

all: $(GEN_FILES)
ui: $(UI_FILES)
resources: $(RC_FILES)

$(UI_FILES): ui/%.py: ui/%.ui
pyuic4 -o $@ $<

$(RC_FILES): %.py: %.qrc
pyrcc4 -o $@ $<

$(LN_FILES): i18n/%.qm: i18n/%.ts
lrelease-qt4 $<

clean:
rm -f $(GEN_FILES) *.pyc

compile: $(UI_FILES) $(RC_FILES) $(LN_FILES)

transup:
pylupdate4 -noobsolete $(UI_SOURCES) intersectit.py gui/*.py core/*.py -ts i18n/intersectit_fr.ts

deploy:
mkdir -p $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
cp -rvf * $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)/
243 changes: 0 additions & 243 deletions resources.py

This file was deleted.

Loading

0 comments on commit 1ed2ec0

Please sign in to comment.