else:
print 'Download xmpp library complete'
- print 'Building with ' + SRC_NAME
- #print 'base_dir', base_dir
- #print 'target_os', target_os
- #print 'target_arch', target_arch
-
- foo=commands.getoutput('patch -N -p1 -d libstrophe < strophe-xmpp_conn_is_secured.patch')
- print foo
-
- os.chdir(SRC_NAME)
- #sconsflags = ' RELEASE=true' if env['RELEASE'] else ' RELEASE=false'
- if not os.path.exists('configure') :
- foo=commands.getoutput('./bootstrap.sh')
- print foo
- if not os.path.exists('config.status') :
- foo=commands.getoutput('./configure')
+ if not env.GetOption('clean'):
+ print 'Building with ' + SRC_NAME
+ #print 'base_dir', base_dir
+ #print 'target_os', target_os
+ #print 'target_arch', target_arch
+
+ foo=commands.getoutput('patch -N -p1 -d libstrophe < strophe-xmpp_conn_is_secured.patch')
print foo
- if not os.path.exists('.libs/libstrophe.a') :
- foo=commands.getoutput('make libstrophe.la')
- print foo
- if not os.path.exists('.libs/libstrophe.a') :
- print 'Building with ' + SRC_NAME + ' failed.'
- Exit(2)
+ os.chdir(SRC_NAME)
+ #sconsflags = ' RELEASE=true' if env['RELEASE'] else ' RELEASE=false'
+ if not os.path.exists('configure') :
+ foo=commands.getoutput('./bootstrap.sh')
+ print foo
+ if not os.path.exists('config.status') :
+ foo=commands.getoutput('./configure')
+ print foo
+ if not os.path.exists('.libs/libstrophe.a') :
+ foo=commands.getoutput('make libstrophe.la')
+ print foo
+ if not os.path.exists('.libs/libstrophe.a') :
+ print 'Building with ' + SRC_NAME + ' failed.'
+ Exit(2)
+ else:
+ foo = commands.getoutput('cp .libs/libstrophe.a ' + env.get('BUILD_DIR'))
+ foo = commands.getoutput('cp .libs/libstrophe.so* ' + env.get('BUILD_DIR'))
+ print foo
- print 'Building with ' + SRC_NAME + ' Completely.'
+ print 'Building with ' + SRC_NAME + ' Completely.'
env.AppendUnique(CPPPATH = [INC_PATH], RALIBS = LIBSTROPHY_LIBS, RALIBPATH = [LIB_PATH], RARPATH = [LIB_PATH])
env.AppendUnique(LIBS= LIBSTROPHY_LIBS, LIBPATH = [LIB_PATH])
-if env.GetOption('clean') :
+
+if env.GetOption('clean'):
act = env.Action(['cd ' + SRC_PATH, 'make clean'])
env.Execute(act)
+ if os.path.isfile(env.get('BUILD_DIR') + '/libstrophe.a'):
+ act2 = env.Action(['rm ' + env.get('BUILD_DIR') + '/libstrophe.*'])
+ env.Execute(act2)
else:
print 'Download', SRC_NAME, 'library complete'
- 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=' + LIBSTROPHE_BASE + ' libraries')
- print foo
-
- if not os.path.exists('libwksxmppxep.so') :
- print 'Building with ' + SRC_NAME + ' failed.'
- Exit(2)
-
- print 'Building with ' + SRC_NAME + ' Completely.'
+ 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=' + LIBSTROPHE_BASE + ' libraries')
+ print foo
+ if not os.path.exists('libwksxmppxep.so') :
+ print 'Building with ' + SRC_NAME + ' failed.'
+ Exit(2)
+ else:
+ foo = commands.getoutput('cp libwksxmppxep.so ' + env.get('BUILD_DIR'))
+ print foo
+ foo = commands.getoutput('cp libwksxmppxep.a ' + env.get('BUILD_DIR'))
+ print foo
+
+ print 'Building with ' + SRC_NAME + ' Completely.'
env.PrependUnique(CPPPATH = [INC_PATH], RALIBS = WJSXMPPXEP_LIBS, RALIBPATH = [LIB_PATH], RARPATH = [LIB_PATH])
- env.PrependUnique(LIBS = WJSXMPPXEP_LIBS, LIBPATH = [LIB_PATH])
- env.PrependUnique(LIBS = ['boost_system', 'boost_thread'])
+ env.AppendUnique(LIBS = WJSXMPPXEP_LIBS, LIBPATH = [LIB_PATH])
+ env.AppendUnique(LIBS = ['boost_system', 'boost_thread'])
if env.GetOption('clean') :
act = env.Action(['cd ' + SRC_PATH, 'make clean'])
env.Execute(act)
+ if os.path.isfile(env.get('BUILD_DIR') + '/libwksxmppxep.so'):
+ act2 = env.Action(['rm ' + env.get('BUILD_DIR') + '/libwksxmppxep.*'])
+ env.Execute(act2)
\ No newline at end of file