[Mageia-dev] problem with %_smp_mflags in Cauldron

Christiaan Welvaart cjw at daneel.dyndns.org
Sun Jan 6 18:10:23 CET 2013


On Sun, 6 Jan 2013, Pascal Terjan wrote:

> Anyone against such patch? I would change _smp_mflags to %([
> %_build_ncpus -gt 1 ] && echo "-j%_build_ncpus -l%_build_ncpus") later
>
> [pterjan at chopin trunk]$ svn diff
> Index: build.macros.in
> ===================================================================
> --- build.macros.in	(revision 7023)
> +++ build.macros.in	(working copy)
> @@ -207,9 +207,10 @@
> %{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")
> +# Define _build_ncpus which can be reused with non-make build systems
> +# Needs to be sent upstream
> +%_build_ncpus		%([ -n "$RPM_BUILD_NCPUS" ] && echo "$RPM_BUILD_NCPUS"
> || /usr/bin/getconf _NPROCESSORS_ONLN)
> +%_smp_mflags		%([ %_build_ncpus -gt 1 ] && echo "-j%_build_ncpus")
>
> %_make_bin make
> %make %{_make_bin} %_smp_mflags

Fine. I might call it _build_njobs but of course the name is not the 
important part.


     Christiaan


More information about the Mageia-dev mailing list