~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# MODULE:       GRASS Compilation
4
4
# AUTHOR(S):    Original author unknown - probably CERL
5
5
#               Justin Hickey - Thailand - jhickey AT hpcc.nectec.or.th
6
 
#               Markus Neteler - Germany - neteler AT itc.it
7
 
#               Andreas Lange - Germany - Andreas.Lange AT Rhein-Main.de
8
 
#               Radim Blazek - Italy - blazek AT itc.it
 
6
#               Markus Neteler - Germany - neteler AT itc.it
 
7
#               Andreas Lange - Germany - Andreas.Lange AT Rhein-Main.de
 
8
#               Radim Blazek - Italy - blazek AT itc.it
9
9
# PURPOSE:      It provides the commands necessary to compile, install,
10
 
#               clean, and uninstall GRASS
11
 
#               See INSTALL file for explanations.
12
 
# COPYRIGHT:    (C) 2002,2004 by the GRASS Development Team
 
10
#               clean, and uninstall GRASS
 
11
#               See INSTALL file for explanations.
 
12
# COPYRIGHT:    (C) 2002-2012 by the GRASS Development Team
13
13
#
14
14
#               This program is free software under the GNU General Public
15
15
#               License (>=v2). Read the file COPYING that comes with GRASS
19
19
 
20
20
MODULE_TOPDIR = .
21
21
 
22
 
include $(MODULE_TOPDIR)/include/Make/Platform.make
23
 
include $(MODULE_TOPDIR)/include/Make/Grass.make
24
 
 
25
 
# Install directories
26
 
exec_prefix=            ${prefix}
27
 
BINDIR=                 ${UNIX_BIN}
28
 
 
29
 
# Shell commands
30
 
MAKE_DIR_CMD=           mkdir -p -m 755
31
 
 
32
 
SUBDIRS = \
 
22
include $(MODULE_TOPDIR)/include/Make/Dir.make
 
23
include $(MODULE_TOPDIR)/include/Make/Compile.make
 
24
 
 
25
DATE := $(shell date '+%d_%m_%Y')
 
26
 
 
27
DIRS = \
 
28
        demolocation \
33
29
        tools \
 
30
        include \
34
31
        lib \
35
32
        db \
36
33
        display \
37
 
        doc \
38
34
        general \
39
 
        gui \
40
 
        imagery \
41
 
        misc \
42
 
        ps \
43
35
        raster \
44
36
        raster3d \
45
 
        scripts \
46
 
        sites \
47
37
        vector \
 
38
        misc \
 
39
        imagery \
 
40
        ps \
 
41
        scripts \
 
42
        temporal \
 
43
        doc \
 
44
        gui \
48
45
        visualization \
 
46
        locale \
49
47
        man \
50
48
        macosx \
51
49
        mswindows
52
50
 
53
 
ifeq ($(strip $(MINGW)),)
54
 
        SUBDIRS += gem
55
 
endif
56
 
 
57
 
ifneq ($(strip $(HAVE_NLS)),)
58
 
        LOCALE=1
59
 
else
60
 
        LOCALE=0
61
 
endif
62
 
 
63
 
FILES = AUTHORS COPYING CHANGES REQUIREMENTS.html GPL.TXT contributors.csv  contributors_extra.csv  translators.csv
64
 
 
65
 
BIN_DIST_FILES = $(FILES) \
66
 
        grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp \
67
 
        bin \
68
 
        bwidget \
69
 
        docs \
70
 
        driver \
71
 
        etc \
72
 
        fonts \
73
 
        include \
74
 
        lib \
75
 
        man \
76
 
        scripts \
77
 
        tools
78
 
 
79
 
DOXNAME=grass
80
 
 
81
 
include $(MODULE_TOPDIR)/include/Make/Docs.make
82
 
include $(MODULE_TOPDIR)/include/Make/Doxygen.make
83
 
 
84
 
default: builddemolocation
85
 
        @echo "GRASS GIS compilation log"     > $(ERRORLOG)
86
 
        @echo "-------------------------"    >> $(ERRORLOG)
87
 
        @echo "Started compilation: `date`"  >> $(ERRORLOG)
88
 
        @echo "--"                           >> $(ERRORLOG)
89
 
        @echo "Errors in:"                   >> $(ERRORLOG)
90
 
        chmod 755 install-sh
91
 
        @list='$(SUBDIRS)'; \
92
 
        for subdir in $$list; do \
93
 
                $(MAKE) -C $$subdir; \
94
 
        done
95
 
        $(MAKE) manifests 
96
 
        if [ ${LOCALE} -eq 1 ] ; then $(MAKE) -C locale; fi
97
 
        -cp -f $(FILES) ${ARCH_DISTDIR}/
98
 
        -cp -f ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} ${ARCH_DISTDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp
99
 
        @test -d ${ARCH_DISTDIR}/tools/ || mkdir -p ${ARCH_DISTDIR}/tools/
100
 
        -${INSTALL} tools/mkhtml.sh ${ARCH_DISTDIR}/tools/ 2>/dev/null
101
 
        @if test -d ${ARCH_DISTDIR}/tools/g.html2man/; then rm -rf ${ARCH_DISTDIR}/tools/g.html2man/; fi
102
 
        -${INSTALL} tools/g.html2man/g.html2man ${ARCH_DISTDIR}/tools/ 2>/dev/null
103
 
        -sed -e 's+tools/g.html2man/g.html2man+tools/g.html2man+' \
104
 
                include/Make/Man.make > ${ARCH_DISTDIR}/include/Make/Man.make
105
 
        @(cd tools ; sh -c "./build_html_index.sh")
106
 
        @if [ `cat "$(ERRORLOG)" | wc -l` -gt 5 ] ; then \
 
51
SUBDIRS = $(DIRS)
 
52
 
 
53
FILES = AUTHORS COPYING CHANGES REQUIREMENTS.html GPL.TXT contributors.csv contributors_extra.csv translators.csv
 
54
FILES_DST = $(patsubst %,$(ARCH_DISTDIR)/%,$(FILES))
 
55
 
 
56
default:
 
57
        @echo "GRASS GIS $(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR).$(GRASS_VERSION_RELEASE) r$(GRASS_VERSION_SVN) compilation log" \
 
58
                > $(ERRORLOG)
 
59
        @echo "--------------------------------------------------" >> $(ERRORLOG)
 
60
        @echo "Started compilation: `date`"                        >> $(ERRORLOG)
 
61
        @echo "--"                                                 >> $(ERRORLOG)
 
62
        @echo "Errors in:"                                         >> $(ERRORLOG)
 
63
        -$(CHMOD) 755 install-sh
 
64
        $(MAKE) subdirs
 
65
        $(MAKE) $(FILES_DST)
 
66
        $(MAKE) manifests
 
67
        @if [ `wc -l < "$(ERRORLOG)"` -gt 5 ] ; then \
107
68
                echo "--"     >> $(ERRORLOG) ; \
108
69
                echo "In case of errors please change into the directory with error and run 'make'." >> $(ERRORLOG) ; \
109
70
                echo "If you get multiple errors, you need to deal with them in the order they"      >> $(ERRORLOG) ; \
115
76
        @echo "--"  >> $(ERRORLOG)
116
77
        @echo "Finished compilation: `date`" >> $(ERRORLOG)
117
78
        @cat $(ERRORLOG)
118
 
        @if [ `cat "$(ERRORLOG)" | wc -l` -gt 8 ] ; then false ; else true ; fi
 
79
        @if [ `wc -l < "$(ERRORLOG)"` -gt 8 ] ; then false ; else true ; fi
119
80
 
120
81
manifests:
121
 
ifneq ($(strip $(MINGW)),)
 
82
ifeq ($(MANIFEST),external)
122
83
        find $(ARCH_DISTDIR) -type f -name '*.exe' | \
123
84
        while read file ; do \
124
 
            cmd=`basename "$$file" .exe` ; \
125
 
            sed "s/@CMD@/$$cmd/" mswindows/generic.manifest > "$$file".manifest ; \
 
85
            $(MAKE) "$$file".manifest ; \
126
86
        done
127
87
endif
128
88
 
 
89
$(ARCH_DISTDIR)/%: %
 
90
        $(INSTALL_DATA) $< $@
 
91
 
129
92
LIBDIRS = \
130
93
        lib/external/shapelib \
131
94
        lib/datetime \
132
95
        lib/gis \
133
96
        lib/linkm \
134
97
        lib/db \
135
 
        lib/form \
136
98
        lib/vector \
137
99
        db/drivers
138
100
 
139
101
# Compile libraries only
140
102
libs:
141
 
        make -C lib/ headers
142
 
        @list='$(LIBDIRS)'; \
143
 
        for subdir in $$list; do \
144
 
                $(MAKE) -C $$subdir; \
145
 
        done
146
 
        -cp -f $(FILES) ${ARCH_DISTDIR}/
147
 
        -cp -fr --parents include ${ARCH_DISTDIR}/
148
 
 
149
 
#we leave this target for a while so that people can easily upgrade (11/2004):
150
 
mix:
151
 
        @echo "NOTE: 'make mix' is no longer needed (changed 9 Nov 2004)"
152
 
 
153
 
mixclean:
154
 
        list='$(SUBDIRS)'; \
155
 
        find include -type l -exec rm {} \; 2>/dev/null; \
156
 
        for subdir in $$list; do \
157
 
                find $$subdir -type l -exec rm {} \; 2>/dev/null; \
158
 
        done
159
 
        -rm -f MIX 
160
 
 
161
 
# Any target that has a dependency on this target will be forced to be made.
162
 
# If we switch to GNU Make then this feature can be replaced with .PHONY
163
 
FORCE:
 
103
        $(MAKE) -C include
 
104
        $(MAKE) subdirs SUBDIRS=$(LIBDIRS)
 
105
        $(MAKE) $(FILES_DST)
164
106
 
165
107
cleandistdirs: 
166
 
        -rm -rf ${ARCH_DISTDIR}/bin/         2>/dev/null
167
 
        -rm -rf ${ARCH_DISTDIR}/bwidget/     2>/dev/null
168
 
        -rm -rf ${ARCH_DISTDIR}/docs/        2>/dev/null
169
 
        -rm -rf ${ARCH_DISTDIR}/driver/      2>/dev/null
170
 
        -rm -rf ${ARCH_DISTDIR}/etc/         2>/dev/null
171
 
        -rm -rf ${ARCH_DISTDIR}/fonts/       2>/dev/null
172
 
        -rm -rf ${ARCH_DISTDIR}/include/     2>/dev/null
173
 
        -rm -rf ${ARCH_DISTDIR}/lib/         2>/dev/null
174
 
        -rm -rf ${ARCH_DISTDIR}/locale/      2>/dev/null
175
 
        -rm -rf ${ARCH_DISTDIR}/man/         2>/dev/null
176
 
        -rm -rf ${ARCH_DISTDIR}/scripts/     2>/dev/null
177
 
        -rm -rf ${ARCH_DISTDIR}/demolocation/ 2>/dev/null
178
 
        -rm -rf ${ARCH_DISTDIR}/tcltkgrass/  2>/dev/null
179
 
        -rm -rf ${ARCH_DISTDIR}/tools/       2>/dev/null
180
 
        -rm -f ${ARCH_DISTDIR}/AUTHORS ${ARCH_DISTDIR}/CHANGES ${ARCH_DISTDIR}/REQUIREMENTS.html ${ARCH_DISTDIR}/COPYING ${ARCH_DISTDIR}/GPL.TXT \
181
 
                ${ARCH_DISTDIR}/contributors.csv ${ARCH_DISTDIR}/contributors_extra.csv  ${ARCH_DISTDIR}/translators.csv \
182
 
                ${ARCH_DISTDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp 2>/dev/null
183
 
        -rmdir ${ARCH_DISTDIR}
184
 
        -rm -f ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} 2>/dev/null
185
 
        -rm -f ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.bat 2>/dev/null
186
 
        -rmdir ${ARCH_BINDIR}
 
108
        -rm -rf $(ARCH_DISTDIR)
 
109
        -rm -rf $(ARCH_BINDIR)
187
110
 
188
111
# Clean out the strings extracted from scripts for translation
189
112
cleanscriptstrings:
190
113
        rm -f locale/scriptstrings/*.c 2>/dev/null
191
114
 
192
115
clean: cleandistdirs cleanscriptstrings cleandocs
193
 
        @list='$(SUBDIRS)'; \
194
 
        for subdir in $$list; do \
195
 
                $(MAKE) -C $$subdir clean; \
196
 
        done
197
116
 
198
117
libsclean: cleandistdirs
199
 
        @list='$(LIBDIRS)'; \
200
 
        for subdir in $$list; do \
201
 
                $(MAKE) -C $$subdir clean; \
202
 
        done
 
118
        $(MAKE) clean-recursive SUBDIRS=$(LIBDIRS)
203
119
 
204
120
distclean: clean
205
 
        -rm -f config.cache config.log config.status config.status.${ARCH} 2>/dev/null
 
121
        -rm -f config.cache config.log config.status config.status.$(ARCH) 2>/dev/null
206
122
        -rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
207
 
        -rm -f include/config.h include/version.h include/winname.h include/Make/Grass.make 2>/dev/null
 
123
        -rm -f include/config.h include/version.h
208
124
        -rm -f include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex 2>/dev/null
209
125
 
210
 
strip: FORCE
211
 
        @ if [ ! -f ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} ] ; then \
212
 
                echo "ERROR: GRASS has not been compiled. Try \"make\" first."; \
213
 
                echo "  Strip aborted, exiting Make."; \
214
 
                exit; \
215
 
        fi; \
216
 
        cd ${ARCH_DISTDIR} ; find . -type f -perm +111 -exec strip {} \;
217
 
 
218
 
install: FORCE
219
 
        @ # The following action MUST be a single action. That is, all lines
220
 
        @ # except the last line must have a backslash (\) at the end to
221
 
        @ # continue the statement. The reason for this is that Make does not
222
 
        @ # have an exit command thus, exit terminates the shell. However, 
223
 
        @ # Make creates a new shell for each action listed for a target.
224
 
        @ # Therefore, the only way exit will quit Make is if there is only
225
 
        @ # a single action for the target.
226
 
        @ # Check if grass has been compiled, if INST_DIR is writable, and if
227
 
        @ # grass is part of INST_DIR
228
 
        echo ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
229
 
        @ if [ ! -f ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} ] ; then \
230
 
                echo "ERROR: GRASS has not been compiled. Try \"make\" first."; \
231
 
                echo "  Installation aborted, exiting Make."; \
232
 
                exit; \
233
 
        fi; \
234
 
        if [ "${MACOSX_APP}" = "1" ] ; then \
235
 
                ${MAKE} install-macosx; \
236
 
                exit; \
237
 
        fi; \
238
 
        INST_PATH=`dirname ${INST_DIR}`; \
239
 
        while [ ! -d $$INST_PATH ]; do \
240
 
                INST_PATH=`dirname $$INST_PATH`; \
241
 
        done; \
242
 
        if [ ! -d "${INST_DIR}" -a ! -w "$$INST_PATH" ] ; then \
243
 
                echo "ERROR: Directory $$INST_PATH is a parent directory of your"; \
244
 
                echo "  install directory ${INST_DIR} and is not writable."; \
245
 
                echo "  Perhaps you need root access."; \
246
 
                echo "  Installation aborted, exiting Make."; \
247
 
                exit; \
248
 
        fi; \
249
 
        if [ -d ${INST_DIR} -a ! -w "${INST_DIR}" ] ; then \
250
 
                echo "ERROR: Your install directory ${INST_DIR} is not writable."; \
251
 
                echo "  Perhaps you need root access."; \
252
 
                echo "  Installation aborted, exiting Make."; \
253
 
                exit; \
254
 
        fi; \
255
 
        result=`echo "${INST_DIR}" | awk '{ if ($$1 ~ /grass/) print $$1 }'`; \
256
 
        if [ "$$result" = "" ] ; then \
257
 
                echo "WARNING: Your install directory ${INST_DIR}"; \
258
 
                echo "  does not contain the word 'grass'."; \
259
 
                echo "  It is highly recommended that the word 'grass' be part"; \
260
 
                echo "  of your install directory to avoid conflicts."; \
261
 
                echo "  Do you want to continue? [y/n]"; \
262
 
                read ans; \
263
 
                ans=`echo "$$ans" | tr A-Z a-z`; \
264
 
                if [ "$$ans" != "y" ] ; then \
265
 
                        echo "Installation aborted, exiting Make."; \
266
 
                        exit; \
267
 
                fi; \
268
 
        fi; \
269
 
        ${MAKE} real-install
270
 
 
271
 
real-install: FORCE
272
 
        test -d ${INST_DIR} || ${MAKE_DIR_CMD} ${INST_DIR}
273
 
        @##### test -d ${INST_DIR}/dev || ${MAKE_DIR_CMD} ${INST_DIR}/dev
274
 
        test -d ${BINDIR} || ${MAKE_DIR_CMD} ${BINDIR}
275
 
        -sed -e "s#GISBASE=.*#GISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
276
 
        -chmod a+x ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
277
 
        -cd ${GISBASE} ; tar cBf - $(FILES) | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
278
 
        -cd ${GISBASE} ; tar cBf - bin | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
279
 
        -cd ${GISBASE} ; tar cBf - bwidget | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
280
 
        -cd ${GISBASE} ; tar cBf - docs | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
281
 
        -cd ${GISBASE} ; tar cBf - driver | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
282
 
        -cd ${GISBASE} ; tar cBf - etc | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
283
 
        -cd ${GISBASE} ; tar cBf - fonts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
284
 
ifeq ($(strip $(MINGW)),)
285
 
        -cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
286
 
endif
287
 
        -cd ${GISBASE} ; tar cBf - scripts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
288
 
        -cd ${GISBASE} ; tar cBf - tools | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
289
 
        if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null ; fi
290
 
        @ # The man, include, and lib could go to ${PREFIX}/ BUT if this is
291
 
        @ # done, then the corresponding uninstall instructions must delete
292
 
        @ # the grass files BY FILENAME NOT DIRECTORY!! Otherwise there is a
293
 
        @ # high risk of deleteing system files since PREFIX is defined by
294
 
        @ # default to be /usr/local
295
 
        @##### -cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
296
 
        -cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
297
 
        -sed -e "s#^\(GRASS_HOME.[^=]*\).*#\1= ${INST_DIR}#" \
298
 
                -e "s#^\(RUN_GISBASE.[^=]*\).*#\1= ${INST_DIR}#" \
299
 
                ${GISBASE}/include/Make/Platform.make > ${INST_DIR}/include/Make/Platform.make
300
 
        -sed -e "s#^\(ARCH_DISTDIR.[^=]*\).*#\1= ${INST_DIR}#" \
301
 
                -e "s#^\(ARCH_BINDIR.[^=]*\).*#\1= ${UNIX_BIN}#" \
302
 
                ${GISBASE}/include/Make/Grass.make > ${INST_DIR}/include/Make/Grass.make
303
 
        -cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
304
 
        -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/monitorcap > ${INST_DIR}/etc/monitorcap
305
 
        -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/fontcap > ${INST_DIR}/etc/fontcap
306
 
        @##### -chmod -R 1777 ${INST_DIR}/locks 2>/dev/null
307
 
        -chmod -R a+rX ${INST_DIR} 2>/dev/null
308
 
ifeq ($(strip $(MINGW)),)
309
 
        @#GEM installation
310
 
        -tar cBf - gem/skeleton | (cd ${INST_DIR}/etc ; tar xBf - ) 2>/dev/null
311
 
        -${INSTALL} gem/gem$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR) ${BINDIR} 2>/dev/null
312
 
endif
313
 
        @# enable OSX Help Viewer
314
 
        @if [ "`cat include/Make/Platform.make | grep -i '^ARCH.*darwin'`" ] ; then /bin/ln -sfh "${INST_DIR}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR} ; fi
315
 
 
316
 
 
317
 
install-strip: FORCE
318
 
        ${MAKE} strip
319
 
        ${MAKE} install
320
 
 
321
 
install-macosx: FORCE
322
 
        ${MAKE} -C macosx install-macosx
323
 
 
324
 
bindist:  
325
 
        if [ "${MACOSX_APP}" = "1" ] ; then \
326
 
                ${MAKE} bindist-macosx; \
327
 
                exit; \
328
 
        fi; \
329
 
        ${MAKE} real-bindist
330
 
 
331
 
real-bindist:
332
 
        mkdir -p ${ARCH_DISTDIR}/etc/nad/src ; \
333
 
            cp -f ${MODULE_TOPDIR}/lib/proj/*.lla ${ARCH_DISTDIR}/etc/nad/src ; true
334
 
        ( date=`date '+%d_%m_%Y'`; cd ${ARCH_DISTDIR}; tar cBf - ${BIN_DIST_FILES} | gzip -fc > ../grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}-${ARCH}-$$date.tar.gz)
335
 
        -date=`date '+%d_%m_%Y'`; name=grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}-${ARCH}-$$date.tar.gz; \
336
 
            size=`ls -l $$name | awk '{print $$5}'`; \
337
 
            sed -e "s/BIN_DIST_VERSION/${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}-${ARCH}-$$date/" \
338
 
            -e "s/GRASSPRG_NAME/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}/" \
339
 
            -e "s/SIZE_TAR_FILE/$$size/" -e "s#BIN_DIST_DIR#'${INST_DIR}'#" \
340
 
            -e "s/ARCHITECTURE/${ARCH}/" \
341
 
            -e "s/LD_LIBRARY_PATH_VAR/${LD_LIBRARY_PATH_VAR}/" \
342
 
            -e "s/TEST_STR=/TEST_STR=executable/" \
343
 
            -e "s#IMPORTANT.*#Generated from the binaryInstall.src file using the command make bindist#" \
344
 
            -e "s/# executable shell.*//" -e "s/# make bindist.*//" \
345
 
            binaryInstall.src > grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}-${ARCH}-$$date-install.sh ; \
346
 
            chmod a+x grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}-${ARCH}-$$date-install.sh 2>/dev/null
347
 
 
348
 
bindist-macosx:
349
 
        ${MAKE} -C macosx bindist-macosx
350
 
 
351
 
# make a source package for distribution:
352
 
srcdist: FORCE distclean
353
 
        -${MAKE_DIR_CMD} ./grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
354
 
 
355
 
        @ # needed to store code in package with grass-version path:
356
 
        -mv * ./grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
357
 
        @ # do not include the debian control files:
358
 
        -mv ./grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}/debian .
359
 
        @ #we use -h to get the linked files into as real files:
360
 
        tar cvfzh grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}.tar.gz ./grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}/* --exclude=CVS
361
 
        @ # restore src code location:
362
 
        -mv ./grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}/* .
363
 
        -rmdir ./grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
364
 
        @ echo "Distribution source package: grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}.tar.gz ready. Calculating MD5 sum..."
365
 
        md5sum grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}.tar.gz > grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}.md5sum
366
 
 
367
 
# make a source package for library distribution:
368
 
srclibsdist: FORCE distclean
369
 
        -${MAKE_DIR_CMD} ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
370
 
 
371
 
        @ # needed to store code in package with grass-version path:
372
 
        -cp -L * ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
373
 
        -cp -rL tools ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
374
 
        -cp -rL include ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
375
 
        -cp -rL --parents lib/external/shapelib ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
376
 
        -cp -rL --parents lib/datetime ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
377
 
        -cp -rL --parents lib/db ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
378
 
        -cp -rL --parents lib/gis ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
379
 
        -cp -rL --parents lib/linkm ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
380
 
        -cp -rL --parents lib/form ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
381
 
        -cp -rL --parents lib/vector ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
382
 
 
383
 
        -cp -rL --parents db/drivers ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
384
 
 
385
 
        tar chvfz grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}.tar.gz ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}/* --exclude=CVS
386
 
        -rm -r ./grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}
387
 
        @ echo "Distribution source package: grass-lib-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}.tar.gz ready."
388
 
 
389
 
builddemolocation:
390
 
        test -d ${ARCH_DISTDIR} || ${MAKE_DIR_CMD} ${ARCH_DISTDIR}
391
 
        -tar cBf - demolocation | (cd ${ARCH_DISTDIR}/ ; tar xBfo - ) 2>/dev/null
392
 
        -(cd ${ARCH_DISTDIR}/demolocation ; \
393
 
                rm -rf ".svn" ; \
394
 
                rm -rf "PERMANENT/.svn" ; \
395
 
                rm -rf "PERMANENT/vector/.svn" ; \
396
 
                rm -rf "PERMANENT/vector/mysites/.svn" ; \
397
 
                rm -rf "PERMANENT/vector/point/.svn" ; \
398
 
                rm -rf "PERMANENT/dbf/.svn" )
399
 
        @ echo "GISDBASE: ${RUN_GISBASE}" > ${RUN_GISRC}
400
 
        @ echo "LOCATION_NAME: demolocation" >> ${RUN_GISRC}
401
 
        @ echo "MAPSET: PERMANENT" >> ${RUN_GISRC}
402
 
        @ echo "GRASS_DB_ENCODING: utf-8" >> ${RUN_GISRC}
403
 
        @ echo "DEBUG: 0" >> ${RUN_GISRC}
404
 
        @ echo "GRASS_GUI: text" >> ${RUN_GISRC}
 
126
include $(MODULE_TOPDIR)/include/Make/Install.make
 
127
include $(MODULE_TOPDIR)/include/Make/Docs.make
 
128
include $(MODULE_TOPDIR)/include/Make/Doxygen.make
 
129
include $(MODULE_TOPDIR)/include/Make/Sphinx.make
 
130
 
 
131
DOXNAME=grass
 
132
 
 
133
.PHONY: default libs
 
134
.PHONY: cleandistdirs cleanscriptstrings clean libsclean distclean