The build would crash if JAVA_HOME was not specified
because SCons.Error was not imported into the script.
This replaces the error with an exit message.
Change-Id: Ic950ae3dc0d0c3308d7bbd90ab965b17f4563f0f
Signed-off-by: George Nash <george.nash@intel.com>
Bug: https://jira.iotivity.org/browse/IOT-1745
Reviewed-on: https://gerrit.iotivity.org/gerrit/20947
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
(cherry picked from commit
369d43b707cabcf715f50ff4827670196c4f425f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21159
Reviewed-by: Mats Wichmann <mats@linux.com>
env.get('JAVA_HOME') + '/include/' + target_os
])
else:
- raise SCons.Errors.StopError(
- 'BUILD_JAVA is specified, but JAVA_HOME is not set.')
+ msg = "Error: BUILD_JAVA requires JAVA_HOME to be set for target '%s'" % target_os
+ Exit(msg)
# External library include files are in <src_dir>/deps/<target_os>/include
# the library binaries are in <src_dir>/deps/<target_os>/lib/<arch>