tizen: Introduce speedpython macro to speedup build
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Tue, 2 Aug 2016 09:42:16 +0000 (18:42 +0900)
committerZiran Sun <ziran.sun@samsung.com>
Mon, 26 Sep 2016 10:32:14 +0000 (10:32 +0000)
revise build time

Change-Id: I674157a6b446c8fad54cb7c8a2a937007f04db8a
Author: Youngjae Shin <yj99.shin@samsung.com>
Origin: https://review.tizen.org/gerrit/#/c/82272/3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12051
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashwini Kumar <k.ashwini@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
tools/tizen/iotivity.spec

index 650f305a153cb1b3e80b2360d9dca1896f7ba53b..dc083d92a083ef8ac46655791f3184ed764c1847 100644 (file)
@@ -24,7 +24,9 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(sqlite3)
 Requires(postun): /sbin/ldconfig
 Requires(post): /sbin/ldconfig
-
+%if 0%{?speedpython}
+%en_speedpython
+%endif
 
 ## If tizen 2.x, RELEASE follows tizen_build_binary_release_type_eng. ##
 ## and if tizen 3.0, RELEASE follows tizen_build_devel_mode. ##
@@ -108,7 +110,13 @@ cp %{SOURCE1001} ./%{name}-test.manifest
 %define RPM_ARCH "x86"
 %endif
 
-scons -j2 --prefix=%{_prefix} \
+%define JOB "-j4"
+
+%if 0%{?speedpython}
+%define JOB %{?_smp_mflags}
+%endif
+
+scons %{JOB} --prefix=%{_prefix} \
        VERBOSE=%{VERBOSE} \
        TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
        RELEASE=%{RELEASE} SECURED=%{SECURED} WITH_TCP=%{WITH_TCP} WITH_CLOUD=%{WITH_CLOUD} LOGGING=%{LOGGING} ROUTING=%{ROUTING} \