/usr/lib/grass70/include/Make/Install.make is in grass-dev 7.0.3-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | # This should be "include"d from the top-level Makefile, and nowhere else
BIN_DIST_FILES = $(FILES) \
$(GRASS_NAME).tmp \
bin \
demolocation \
docs \
driver \
etc \
fonts \
gui \
include \
lib \
locale \
scripts \
tools \
share
# Shell commands
MAKE_DIR_CMD = $(MKDIR) -m 755
strip: strip-check
find $(ARCH_DISTDIR) -type f -perm +111 -print0 | xargs -0 strip
strip-check:
@ if [ ! -f "$(ARCH_BINDIR)/$(GRASS_NAME)" ] ; then \
echo "ERROR: GRASS has not been compiled. Try \"make\" first." >&2 ; \
echo " Strip aborted, exiting Make." >&2 ; \
exit 1; \
fi
install:
@ echo $(ARCH_BINDIR)/$(GRASS_NAME)
$(MAKE) install-check-built
ifeq ($(strip $(MACOSX_APP)),1)
$(MAKE) install-macosx
else
$(MAKE) install-check-parent
$(MAKE) install-check-writable
$(MAKE) install-check-prefix
$(MAKE) real-install
endif
install-check-built:
@ if [ ! -f "$(ARCH_BINDIR)/$(GRASS_NAME)" ] ; then \
echo "ERROR: GRASS has not been compiled. Try \"make\" first."; \
echo " Installation aborted, exiting Make."; \
exit; \
fi
install-check-parent:
@ INST_PATH=`dirname $(INST_DIR)`; \
while [ ! -d "$$INST_PATH" ]; do \
INST_PATH=`dirname $$INST_PATH`; \
done; \
if [ ! -d "$(INST_DIR)" -a ! -w "$$INST_PATH" ] ; then \
echo "ERROR: Directory $$INST_PATH is a parent directory of your" >&2 ; \
echo " install directory $(INST_DIR) and is not writable." >&2 ; \
echo " Perhaps you need root access." >&2 ; \
echo " Installation aborted, exiting Make." >&2 ; \
exit 1; \
fi
install-check-writable:
@ if [ -d "$(INST_DIR)" -a ! -w "$(INST_DIR)" ] ; then \
echo "ERROR: Your install directory $(INST_DIR) is not writable." >&2 ; \
echo " Perhaps you need root access." >&2 ; \
echo " Installation aborted, exiting Make." >&2 ; \
exit 1; \
fi
install-check-prefix:
@ result=`echo "$(INST_DIR)" | awk '{ if ($$1 ~ /grass/) print $$1 }'`; \
if [ "$$result" = "" ] ; then \
echo "WARNING: Your install directory $(INST_DIR)" >&2 ; \
echo " does not contain the word 'grass'." >&2 ; \
echo " It is highly recommended that the word 'grass' be part" >&2 ; \
echo " of your install directory to avoid conflicts." >&2 ; \
echo " Do you want to continue? [y/n]" >&2 ; \
read ans; \
if [ "$$ans" != "y" -a "$$ans" != "Y" ] ; then \
echo "Installation aborted, exiting Make." >&2 ; \
exit 1; \
fi; \
fi
ifneq ($(strip $(MINGW)),)
STARTUP = $(INST_DIR)/etc/$(GRASS_NAME).py
else
STARTUP = $(UNIX_BIN)/$(GRASS_NAME)
endif
FONTCAP = etc/fontcap
TMPGISRC = demolocation/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
PLATMAKE = include/Make/Platform.make
GRASSMAKE = include/Make/Grass.make
real-install: | $(INST_DIR) $(UNIX_BIN)
-tar cBCf $(GISBASE) - . | tar xBCf $(INST_DIR) - 2>/dev/null
-rm $(INST_DIR)/$(GRASS_NAME).tmp
$(MAKE) $(STARTUP)
-rm $(INST_DIR)/$(FONTCAP)
$(MAKE) $(INST_DIR)/$(FONTCAP)
-rm $(INST_DIR)/$(TMPGISRC)
$(MAKE) $(INST_DIR)/$(TMPGISRC)
-rm $(INST_DIR)/$(PLATMAKE)
$(MAKE) $(INST_DIR)/$(PLATMAKE)
-rm $(INST_DIR)/$(GRASSMAKE)
$(MAKE) $(INST_DIR)/$(GRASSMAKE)
-$(INSTALL) config.status $(INST_DIR)/config.status
-$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null
ifneq ($(findstring darwin,$(ARCH)),)
@# enable OSX Help Viewer
@/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
endif
$(INST_DIR) $(UNIX_BIN):
$(MAKE_DIR_CMD) $@
$(STARTUP): $(ARCH_DISTDIR)/$(GRASS_NAME).tmp
sed -e 's#'@GISBASE@'#'$(INST_DIR)'#g' \
-e 's#'@LD_LIBRARY_PATH_VAR@'#'$(LD_LIBRARY_PATH_VAR)'#g' \
-e 's#'@CONFIG_PROJSHARE@'#'$(PROJSHARE)'#g' \
$< > $@
-$(CHMOD) a+x $@
define fix_gisbase
sed -e 's#$(GISBASE)#$(INST_DIR)#g' $< > $@
endef
define fix_grass_home
sed -e 's#^\(GRASS_HOME.[^=]*\).*#\1= $(INST_DIR)#g' \
-e 's#$(GISBASE)#$(INST_DIR)#g' $< > $@
endef
define fix_grass_arch
sed -e 's#^\(ARCH_DISTDIR.[^=]*\).*#\1= $(INST_DIR)#g' \
-e 's#^\(ARCH_BINDIR.[^=]*\).*#\1= $(UNIX_BIN)#g' $< > $@
endef
$(INST_DIR)/$(FONTCAP): $(GISBASE)/$(FONTCAP)
$(call fix_gisbase)
$(INST_DIR)/$(TMPGISRC): $(GISBASE)/$(TMPGISRC)
$(call fix_gisbase)
$(INST_DIR)/$(PLATMAKE): $(GISBASE)/$(PLATMAKE)
$(call fix_grass_home)
$(INST_DIR)/$(GRASSMAKE): $(GISBASE)/$(GRASSMAKE)
$(call fix_grass_arch)
install-macosx:
$(MAKE) -C macosx install-macosx
install-strip:
$(MAKE) strip
$(MAKE) install
bindist:
ifeq ($(strip $(MACOSX_APP)),1)
$(MAKE) bindist-macosx
else
$(MAKE) real-bindist
endif
BINDISTNAME = grass-$(GRASS_VERSION_NUMBER)-$(ARCH)-$(DATE)
real-bindist:
-tar cCBf $(ARCH_DISTDIR) - $(BIN_DIST_FILES) | gzip -fc > $(BINDISTNAME).tar.gz
-size=`ls -l $(BINDISTNAME).tar.gz | awk '{print $$5}'`; \
sed -e "s/BIN_DIST_VERSION/$(GRASS_VERSION_NUMBER)-$(ARCH)-$(DATE)/" \
-e "s/GRASSPRG_NAME/$(GRASS_NAME)/" \
-e "s/SIZE_TAR_FILE/$$size/" -e "s#BIN_DIST_DIR#'$(INST_DIR)'#" \
-e "s/ARCHITECTURE/$(ARCH)/" \
-e "s/LD_LIBRARY_PATH_VAR/$(LD_LIBRARY_PATH_VAR)/" \
-e "s/TEST_STR=/TEST_STR=executable/" \
-e "s#IMPORTANT.*#Generated from the binaryInstall.src file using the command make bindist#" \
-e "s/# executable shell.*//" -e "s/# make bindist.*//" \
binaryInstall.src > $(BINDISTNAME)-install.sh ; \
chmod a+x $(BINDISTNAME)-install.sh 2>/dev/null
bindist-macosx:
$(MAKE) -C macosx bindist-macosx
# make a source package for distribution:
srcdist: distclean
-$(MAKE_DIR_CMD) ./grass-$(GRASS_VERSION_NUMBER)
@ # needed to store code in package with grass-version path:
-mv * ./grass-$(GRASS_VERSION_NUMBER)
@ # do not include the debian control files:
-mv ./grass-$(GRASS_VERSION_NUMBER)/debian .
@ #we use -h to get the linked files into as real files:
tar cvfzh grass-$(GRASS_VERSION_NUMBER).tar.gz ./grass-$(GRASS_VERSION_NUMBER)/* --exclude=.svn
@ # restore src code location:
-mv ./grass-$(GRASS_VERSION_NUMBER)/* .
-rmdir ./grass-$(GRASS_VERSION_NUMBER)
@ echo "Distribution source package: grass-$(GRASS_VERSION_NUMBER).tar.gz ready. Calculating MD5 sum..."
md5sum grass-$(GRASS_VERSION_NUMBER).tar.gz > grass-$(GRASS_VERSION_NUMBER).md5sum
# make a source package for library distribution:
srclibsdist: distclean
-$(MAKE_DIR_CMD) ./grass-lib-$(GRASS_VERSION_NUMBER)
@ # needed to store code in package with grass-version path:
-cp -L * ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL tools ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL demolocation ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL include ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/external/shapelib ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/external/bwidget ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/datetime ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/db ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/gis ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/linkm ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/form ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/vector ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents db/drivers ./grass-lib-$(GRASS_VERSION_NUMBER)
tar chvfz grass-lib-$(GRASS_VERSION_NUMBER).tar.gz ./grass-lib-$(GRASS_VERSION_NUMBER)/* --exclude=CVS
-rm -r ./grass-lib-$(GRASS_VERSION_NUMBER)
@ echo "Distribution source package: grass-lib-$(GRASS_VERSION_NUMBER).tar.gz ready."
.PHONY: strip strip-check
.PHONY: install-check-built install-check-parent install-check-writable install-check-prefix
.PHONY: install real-install install-strip install-macosx
.PHONY: bindist real-bindist bindist-macosx srcdist srclibsdist
|