On my .spec file I want to pass
alias make=gmake -j3, using a bash script I did
alias make="gmake -j3"
how to do in a .spec file?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You do not want to add
-j3. That is settings just for your machine. You want to add something that will work everywhere:
This macro is by default set to:
%_smp_mflags %( \ [ -z "$RPM_BUILD_NCPUS" ] \\\ && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ if [ "$RPM_BUILD_NCPUS" -gt 16 ]; then \\\ echo "-j16"; \\\ elif [ "$RPM_BUILD_NCPUS" -gt 3 ]; then \\\ echo "-j$RPM_BUILD_NCPUS"; \\\ else \\\ echo "-j3"; \\\ fi )
I.e. more or less to number of your CPUs. On your machine it can be 3. On my machine it is 8.