wksxmppxep: Fix path detections for RA
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Mon, 14 Aug 2017 20:40:06 +0000 (20:40 +0000)
Note for later "if with_ra_ibb" should be in caller scripts

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ib73ad801d5dc183b4594e5104b863de901019201
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21529
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21845

extlibs/wksxmppxep/SConscript

index 1b1956a..f40cb7a 100644 (file)
@@ -23,8 +23,9 @@ LIB_PATH = SRC_PATH
 WJSXMPPXEP_LIBS = ['wksxmppxep', 'm', 'crypto']
 
 if with_ra_ibb:
-    env.SConscript(base_dir + '/extlibs/libstrophe/SConscript')
-    if not os.path.exists(SRC_NAME):
+
+    env.SConscript('#/extlibs/libstrophe/SConscript')
+    if not os.path.exists(INC_PATH):
         raxmpp_env = Environment(ENV=os.environ)
         c = raxmpp_env.Action([
             'git clone https://github.com/WorksSystems/wks_xep0047.git ' + SRC_NAME,
@@ -45,24 +46,23 @@ if with_ra_ibb:
         else:
             print 'Download', SRC_NAME, 'library complete'
 
-        if not env.GetOption('clean'):
-            print 'Building with ' + SRC_NAME
-            os.chdir(SRC_NAME)
-            if not os.path.exists('libwksxmppxep.so'):
-                LIBSTROPHE_BASE = base_dir + '/extlibs/libstrophe/libstrophe'
-                foo = commands.getoutput('make LIBSTROPHE_BASE=' +
+    if not env.GetOption('clean'):
+        print 'Building with ' + SRC_NAME
+        os.chdir(SRC_PATH)
+        if not os.path.exists('libwksxmppxep.so'):
+            LIBSTROPHE_BASE = base_dir + '/extlibs/libstrophe/libstrophe'
+            foo = commands.getoutput('make LIBSTROPHE_BASE=' +
                                          LIBSTROPHE_BASE + ' libraries')
-                print foo
-            if not os.path.exists('libwksxmppxep.so'):
-                msg = 'Building with ' + SRC_NAME + ' failed.'
-                Exit(msg)
-            else:
-                foo = commands.getoutput('cp libwksxmppxep.so ' + build_dir)
-                print foo
-                foo = commands.getoutput('cp libwksxmppxep.a ' + build_dir)
-                print foo
-
-            print 'Building with ' + SRC_NAME + ' Completely.'
+            print foo
+        if not os.path.exists('libwksxmppxep.so'):
+            msg = 'Building with ' + SRC_NAME + ' failed.'
+            Exit(msg)
+        else:
+            foo = commands.getoutput('cp libwksxmppxep.so ' + build_dir)
+            print foo
+            foo = commands.getoutput('cp libwksxmppxep.a ' + build_dir)
+            print foo
+        print 'Building with ' + SRC_NAME + ' Completely.'
 
         env.PrependUnique(
             CPPPATH=[INC_PATH],