From: Elan Ruusamäe Date: Tue, 3 Mar 2009 22:49:29 +0000 (+0000) Subject: - include %{_smp_mflags} for __make/__scons/__waf/__cmake X-Git-Tag: auto/th/rpm-build-macros-1_508-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=commitdiff_plain;h=708b151410f35a1aa74acc48060ff86b13554d23 - include %{_smp_mflags} for __make/__scons/__waf/__cmake Changed files: rpm.macros -> 1.508 --- diff --git a/rpm.macros b/rpm.macros index 01e238a..406e16d 100644 --- a/rpm.macros +++ b/rpm.macros @@ -9,16 +9,25 @@ %kgcc_package gcc # compiler version -%cc_version %{expand:%%global cc_version %(%{__cc} -dumpversion || echo ERROR)}%cc_version +%cc_version %{expand:%%global cc_version %(%{__cc} -dumpversion || echo ERROR)}%cc_version %cxx_version %{expand:%%global cxx_version %(%{__cxx} -dumpversion || echo ERROR)}%cxx_version -%__rm /bin/rm --interactive=never +%__rm /bin/rm --interactive=never # Build system path macros. -# -%__autoconf autoconf %{?debug:-Wall} -%__automake automake -a -c -f --foreign -%__autopoint autopoint --force +%__autoconf autoconf %{?debug:-Wall} +%__automake automake -a -c -f --foreign +%__autopoint autopoint --force + +# add parallel build flags: -jN +%__make make %{?_smp_mflags} +%__scons scons %{?_smp_mflags} +%__waf waf %{?_smp_mflags} +%__cmake cmake %{?_smp_mflags} + +%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\ + && RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN); \\\ + [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$(($RPM_BUILD_NCPUS * 2))") %__gettextize { \ if grep -qs 'AM_GNU_GETTEXT.*external' configure.{ac,in} ; then \ @@ -56,10 +65,6 @@ # and that both p and q are package names (i.e. no version/release). %_dependency_whiteout %{nil} -%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\ - && RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN); \\\ - [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$(($RPM_BUILD_NCPUS * 2))") - #----------------------------------------------------------------- # # (re)definition of %{rpm*flags} with %filterout_* support