summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/buildsystem.sh6
-rw-r--r--src/oh-autoconfigure.sh3
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/buildsystem.sh b/lib/buildsystem.sh
index 1be5e1d..9524835 100644
--- a/lib/buildsystem.sh
+++ b/lib/buildsystem.sh
@@ -34,8 +34,9 @@ oh_buildsystems_init()
done
_OH_BUILDSYSTEM_WORK_AREA="${PWD}"
- _OH_BUILDSYSTEM_SOURCE_DIR="$(cd src && pwd)"
+ [ -z "${_OH_BUILDSYSTEM_SOURCE_DIR}" ] && \
+ _OH_BUILDSYSTEM_SOURCE_DIR="${PWD}/src"
[ -z "${_OH_BUILDSYSTEM_BUILD_DIR}" ] && \
_OH_BUILDSYSTEM_BUILD_DIR="${PWD}/src"
[ -z "${_OH_BUILDSYSTEM_DESTDIR}" ] && \
@@ -57,6 +58,9 @@ oh_set_buildsystem_option()
fi
case "${_ohsbso_name}" in
+ 'source-dir')
+ _OH_BUILDSYSTEM_SOURCE_DIR="${_ohbsbo_value}"
+ ;;
'build-dir')
_OH_BUILDSYSTEM_BUILD_DIR="${_ohsbso_value}"
;;
diff --git a/src/oh-autoconfigure.sh b/src/oh-autoconfigure.sh
index 9535117..004a140 100644
--- a/src/oh-autoconfigure.sh
+++ b/src/oh-autoconfigure.sh
@@ -29,6 +29,9 @@ main()
while getopts 'S:B:t:' opt; do
case "${opt}" in
+ s)
+ oh_set_buildsystem_option 'source-dir' "${OPTARG}"
+ ;;
S)
oh_set_buildsystem_option 'build-system' "${OPTARG}"
;;