While these variables are not yet used by the Makefile, to be used
CFG_PREFIX must be stripped from them. The 'make install' rule creates
a tarball and then the install.sh script extracts it relative to the
prefix argument --prefix, which in the case of a Cargo install is
relative to CFG_PREFIX. This is why CFG_PREFIX needs to be stripped out
of CFG_DATADIR, CFG_MANDIR, CFG_INFODIR, and CFG_LIBDIR.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
+# strip CFG_PREFIX from variables used for installation so that
+# install.sh's --prefix value can be used instead
+CFG_DATADIR=${CFG_DATADIR#${CFG_PREFIX}}
+CFG_INFODIR=${CFG_INFODIR#${CFG_PREFIX}}
+CFG_MANDIR=${CFG_MANDIR#${CFG_PREFIX}}
+CFG_LIBDIR=${CFG_LIBDIR#${CFG_PREFIX}}
+
# copy host-triples to target-triples so that hosts are a subset of targets
V_TEMP=""
for i in $CFG_HOST $CFG_TARGET;