Reformat all of the java SConscripts to be more Pythonic 01/20901/2
authorMats Wichmann <mats@linux.com>
Fri, 2 Jun 2017 13:45:16 +0000 (07:45 -0600)
committerRick Bell <richard.s.bell@intel.com>
Mon, 19 Jun 2017 18:29:02 +0000 (18:29 +0000)
There are not intended to be any functional changes

Some reformatting after initial comments

Change-Id: I2db5b04e2498974396ff3ba6033b521ebd3ab61a
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20537
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 44c0f9d561e356d685544f15134999bf90184d9e)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20901

java/SConscript
java/jni/SConscript

index 2642111..1f11049 100644 (file)
@@ -6,26 +6,26 @@ PROJECT_VERSION = env.get('PROJECT_VERSION')
 
 TARGET_ARCH = env.get('TARGET_ARCH')
 if env.get('RELEASE'):
-    RELEASE="release"
+    RELEASE = "release"
 else:
-    RELEASE="debug"
+    RELEASE = "debug"
 SECURED = env.get('SECURED')
 
 target_os = env.get('TARGET_OS')
 
 if env.get('WITH_CLOUD'):
-    CLOUD=1
+    CLOUD = 1
 else:
-    CLOUD=0
+    CLOUD = 0
 
 if env.get('WITH_TCP'):
-    TCP=1
+    TCP = 1
 else:
-    TCP=0
+    TCP = 0
 if env.get('MULTIPLE_OWNER'):
-    ANDROID_MULTIPLE_OWNER=1
+    ANDROID_MULTIPLE_OWNER = 1
 else:
-    ANDROID_MULTIPLE_OWNER=0
+    ANDROID_MULTIPLE_OWNER = 0
 
 MQ = env.get('WITH_MQ')
 MQ_SUB = 0
@@ -61,7 +61,8 @@ if target_os == "android":
     android_home = env.get('ANDROID_HOME')
     os.environ['ANDROID_HOME'] = env.get('ANDROID_HOME')
     os.environ['ANDROID_NDK_HOME'] = env.get('ANDROID_NDK')
-    if not os.path.exists(android_home + '/platforms/android-21') or not os.path.exists(android_home + '/build-tools/20.0.0'):
+    if not os.path.exists(android_home + '/platforms/android-21') or \
+       not os.path.exists(android_home + '/build-tools/20.0.0'):
         print '''
 ***************************************** Info ********************************
 *   Either 'Android API 21' is not installed or 'Android SDK Build Tools      *
@@ -90,29 +91,56 @@ if target_os == "android":
 '''
         os.system(android_home + '/tools/android')
 
+
 def ensure_libs(target, source, env):
-    return target, [source, env.get('BUILD_DIR') + 'libca-interface.so',
-                            env.get('BUILD_DIR') + 'liboc.so', 
-                            env.get('BUILD_DIR') + 'liboc_logger.so',
-                            env.get('BUILD_DIR') + 'libocstack-jni.so']
+    return target, [
+        source,
+        env.get('BUILD_DIR') + 'libca-interface.so',
+        env.get('BUILD_DIR') + 'liboc.so',
+        env.get('BUILD_DIR') + 'liboc_logger.so',
+        env.get('BUILD_DIR') + 'libocstack-jni.so'
+    ]
+
 
 jniOut = SConscript('jni/SConscript')
 
 jdk_env = Environment(ENV=os.environ)
-jdk_env['BUILDERS']['Gradle'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b ' + env.get('SRC_DIR') + '/java/iotivity-%s/build.gradle -PPROJECT_VERSION=%s -PWITH_TRANSPORT_EDR=%s -PWITH_TRANSPORT_BLE=%s -PWITH_TRANSPORT_NFC=%s -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s -DSECURE=%s -PWITH_CLOUD=%s -PRD_MODE=%s -PWITH_MQ_PUB=%s -PWITH_MQ_SUB=%s -PWITH_MQ_BROKER=%s -PWITH_TCP=%s -PMULTIPLE_OWNER=%s -PBUILD_DIR=%s --stacktrace' %(target_os, PROJECT_VERSION, TRANSPORT_EDR, TRANSPORT_BLE, TRANSPORT_NFC, TARGET_ARCH, RELEASE, SECURED, SECURED, CLOUD, RD_MODE, MQ_PUB, MQ_SUB, MQ_BROKER, TCP, ANDROID_MULTIPLE_OWNER, env.get('BUILD_DIR')), emitter = ensure_libs)
+jdk_env['BUILDERS']['Gradle'] = Builder(
+    action=env.get('ANDROID_GRADLE') + ' build -b ' + env.get('SRC_DIR') +
+    '/java/iotivity-%s/build.gradle -PPROJECT_VERSION=%s -PWITH_TRANSPORT_EDR=%s -PWITH_TRANSPORT_BLE=%s -PWITH_TRANSPORT_NFC=%s -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s -DSECURE=%s -PWITH_CLOUD=%s -PRD_MODE=%s -PWITH_MQ_PUB=%s -PWITH_MQ_SUB=%s -PWITH_MQ_BROKER=%s -PWITH_TCP=%s -PMULTIPLE_OWNER=%s -PBUILD_DIR=%s --stacktrace'
+    % (target_os, PROJECT_VERSION, TRANSPORT_EDR, TRANSPORT_BLE, TRANSPORT_NFC,
+       TARGET_ARCH, RELEASE, SECURED, SECURED, CLOUD, RD_MODE, MQ_PUB, MQ_SUB,
+       MQ_BROKER, TCP, ANDROID_MULTIPLE_OWNER, env.get('BUILD_DIR')),
+    emitter=ensure_libs)
 jdk_env['BUILD_DIR'] = env.get('BUILD_DIR')
-cmdBuildApi=jdk_env.Gradle(target="base/objs", source="common/src/main/java/org/iotivity/base/OcResource.java")
+cmdBuildApi = jdk_env.Gradle(
+    target="base/objs",
+    source="common/src/main/java/org/iotivity/base/OcResource.java")
 
 examples_target = "java"
 if target_os == 'android':
     examples_target = "android"
-jdk_env['BUILDERS']['Gradle'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b ' + 'java/examples-%s/build.gradle -PPROJECT_VERSION=%s -DWITH_TRANSPORT_EDR=%s -DWITH_TRANSPORT_BLE=%s -DWITH_TRANSPORT_NFC=%s -PTARGET_OS=%s -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s -DSECURE=%s -PWITH_CLOUD=%s -PRD_MODE=%s -PWITH_MQ_PUB=%s -PWITH_MQ_SUB=%s -PWITH_MQ_BROKER=%s -PWITH_TCP=%s -PMULTIPLE_OWNER=%s -PBUILD_DIR=%s --stacktrace' %(examples_target, PROJECT_VERSION, TRANSPORT_EDR, TRANSPORT_BLE, TRANSPORT_NFC, target_os, TARGET_ARCH, RELEASE, SECURED, SECURED, CLOUD, RD_MODE, MQ_PUB, MQ_SUB, MQ_BROKER, TCP, ANDROID_MULTIPLE_OWNER, env.get('BUILD_DIR')))
+jdk_env['BUILDERS']['Gradle'] = Builder(
+    action=env.get('ANDROID_GRADLE') + ' build -b ' +
+    'java/examples-%s/build.gradle -PPROJECT_VERSION=%s -DWITH_TRANSPORT_EDR=%s -DWITH_TRANSPORT_BLE=%s -DWITH_TRANSPORT_NFC=%s -PTARGET_OS=%s -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s -DSECURE=%s -PWITH_CLOUD=%s -PRD_MODE=%s -PWITH_MQ_PUB=%s -PWITH_MQ_SUB=%s -PWITH_MQ_BROKER=%s -PWITH_TCP=%s -PMULTIPLE_OWNER=%s -PBUILD_DIR=%s --stacktrace'
+    % (examples_target, PROJECT_VERSION, TRANSPORT_EDR, TRANSPORT_BLE,
+       TRANSPORT_NFC, target_os, TARGET_ARCH, RELEASE, SECURED, SECURED, CLOUD,
+       RD_MODE, MQ_PUB, MQ_SUB, MQ_BROKER, TCP, ANDROID_MULTIPLE_OWNER,
+       env.get('BUILD_DIR')))
 #cmdBuildExamples=jdk_env.Gradle(target="../examples-%s/devicediscoveryclient/apk" % (examples_target, ), source="examples-%s/devicediscoveryclient/src/main/java/org/iotivity/base/examples/DeviceDiscoveryClient.java" % (examples_target, ))
-cmdBuildExamples=jdk_env.Gradle(target="examples-%s/simpleclient/jar" % (examples_target, ), source="examples-%s/simpleclient/src/main/java/org/iotivity/base/examples/SimpleClient.java" % (examples_target, ))
+cmdBuildExamples = jdk_env.Gradle(
+    target="examples-%s/simpleclient/jar" % (examples_target, ),
+    source=
+    "examples-%s/simpleclient/src/main/java/org/iotivity/base/examples/SimpleClient.java"
+    % (examples_target, ))
 
 if target_os != 'android':
-    exampleAclFiles = jdk_env.Install('#java/examples-java/simpleserver/build/libs/', 'examples-java/simpleserver/src/main/assets/oic_svr_db_server.dat')
-    exampleAclFiles += jdk_env.Install('#java/examples-java/simpleclientserver/build/libs/', 'examples-java/simpleserver/src/main/assets/oic_svr_db_server.dat')
+    exampleAclFiles = jdk_env.Install(
+        '#java/examples-java/simpleserver/build/libs/',
+        'examples-java/simpleserver/src/main/assets/oic_svr_db_server.dat')
+    exampleAclFiles += jdk_env.Install(
+        '#java/examples-java/simpleclientserver/build/libs/',
+        'examples-java/simpleserver/src/main/assets/oic_svr_db_server.dat')
     Depends(exampleAclFiles, cmdBuildExamples)
 
 Depends(cmdBuildExamples, cmdBuildApi)
@@ -121,29 +149,48 @@ Depends(cmdBuildExamples, jniOut)
 if target_os == 'android':
     jdk_env.Clean(cmdBuildExamples, '#/java/iotivity-android/build/')
     jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/cloudprovisioningclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/devicediscoveryclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/devicediscoveryserver/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/DirectPairing/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/fridgeclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/fridgegroupclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/fridgegroupserver/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/fridgeserver/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/groupclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/groupserver/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/presenceclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/presenceserver/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/provisioningclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/simplebase/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/simpleclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/simpleserver/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/simpleclientserver/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-android/simpleserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/cloudprovisioningclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/devicediscoveryclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/devicediscoveryserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/DirectPairing/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/fridgeclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/fridgegroupclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/fridgegroupserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/fridgeserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/groupclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/groupserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/presenceclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/presenceserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/provisioningclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/simplebase/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/simpleclient/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/simpleserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/simpleclientserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-android/simpleserver/build/')
 else:
     jdk_env.Clean(cmdBuildExamples, '#/java/iotivity-linux/build/')
     jdk_env.Clean(cmdBuildExamples, '#/java/examples-java/build/')
     jdk_env.Clean(cmdBuildExamples, '#/java/examples-java/simpleclient/build/')
-    jdk_env.Clean(cmdBuildExamples, '#/java/examples-java/simpleclientserver/build/')
+    jdk_env.Clean(cmdBuildExamples,
+                  '#/java/examples-java/simpleclientserver/build/')
     jdk_env.Clean(cmdBuildExamples, '#/java/examples-java/simpleserver/build/')
 
-env.AppendUnique(baseAAR = cmdBuildApi)
+env.AppendUnique(baseAAR=cmdBuildApi)
index bc88616..be80644 100644 (file)
@@ -33,84 +33,92 @@ jni_env = lib_env.Clone()
 ######################################################################
 with_upstream_libcoap = jni_env.get('WITH_UPSTREAM_LIBCOAP')
 if with_upstream_libcoap == '1':
-    jni_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+    jni_env.AppendUnique(CPPPATH=['#extlibs/libcoap/libcoap/include'])
 else:
-    jni_env.AppendUnique(CPPPATH = [
-            env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
-            ])
-
-jni_env.AppendUnique(CPPPATH = [
-               env.get('SRC_DIR') + '/resource/csdk/connectivity/api',
-               env.get('SRC_DIR') + '/resource/include',
-               env.get('SRC_DIR') + '/resource/c_common',
-               env.get('SRC_DIR') + '/resource/c_common/oic_string/include',
-               env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
-               env.get('SRC_DIR') + '/resource/csdk/include',
-               env.get('SRC_DIR') + '/resource/csdk/stack/include',
-               env.get('SRC_DIR') + '/resource/csdk/ocsocket/include',
-               env.get('SRC_DIR') + '/resource/csdk/resource-directory/include',
-               env.get('SRC_DIR') + '/resource/oc_logger/include',
-               env.get('SRC_DIR') + '/resource/csdk/logger/include',
-               env.get('SRC_DIR') + '/resource/../extlibs/boost/boost_1_58_0',
-               env.get('SRC_DIR') + '/resource/../build_common/android/compatibility',
-               env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include',
-               env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/cloud/',
-               env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm',
-               env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
-               env.get('SRC_DIR') + '/resource/csdk/security/include'
-               ])
+    jni_env.AppendUnique(CPPPATH=[
+        env.get('SRC_DIR') +
+        '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
+    ])
+
+jni_env.AppendUnique(CPPPATH=[
+    env.get('SRC_DIR') + '/resource/csdk/connectivity/api',
+    env.get('SRC_DIR') + '/resource/include',
+    env.get('SRC_DIR') + '/resource/c_common',
+    env.get('SRC_DIR') + '/resource/c_common/oic_string/include',
+    env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
+    env.get('SRC_DIR') + '/resource/csdk/include',
+    env.get('SRC_DIR') + '/resource/csdk/stack/include',
+    env.get('SRC_DIR') + '/resource/csdk/ocsocket/include',
+    env.get('SRC_DIR') + '/resource/csdk/resource-directory/include',
+    env.get('SRC_DIR') + '/resource/oc_logger/include',
+    env.get('SRC_DIR') + '/resource/csdk/logger/include',
+    env.get('SRC_DIR') + '/resource/../extlibs/boost/boost_1_58_0',
+    env.get('SRC_DIR') + '/resource/../build_common/android/compatibility',
+    env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include',
+    env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/cloud/',
+    env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm',
+    env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
+    env.get('SRC_DIR') + '/resource/csdk/security/include'
+])
 
 target_os = env.get('TARGET_OS')
-jni_env.AppendUnique(CCFLAGS = ['-Wno-error', '-Wno-comment', '-Wno-unused-function', '-Wno-unused-parameter'])
+jni_env.AppendUnique(CCFLAGS=[
+    '-Wno-error', '-Wno-comment', '-Wno-unused-function',
+    '-Wno-unused-parameter'
+])
 if target_os not in ['windows', 'winrt']:
-       jni_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
-
-       # Note: 'pthread' is in libc for android. On other platform, if use
-       # new gcc(>4.9?) it isn't required, otherwise, it's required
-       if target_os != 'android':
-               jni_env.AppendUnique(LIBS = ['-lpthread'])
-
-jni_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-jni_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
-jni_env.PrependUnique(LIBS = ['resource_directory', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction'])
+    jni_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-Wall', '-pthread'])
+
+    # Note: 'pthread' is in libc for android. On other platform, if use
+    # new gcc(>4.9?) it isn't required, otherwise, it's required
+    if target_os != 'android':
+        jni_env.AppendUnique(LIBS=['-lpthread'])
+
+jni_env.AppendUnique(LIBPATH=[env.get('BUILD_DIR')])
+jni_env.AppendUnique(RPATH=[env.get('BUILD_DIR')])
+jni_env.PrependUnique(LIBS=[
+    'resource_directory', 'oc', 'octbstack', 'oc_logger',
+    'connectivity_abstraction'
+])
 if env.get('SECURED') == '1':
-    jni_env.AppendUnique(CPPDEFINES= ['__WITH_TLS__'])
-    jni_env.PrependUnique(LIBS = ['mbedtls', 'ocprovision', 'ocpmapi'])
-    jni_env.AppendUnique(CPPPATH = ['#resource/csdk/security/include/internal',
-                                    '#extlibs/cjson'])
+    jni_env.AppendUnique(CPPDEFINES=['__WITH_TLS__'])
+    jni_env.PrependUnique(LIBS=['mbedtls', 'ocprovision', 'ocpmapi'])
+    jni_env.AppendUnique(
+        CPPPATH=['#resource/csdk/security/include/internal', '#extlibs/cjson'])
     if env.get('WITH_CLOUD') == '1':
-        jni_env.AppendUnique(CPPPATH = ['#resource/csdk/security/provisioning/include/cloud'])
+        jni_env.AppendUnique(
+            CPPPATH=['#resource/csdk/security/provisioning/include/cloud'])
 
 if target_os == 'android':
-       jni_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
-       jni_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libocstack-jni.so'])
-       jni_env.AppendUnique(LIBS = ['gnustl_shared'])
+    jni_env.AppendUnique(CXXFLAGS=['-frtti', '-fexceptions'])
+    jni_env.AppendUnique(LINKFLAGS=['-Wl,-soname,libocstack-jni.so'])
+    jni_env.AppendUnique(LIBS=['gnustl_shared'])
 
-       if not env.get('RELEASE'):
-               jni_env.AppendUnique(LIBS = ['log'])
+    if not env.get('RELEASE'):
+        jni_env.AppendUnique(LIBS=['log'])
 
 if target_os in ['darwin', 'ios']:
-       jni_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
+    jni_env.AppendUnique(CPPDEFINES=['_DARWIN_C_SOURCE'])
 
 if env.get('SECURED') == '1':
-       jni_env.AppendUnique(CPPDEFINES=['SECURED'])
+    jni_env.AppendUnique(CPPDEFINES=['SECURED'])
 
 if env.get('WITH_CLOUD'):
-       jni_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
+    jni_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
 
 if env.get('MULTIPLE_OWNER') == 1:
-       jni_env.AppendUnique(CPPDEFINES = ['MULTIPLE_OWNER'])
+    jni_env.AppendUnique(CPPDEFINES=['MULTIPLE_OWNER'])
 
 if env.get('WITH_TCP'):
-       jni_env.AppendUnique(CPPDEFINES = ['WITH_TCP', '__WITH_TLS__'])
+    jni_env.AppendUnique(CPPDEFINES=['WITH_TCP', '__WITH_TLS__'])
 
 with_mq = env.get('WITH_MQ')
 if 'SUB' in with_mq:
-       jni_env.AppendUnique(CPPDEFINES = ['MQ_SUBSCRIBER', 'WITH_MQ'])
+    jni_env.AppendUnique(CPPDEFINES=['MQ_SUBSCRIBER', 'WITH_MQ'])
 if 'PUB' in with_mq:
-       jni_env.AppendUnique(CPPDEFINES = ['MQ_PUBLISHER', 'WITH_MQ'])
+    jni_env.AppendUnique(CPPDEFINES=['MQ_PUBLISHER', 'WITH_MQ'])
 if 'BROKER' in with_mq:
-       jni_env.AppendUnique(CPPDEFINES = ['MQ_BROKER', 'WITH_MQ'])
+    jni_env.AppendUnique(CPPDEFINES=['MQ_BROKER', 'WITH_MQ'])
 ######################################################################
 # Source files and Targets
 ######################################################################
@@ -118,63 +126,60 @@ if 'BROKER' in with_mq:
 ca_interface = jni_env.SharedLibrary('ca-interface', ['JniCaInterface.c'])
 
 ocstack_files = [
-                       'JniOcStack.cpp',
-                       'JniUtils.cpp',
-                       'JniEntityHandler.cpp',
-                       'JniOnResourceFoundListener.cpp',
-                       'JniOnResourcesFoundListener.cpp',
-                       'JniOnDeviceInfoListener.cpp',
-                       'JniOnPlatformInfoListener.cpp',
-                       'JniOnPresenceListener.cpp',
-                       'JniOnGetListener.cpp',
-                       'JniOnPutListener.cpp',
-                       'JniOnPostListener.cpp',
-                       'JniOnDeleteListener.cpp',
-                       'JniOnObserveListener.cpp',
-                       'JniOcRepresentation.cpp',
-                       'JniOcResourceHandle.cpp',
-                       'JniOcPresenceHandle.cpp',
-                       'JniOcRequestHandle.cpp',
-                       'JniOcResourceRequest.cpp',
-                       'JniOcResourceResponse.cpp',
-                       'JniOcPlatform.cpp',
-                       'JniOcResource.cpp',
-                       'JniOcResourceIdentifier.cpp',
-                       'JniOcSecurity.cpp',
-                       'JniOnDPDevicesFoundListener.cpp',
-                       'JniOnDirectPairingListener.cpp',
-                       'JniOcDirectPairDevice.cpp',
-                       'JniOnPublishResourceListener.cpp',
-                       'JniOnDeleteResourceListener.cpp',
-                       'JniOcRDClient.cpp',
-               ]
+    'JniOcStack.cpp',
+    'JniUtils.cpp',
+    'JniEntityHandler.cpp',
+    'JniOnResourceFoundListener.cpp',
+    'JniOnResourcesFoundListener.cpp',
+    'JniOnDeviceInfoListener.cpp',
+    'JniOnPlatformInfoListener.cpp',
+    'JniOnPresenceListener.cpp',
+    'JniOnGetListener.cpp',
+    'JniOnPutListener.cpp',
+    'JniOnPostListener.cpp',
+    'JniOnDeleteListener.cpp',
+    'JniOnObserveListener.cpp',
+    'JniOcRepresentation.cpp',
+    'JniOcResourceHandle.cpp',
+    'JniOcPresenceHandle.cpp',
+    'JniOcRequestHandle.cpp',
+    'JniOcResourceRequest.cpp',
+    'JniOcResourceResponse.cpp',
+    'JniOcPlatform.cpp',
+    'JniOcResource.cpp',
+    'JniOcResourceIdentifier.cpp',
+    'JniOcSecurity.cpp',
+    'JniOnDPDevicesFoundListener.cpp',
+    'JniOnDirectPairingListener.cpp',
+    'JniOcDirectPairDevice.cpp',
+    'JniOnPublishResourceListener.cpp',
+    'JniOnDeleteResourceListener.cpp',
+    'JniOcRDClient.cpp',
+]
 if ('PUB' in with_mq) or ('SUB' in with_mq) or ('BROKER' in with_mq):
-       ocstack_files += [
-                               'JniOnMQTopicFoundListener.cpp',
-                               'JniOnMQSubscribeListener.cpp'
-                       ]
+    ocstack_files += [
+        'JniOnMQTopicFoundListener.cpp', 'JniOnMQSubscribeListener.cpp'
+    ]
 if env.get('SECURED') == '1':
-       ocstack_files += [
-                               'JniOcSecureResource.cpp',
-                               'JniOcProvisioning.cpp',
-                               'JniSecureUtils.cpp',
-                               'JniProvisionResultListner.cpp',
-                               'JniPinCheckListener.cpp',
-                               'JniDisplayPinListener.cpp',
-                               'JniDisplayVerifyNumListener.cpp',
-                               'JniConfirmNumListener.cpp'
-                       ]
+    ocstack_files += [
+        'JniOcSecureResource.cpp',
+        'JniOcProvisioning.cpp',
+        'JniSecureUtils.cpp',
+        'JniProvisionResultListner.cpp',
+        'JniPinCheckListener.cpp',
+        'JniDisplayPinListener.cpp',
+        'JniDisplayVerifyNumListener.cpp',
+        'JniConfirmNumListener.cpp'
+    ]
 if env.get('WITH_CLOUD'):
-       ocstack_files += [
-                               'JniOcAccountManager.cpp',
-                               'JniCreateAciIdListener.cpp',
-                               'JniOcCloudResultListener.cpp',
-                               'JniGetAclIdByDeviceListener.cpp'
-                       ]
-       if env.get('SECURED') == '1':
-               ocstack_files += [
-                                       'JniOcCloudProvisioning.cpp'
-                               ]
+    ocstack_files += [
+        'JniOcAccountManager.cpp',
+        'JniCreateAciIdListener.cpp',
+        'JniOcCloudResultListener.cpp',
+        'JniGetAclIdByDeviceListener.cpp'
+    ]
+    if env.get('SECURED') == '1':
+        ocstack_files += ['JniOcCloudProvisioning.cpp']
 
 ocstack_jni = jni_env.SharedLibrary('ocstack-jni', ocstack_files)