summaryrefslogtreecommitdiff
path: root/scripts/include/common.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-10-17 18:07:17 +0300
committerAndrei Karas <akaras@inbox.ru>2017-10-17 18:07:17 +0300
commit40e4d85606c1cb9fac07a364a8fb92d920d481ff (patch)
tree407481e92648e1de01c2575223b4e4478fb7d753 /scripts/include/common.sh
parent6f4d6c019d9654a3e7f4720ccb2d204b62f1afea (diff)
downloadspm-40e4d85606c1cb9fac07a364a8fb92d920d481ff.tar.gz
spm-40e4d85606c1cb9fac07a364a8fb92d920d481ff.tar.bz2
spm-40e4d85606c1cb9fac07a364a8fb92d920d481ff.tar.xz
spm-40e4d85606c1cb9fac07a364a8fb92d920d481ff.zip
Add ability to build packages from subdir.
Diffstat (limited to 'scripts/include/common.sh')
-rw-r--r--scripts/include/common.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/include/common.sh b/scripts/include/common.sh
index 9d253e6..974d66c 100644
--- a/scripts/include/common.sh
+++ b/scripts/include/common.sh
@@ -108,7 +108,8 @@ function run_autoreconf {
if [[ "${flags}" == "" ]]; then
flags="${AUTORECONF_FLAGS}"
fi
- cd "${srcdir}"
+ echo "cd ${srcdir}/${SUBDIR}"
+ cd "${srcdir}/${SUBDIR}"
check_error $?
echo "make distclean"
make distclean
@@ -119,7 +120,8 @@ function run_autoreconf {
}
function run_src_script {
- cd "${srcdir}"
+ echo "cd ${srcdir}/${SUBDIR}"
+ cd "${srcdir}/${SUBDIR}"
check_error $?
echo $@
$@
@@ -130,6 +132,8 @@ function run_enable_same_dir_build {
echo "copy sources from $srcdir to ${builddir}"
cp -r "$srcdir" "${builddir}/.."
export srcdir="$builddir"
+ echo mkdir -p "${builddir}/${SUBDIR}"
+ mkdir -p "${builddir}/${SUBDIR}" || true
echo "change src dir to $srcdir"
}
@@ -138,10 +142,11 @@ function run_configure {
if [[ "${flags}" == "" ]]; then
flags="${CONFIGURE_FLAGS}"
fi
- cd "${builddir}"
+ echo "cd ${builddir}/${SUBDIR}"
+ cd "${builddir}/${SUBDIR}"
check_error $?
- echo "configure --prefix=\"${bindir}\" ${flags}"
- eval "$srcdir"/configure --prefix="${bindir}" ${flags}
+ echo "$srcdir"/"$SUBDIR"/configure --prefix="${bindir}" "${flags}"
+ eval "$srcdir"/"$SUBDIR"/configure --prefix="${bindir}" ${flags}
check_error $?
unset flags
}
@@ -151,7 +156,8 @@ function run_cmake {
if [[ "${flags}" == "" ]]; then
flags="${CONFIGURE_FLAGS}"
fi
- cd "${builddir}"
+ echo "cd ${builddir}/${SUBDIR}"
+ cd "${builddir}/${SUBDIR}"
check_error $?
echo "cmake -DCMAKE_INSTALL_PREFIX:PATH=\"${bindir}\" \"$srcdir\" ${flags}"
eval cmake -DCMAKE_INSTALL_PREFIX:PATH="${bindir}" "$srcdir" ${flags}