mumps/Makefiles-Serialize-libseq-libplat-mommond_mod-for-parallel-builds.patch
Egbert Eich aeef0aa46c Accepting request 673166 from home:eeich:branches:science
- Simpify naming scheme.
- Fix more dependencies.
- Rename package: test -> examples.
- Create HPC master package for doc and examples.
- Fix shared library builds.
- Build example binaries against shared libs for all builds.
- Add Makefiles-Serialize-libseq-libplat-mommond_mod-for-parallel-builds.patch:
  make sure builds are serialized for 'make -j <n>'

OBS-URL: https://build.opensuse.org/request/show/673166
OBS-URL: https://build.opensuse.org/package/show/science/mumps?expand=0&rev=12
2019-02-10 18:24:35 +00:00

93 lines
2.0 KiB
Diff

From: Egbert Eich <eich@suse.com>
Date: Sun Feb 10 17:16:51 2019 +0100
Subject: Makefiles: Serialize libseq, libplat, mommond_mod for parallel builds
Patch-mainline: Not yet
Git-commit: d8e18ae193f2fd67761c8226a3ad9bcf80d4230c
References:
Signed-off-by: Egbert Eich <eich@suse.com>
---
Makefile | 17 ++++++++++-------
src/Makefile | 10 ++++++----
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 4636e85..489753b 100644
--- a/Makefile
+++ b/Makefile
@@ -9,18 +9,18 @@ default: dexamples
.PHONY: default alllib all c z s d \
sexamples dexamples cexamples zexamples multi_example \
- mumps_lib requiredobj libseqneeded clean
+ mumps_lib common requiredobj libseqneeded clean
alllib: c z s d
all: cexamples zexamples sexamples dexamples multi_example
-c:
+c: requiredobj
$(MAKE) ARITH=c mumps_lib
-z:
+z: requiredobj
$(MAKE) ARITH=z mumps_lib
-s:
+s: requiredobj
$(MAKE) ARITH=s mumps_lib
-d:
+d: requiredobj
$(MAKE) ARITH=d mumps_lib
@@ -36,7 +36,10 @@ Makefile.inc:
include Makefile.inc
-mumps_lib: requiredobj
+common:
+ (cd src ; $(MAKE) common)
+
+mumps_lib:
(cd src ; $(MAKE) $(ARITH))
cexamples: c
@@ -54,7 +57,7 @@ dexamples: d
multi_example: s d c z
(cd examples ; $(MAKE) multi)
-requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
+requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) common
# dummy MPI library (sequential version)
diff --git a/src/Makefile b/src/Makefile
index 88fc032..5a3c6e2 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,13 +12,13 @@ default: d
.PHONY: default s d c z mumps_lib clean
-s:
+s: common
$(MAKE) ARITH=s mumps_lib
-d:
+d: common
$(MAKE) ARITH=d mumps_lib
-c:
+c: common
$(MAKE) ARITH=c mumps_lib
-z:
+z: common
$(MAKE) ARITH=z mumps_lib
include $(topdir)/Makefile.inc
@@ -74,6 +74,8 @@ OBJS_COMMON_OTHER = \
mumps_thread.o \
mumps_save_restore_C.o
+common: $(OBJS_COMMON_MOD)
+
OBJS_MOD = \
$(ARITH)ana_aux_par.o \
$(ARITH)ana_lr.o\