-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
139 lines (113 loc) · 6.07 KB
/
Makefile
File metadata and controls
139 lines (113 loc) · 6.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#/**************************************************************************************************************************
# SemiAutomaticClassificationPlugin
# A QGIS plugin
# A plugin which allows for the semi-automatic supervised classification of remote sensing images,
# providing a tool for the region growing of image pixels, creating polygon shapefiles intended for
# the collection of training areas (ROIs), and rapidly performing the classification process (or a preview).
# -------------------
# begin : 2012-12-29
# copyright : (C) 2012-2015 by Luca Congedo
# email : ing.congedoluca@gmail.com
#**************************************************************************************************************************/
#
#/**************************************************************************************************************************
# *
# * This file is part of Semi-Automatic Classification Plugin
# *
# * Semi-Automatic Classification Plugin 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,
# * version 3 of the License.
# *
# * Semi-Automatic Classification Plugin is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# * FITNESS FOR A PARTICULAR PURPOSE.
# * See the GNU General Public License for more details.
# *
# * You should have received a copy of the GNU General Public License along with
# * Semi-Automatic Classification Plugin. If not, see <http://www.gnu.org/licenses/>.
# *
#**************************************************************************************************************************/
# CONFIGURATION
#PLUGIN_UPLOAD = $(CURDIR)/plugin_upload.py
# Makefile for a PyQGIS plugin
# translation
SOURCES = semiautomaticclassificationplugin.py ui/ui_semiautomaticclassificationplugin.py ui/ui_semiautomaticclassificationplugin_dock.py ui/ui_semiautomaticclassificationplugin_scatter_plot.py ui/ui_semiautomaticclassificationplugin_signature_plot.py ui/ui_semiautomaticclassificationplugin_dock_class.py __init__.py ui/semiautomaticclassificationplugindialog.py
TRANSLATIONS = i18n/semiautomaticclassificationplugin_en.ts
#TRANSLATIONS =
# global
PLUGINNAME = SemiAutomaticClassificationPlugin
PY_FILES = semiautomaticclassificationplugin.py ui/semiautomaticclassificationplugindialog.py __init__.py
EXTRAS = semiautomaticclassificationplugin.png
UI_FILES = ui/ui_semiautomaticclassificationplugin.py ui/ui_semiautomaticclassificationplugin_dock.py ui/ui_semiautomaticclassificationplugin_welcome.py ui/ui_semiautomaticclassificationplugin_scatter_plot.py ui/ui_semiautomaticclassificationplugin_signature_plot.py ui/ui_semiautomaticclassificationplugin_dock_class.py
RESOURCE_FILES = ui/resources_rc.py
HELP = help/build/html
default: compile
compile: $(UI_FILES) $(RESOURCE_FILES)
%_rc.py : %.qrc
pyrcc4 -o $*_rc.py $<
%.py : %.ui
pyuic4 -o $@ $<
%.qm : %.ts
lrelease $<
# The deploy target only works on unix like operating system where
# the Python plugin directory is located at:
# $HOME/.qgis2/python/plugins
deploy: compile doc transcompile
mkdir -p $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
cp -vf $(PY_FILES) $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
cp -vf $(UI_FILES) $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
cp -vf $(RESOURCE_FILES) $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
cp -vf $(EXTRAS) $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
# cp -vfr i18n $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
# cp -vfr $(HELP) $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)/help
# The dclean target removes compiled python files from plugin directory
# also delets any .svn entry
dclean:
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "*.directory" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "__0semiautomaticclass.log" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "scene_list.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "LANDSAT_8.csv.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "LANDSAT_ETM.csv.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "LANDSAT_ETM_SLC_OFF.csv.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "LANDSAT_TM-1980-1989.csv.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "LANDSAT_TM-1990-1999.csv.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "LANDSAT_TM-2000-2009.csv.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname "LANDSAT_TM-2010-2012.csv.gz" -delete
find $(HOME)/.qgis2/python/plugins/$(PLUGINNAME) -iname ".svn" -prune -exec rm -Rf {} \;
echo "firstrun" > $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)/firstrun
# The derase deletes deployed plugin
derase:
rm -Rf $(HOME)/.qgis2/python/plugins/$(PLUGINNAME)
# The zip target deploys the plugin and creates a zip file with the deployed
# content. You can then upload the zip file on http://plugins.qgis.org
zip: deploy dclean
rm -f $(PLUGINNAME).zip
cd $(HOME)/.qgis2/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME)
# Create a zip package of the plugin named $(PLUGINNAME).zip.
# This requires use of git (your plugin development directory must be a
# git repository).
# To use, pass a valid commit or tag as follows:
# make package VERSION=Version_0.3.2
package: compile
rm -f $(PLUGINNAME).zip
git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION)
echo "Created package: $(PLUGINNAME).zip"
upload: zip
$(PLUGIN_UPLOAD) $(PLUGINNAME).zip
# transup
# update .ts translation files
transup:
pylupdate4 Makefile
# transcompile
# compile translation files into .qm binary format
transcompile: $(TRANSLATIONS:.ts=.qm)
# transclean
# deletes all .qm files
transclean:
rm -f i18n/*.qm
clean:
rm $(UI_FILES) $(RESOURCE_FILES)
# build documentation with sphinx
doc:
cd help; make html