build: Disable provisioning logging when not wanted
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 28 Jul 2016 16:06:50 +0000 (18:06 +0200)
committerRandeep Singh <randeep.s@samsung.com>
Wed, 17 Aug 2016 06:20:48 +0000 (06:20 +0000)
- Also polish use of LOGGING / TB_LOG option.
- When using scons CPPDEFINES there is no need to add -D prefix.
- Add machine readable header in python files (to avoid tabs).

Bug: https://jira.iotivity.org/browse/IOT-1203
Change-Id: Ibfae4ee23b6b157e891e9792c464cd9a481f9eef
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9841
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Ashwini Kumar <k.ashwini@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
build_common/darwin/SConscript
build_common/linux/SConscript
build_common/tizen/SConscript
resource/csdk/connectivity/build/linux/SConscript
resource/csdk/connectivity/build/tizen/scons/SConscript
resource/csdk/security/provisioning/SConscript
resource/csdk/security/provisioning/ck_manager/sample/SConscript
resource/csdk/stack/samples/tizen/build/scons/SConscript

index 73bb047..06fdac6 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 ##
 # This script set darwin specific flags (GNU GCC)
 #
@@ -59,7 +60,7 @@ else:
        env.AppendUnique(LINKFLAGS = ['-g'])
 
 if env.get('LOGGING'):
-    env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 if target_os == 'darwin':
        sys_root = tc_path + '/Platforms/MacOSX.platform/Developer/SDKs/MacOSX' + sys_version + '.sdk/'
index c4e9145..0ee0cd3 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 ##
 # This script set linux specific flags (GNU GCC)
 #
@@ -14,7 +15,7 @@ else:
        env.AppendUnique(CCFLAGS = ['-g'])
 
 if env.get('LOGGING'):
-       env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
 env.AppendUnique(CFLAGS = ['-std=gnu99'])
index 3f629a6..fe06f8f 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 ##
 # This script set linux specific flags (GNU GCC)
 #
@@ -14,7 +15,7 @@ if env.get('RELEASE'):
        env.AppendUnique(CPPDEFINES = ['NDEBUG'])
 
 if env.get('LOGGING'):
-       env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', ""))
 env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
index d44b5af..448d606 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 ##
 # This script set linux specific flags (GNU GCC)
 #
@@ -14,7 +15,7 @@ else:
        env.AppendUnique(CCFLAGS = ['-g'])
 
 if env.get('LOGGING'):
-       env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
 env.AppendUnique(CCFLAGS = ['-Wall', '-fPIC'])
index aee4ce3..5dc9883 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 ##
 # 'resource' sub-project main build script
 #
@@ -17,7 +18,7 @@ else:
        env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE'])
 
 if env.get('LOGGING'):
-       env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 env.ParseConfig("pkg-config --cflags --libs capi-network-wifi dlog glib-2.0")
 if 'ALL' in transport:
index e3616c7..ed1fa42 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 # //******************************************************************
 # //
 # // Copyright 2015 Samsung Electronics All Rights Reserved.
@@ -81,12 +82,12 @@ if target_os in ['android']:
        provisioning_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
        provisioning_env.AppendUnique(LIBS = ['gnustl_static'])
 
-       if not provisioning_env.get('RELEASE'):
-               provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-
 if target_os in ['darwin', 'ios']:
        provisioning_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
 
+if provisioning_env.get('LOGGING'):
+    provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+
 ######################################################################
 # Source files and Targets
 ######################################################################
index d41b38b..2512f98 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 # //******************************************************************
 # //
 # // Copyright 2015 Samsung Electronics All Rights Reserved.
@@ -64,7 +65,8 @@ provisioning_env.AppendUnique(LIBS = ['asn1'])
 if env.get('SECURED') == '1':
     provisioning_env.AppendUnique(LIBS = ['tinydtls'])
 
-provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+if provisioning_env.get('LOGGING'):
+    provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 ######################################################################
 # Source files and Targets
index 97d272c..914db6f 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 ##
 # 'resource' sub-project main build script
 #
@@ -16,7 +17,7 @@ else:
        env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE'])
 
 if env.get('LOGGING'):
-       env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 env.ParseConfig("pkg-config --cflags --libs capi-network-wifi dlog glib-2.0")
 if 'ALL' in transport: