- 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')
- 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)
+ 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=subprocess.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=subprocess.getoutput('./bootstrap.sh')
+ print(foo)
+ if not os.path.exists('config.status') :
+ foo=subprocess.getoutput('./configure')
+ print(foo)
+ if not os.path.exists('.libs/libstrophe.a') :
+ foo=subprocess.getoutput('make libstrophe.la')
+ print(foo)
+ if not os.path.exists('.libs/libstrophe.a') :
+ print('Building with ' + SRC_NAME + ' failed.')
+ Exit(2)
+ else:
+ foo = subprocess.getoutput('cp .libs/libstrophe.a ' + env.get('BUILD_DIR'))
+ foo = subprocess.getoutput('cp .libs/libstrophe.so* ' + env.get('BUILD_DIR'))
+ print(foo)