4c9460
From 89df36524bace71decee4ab4f979d4ffb449c9a7 Mon Sep 17 00:00:00 2001
4c9460
From: Panu Matilainen <pmatilai@redhat.com>
4c9460
Date: Wed, 22 Jan 2014 10:56:00 +0200
4c9460
Subject: [PATCH] Add %make_build macro for hiding parallel-build magic from
4c9460
 specs (ticket #115)
4c9460
4c9460
- This allows simplifying the make invokations from specs. In particular
4c9460
  the parallel build options no longer need to be messed with from specs,
4c9460
  and %__make can be overridden to force a different make implementation
4c9460
  to be used throughout the spec.
4c9460
- While a lot of software builds correctly in parallel, there are always
4c9460
  exceptions... together with _smp_ncpus_max macro this can now be
4c9460
  expressed with a separate "%global _smp_ncpus_max 1" (or any other
4c9460
  arbitrary value beyond which parallel build is buggy) line which
4c9460
  is easy to grep for and experiment with.
4c9460
---
4c9460
 macros.in | 4 ++++
4c9460
 1 file changed, 4 insertions(+)
4c9460
4c9460
diff --git a/macros.in b/macros.in
4c9460
index 5a075a3..9c7a111 100644
4c9460
--- a/macros.in
4c9460
+++ b/macros.in
4c9460
@@ -861,6 +861,10 @@ package or when debugging this package.\
4c9460
 	--infodir=%{_infodir}
4c9460
 
4c9460
 #------------------------------------------------------------------------------
4c9460
+# The "make" analogue, hiding the _smp_mflags magic from specs
4c9460
+%make_build %{__make} %{?_smp_mflags}
4c9460
+
4c9460
+#------------------------------------------------------------------------------
4c9460
 # The make install analogue of %configure for modern autotools:
4c9460
 %make_install %{__make} install DESTDIR=%{?buildroot}
4c9460
 
4c9460
-- 
4c9460
2.1.0
4c9460