From 83d6a78f143b64558c01b83b6fcbce3e8a508b6f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 08 Nov 2012 00:56:25 -0500 Subject: Support a build target option in oh-autobuild. --- (limited to 'lib') diff --git a/lib/buildsystem.sh b/lib/buildsystem.sh index 0f9b8b0..11d581b 100644 --- a/lib/buildsystem.sh +++ b/lib/buildsystem.sh @@ -69,6 +69,9 @@ oh_set_buildsystem_option() 'target-arch') _OH_BUILDSYSTEM_TARGET_ARCH="${_ohsbso_value}" ;; + 'build-target') + _OH_BUILDSYSTEM_BUILD_TARGET="${_ohsbso_value}" + ;; *) _oh_return 125 return ${?} diff --git a/lib/buildsystem/make.sh b/lib/buildsystem/make.sh index 5df424a..0268c8c 100644 --- a/lib/buildsystem/make.sh +++ b/lib/buildsystem/make.sh @@ -33,7 +33,12 @@ _oh_make_can_build() _oh_make_build() { - _oh_make_update_first_defined_target '' "${@}" + if [ -n "${_OH_BUILDSYSTEM_BUILD_TARGET}" ]; then + _oh_make_update_first_defined_target "${_OH_BUILDSYSTEM_BUILD_TARGET}" \ + "${@}" + else + _oh_make_update_first_defined_target '' "${@}" + fi } _oh_make_can_clean() -- cgit v0.9.1