Fix issue where Boost is downloaded everytime for Android builds.
[platform/upstream/iotivity.git] / extlibs / boost / SConscript
index 0fe0662..734721f 100644 (file)
@@ -34,9 +34,13 @@ if 'android' == target_os :
         msg="Host platform (%s) is currently not supported for boost builds" % host_os
         raise SCons.Errors.EnvironmentError(msg)
 
-    boost_zip = env.URLDownload(boost_arch_name, boost_url)
-    boost_dir = env.UnpackAll(boost_bootstrap, boost_zip)
-    boost_b2  = env.BoostBootstrap(boost_b2_name, boost_dir)
+    if not os.path.exists(boost_arch_name):
+        boost_arch_name = env.URLDownload(boost_arch_name, boost_url)
+
+    if not os.path.exists(boost_base_name):
+       boost_arch_name = env.UnpackAll(boost_bootstrap, boost_arch_name)
+
+    boost_b2  = env.BoostBootstrap(boost_b2_name, boost_arch_name)
 
     dep_sys_root = env['DEP_SYS_ROOT']
     dep_src_dir =  dep_sys_root + os.sep + 'include'