scripts/package: don't break if %{_smp_mflags} isn't set
authorJeremy Kerr <jk@ozlabs.org>
Sat, 25 Oct 2008 22:02:47 +0000 (15:02 -0700)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 29 Oct 2008 21:02:08 +0000 (22:02 +0100)
Currently, if we do a 'make rpm-pkg' without the _smp_mflags rpm macro
defined, the build fails with:

  [snip]
  Executing(%build): /bin/bash -e /var/tmp/rpm-tmp.67959
  + umask 022
  + cd /home/jk/devel/kernel-snapshot/rpm/BUILD
  + cd kernel-2.6.26
  + make clean
  + make '%{_smp_mflags}'
  make[3]: *** No rule to make target `%{_smp_mflags}'.  Stop.
  error: Bad exit status from /var/tmp/rpm-tmp.67959 (%build)

This change uses the 'null if not set' reference to the _smp_mflags
macro instead.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/package/mkspec

index 62c5ffdf2fdf4f64608ede4d667f9e88cf4a2ef2..2500886fb90aa0273743cc67ba40da48c6b4fa5c 100755 (executable)
@@ -57,7 +57,7 @@ fi
 echo "%build"
 
 if ! $PREBUILT; then
-echo "make clean && make %{_smp_mflags}"
+echo "make clean && make %{?_smp_mflags}"
 echo ""
 fi