Skip to content
Snippets Groups Projects
Commit 1a704bbb authored by Alexander Schlarb's avatar Alexander Schlarb
Browse files

make-ring: Allow passing in custom prefix path for Unix build

Change-Id: I446c8d9650efc97c5a8a1b56357c63f74af2fc35
parent 62004f28
No related branches found
No related tags found
No related merge requests found
......@@ -296,6 +296,8 @@ def run_install(args):
install_args.append('-s')
if args.global_install:
install_args.append('-g')
if args.prefix is not None:
install_args += ('-P', args.prefix)
if not args.priv_install:
install_args.append('-u')
......@@ -451,6 +453,7 @@ def parse_args():
help='Stop the Ring processes')
ap.add_argument('--distribution')
ap.add_argument('--prefix')
ap.add_argument('--static', default=False, action='store_true')
ap.add_argument('--global-install', default=False, action='store_true')
ap.add_argument('--debug', default=False, action='store_true')
......
......@@ -18,7 +18,7 @@ static=''
client=''
proc='1'
priv_install=true
while getopts gsc:p:u OPT; do
while getopts gsc:P:p:u OPT; do
case "$OPT" in
g)
global='true'
......@@ -29,6 +29,9 @@ while getopts gsc:p:u OPT; do
c)
client="${OPTARG}"
;;
P)
prefix="${OPTARG}"
;;
p)
proc="${OPTARG}"
;;
......@@ -66,7 +69,11 @@ DAEMON="$(pwd)"
cd contrib
mkdir -p native
cd native
../bootstrap
if [ "${prefix+set}" ]; then
../bootstrap --prefix="${prefix}"
else
../bootstrap
fi
make
cd "${DAEMON}"
./autogen.sh
......@@ -77,7 +84,11 @@ if [[ "$OSTYPE" != "darwin"* ]]; then
fi
if [ "${global}" = "true" ]; then
./configure $sharedLib $CONFIGURE_FLAGS
if [ "${prefix+set}" ]; then
./configure $sharedLib $CONFIGURE_FLAGS --prefix="${prefix}"
else
./configure $sharedLib $CONFIGURE_FLAGS
fi
else
./configure $sharedLib $CONFIGURE_FLAGS --prefix="${INSTALL}/daemon"
fi
......@@ -88,7 +99,11 @@ cd "${TOP}/lrc"
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
if [ "${global}" = "true" ]; then
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" -DCMAKE_BUILD_TYPE=Debug $static
if [ "${prefix+set}" ]; then
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${prefix}" $static
else
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" -DCMAKE_BUILD_TYPE=Debug $static
fi
else
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DCMAKE_BUILD_TYPE=Debug \
......@@ -102,7 +117,11 @@ cd "${TOP}/${client}"
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
if [ "${global}" = "true" ]; then
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" $static
if [ "${prefix+set}" ]; then
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" -DCMAKE_INSTALL_PREFIX="${prefix}" $static
else
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" $static
fi
else
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DCMAKE_INSTALL_PREFIX="${INSTALL}/${client}" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment