]> git.proxmox.com Git - cargo.git/commitdiff
build: strip CFG_PREFIX from CFG_{DATADIR,MANDIR,INFODIR,LIBDIR}
authorDoug Goldstein <cardoe@cardoe.com>
Tue, 28 Jun 2016 21:27:25 +0000 (16:27 -0500)
committerDoug Goldstein <cardoe@cardoe.com>
Wed, 29 Jun 2016 00:02:55 +0000 (19:02 -0500)
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>
configure

index 9323e168d9b49329cf2b4f8c8eb177cc2ad75aa6..15eb563f8d72bd71615fc289f8bbc22552b8afcc 100755 (executable)
--- a/configure
+++ b/configure
@@ -357,6 +357,13 @@ CFG_MANDIR=${CFG_MANDIR%/}
 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;