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
|
#############################################################################
#
# MODULE: GRASS Compilation
# AUTHOR(S): Original author unknown - probably CERL
# Justin Hickey - Thailand - jhickey AT hpcc.nectec.or.th
# Markus Neteler - Germany - neteler AT itc.it
# Andreas Lange - Germany - Andreas.Lange AT Rhein-Main.de
# Radim Blazek - Italy - blazek AT itc.it
# PURPOSE: It provides the commands necessary to compile, install,
# clean, and uninstall GRASS
# See INSTALL.md file for usage.
# COPYRIGHT: (C) 2002-2025 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
# for details.
#
#############################################################################
MODULE_TOPDIR = .
include $(MODULE_TOPDIR)/include/Make/Dir.make
include $(MODULE_TOPDIR)/include/Make/Compile.make
DATE := $(shell date '+%d_%m_%Y')
DIRS = \
demolocation \
utils \
include \
lib \
python \
db \
display \
general \
raster \
raster3d \
vector \
misc \
imagery \
ps \
scripts \
temporal \
doc \
gui \
visualization \
locale \
man \
macosx \
mswindows
SUBDIRS = $(DIRS)
FILES = AUTHORS CITING COPYING GPL.TXT INSTALL.md REQUIREMENTS.md contributors.csv contributors_extra.csv translators.csv
FILES_DST = $(patsubst %,$(ARCH_DISTDIR)/%,$(FILES))
default:
@echo "GRASS GIS $(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR).$(GRASS_VERSION_RELEASE) $(GRASS_VERSION_GIT) compilation log" \
> $(ERRORLOG)
@echo "--------------------------------------------------" >> $(ERRORLOG)
@echo "Started compilation: `date`" >> $(ERRORLOG)
@echo "--" >> $(ERRORLOG)
@echo "Errors in:" >> $(ERRORLOG)
-$(CHMOD) 755 install-sh
$(MAKE) subdirs
$(MAKE) $(FILES_DST)
$(MAKE) manifests
@if [ `wc -l < "$(ERRORLOG)"` -gt 5 ] ; then \
echo "--" >> $(ERRORLOG) ; \
echo "In case of errors please change into the directory with error and run 'make'." >> $(ERRORLOG) ; \
echo "If you get multiple errors, you need to deal with them in the order they" >> $(ERRORLOG) ; \
echo "appear in the error log. If you get an error building a library, you will" >> $(ERRORLOG) ; \
echo "also get errors from anything which uses the library." >> $(ERRORLOG) ; \
else \
echo "No errors detected." >> $(ERRORLOG) ; \
fi
@echo "--" >> $(ERRORLOG)
@echo "Finished compilation: `date`" >> $(ERRORLOG)
@cat $(ERRORLOG)
@if [ `wc -l < "$(ERRORLOG)"` -gt 8 ] ; then false ; else true ; fi
manifests:
ifeq ($(MANIFEST),external)
find $(ARCH_DISTDIR) -type f -name '*.exe' | \
while read file ; do \
$(MAKE) "$$file".manifest ; \
done
endif
$(ARCH_DISTDIR)/%: %
$(INSTALL_DATA) $< $@
LIBDIRS = \
lib/external/parson \
lib/external/shapelib \
lib/datetime \
lib/gis \
lib/linkm \
lib/db \
lib/vector \
db/drivers \
python
# Compile libraries only
libs:
$(MAKE) -C include
$(MAKE) subdirs SUBDIRS=$(LIBDIRS)
$(MAKE) $(FILES_DST)
cleandistdirs:
-rm -rf $(ARCH_DISTDIR)
-rm -rf $(ARCH_BINDIR)
# Clean out the strings extracted from scripts for translation
cleanscriptstrings:
rm -f locale/scriptstrings/*.c 2>/dev/null
clean: cleandistdirs cleanscriptstrings cleandocs
libsclean: cleandistdirs
$(MAKE) clean-recursive SUBDIRS=$(LIBDIRS)
distclean: clean
-rm -f config.cache config.log config.status config.status.$(ARCH) 2>/dev/null
-rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
-rm -f include/grass/config.h include/grass/version.h
-rm -f include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex 2>/dev/null
include $(MODULE_TOPDIR)/include/Make/Install.make
include $(MODULE_TOPDIR)/include/Make/Docs.make
include $(MODULE_TOPDIR)/include/Make/Doxygen.make
include $(MODULE_TOPDIR)/include/Make/Sphinx.make
DOXNAME=grass
.PHONY: default libs
.PHONY: cleandistdirs cleanscriptstrings clean libsclean distclean
|