fix parallel build issues with APFS/HFS+/ext2/3 in netlib-lapack

The problem is that OpenBLAS sets the LAPACKE_LIB and the TMGLIB to the
same object and uses the `ar` feature to update the archive file. If the
underlying filesystem does not have sub-second timestamp resolution and
the system is fast enough (or `ccache` is used), the timestamp of the
builds which should be added to the previously generated archive is the
same as the archive file itself and therefore `make` does not update the
archive.

Since OpenBLAS takes care to not run the different targets updating the
archive in parallel, the easiest solution is to declare the respective
targets `.PHONY`, forcing `make` to always update them.

fixes #1682
This commit is contained in:
Tiziano Müller 2018-10-06 14:10:02 +02:00
parent f7f97c6148
commit 79ea839b63
3 changed files with 6 additions and 0 deletions

View File

@ -2454,6 +2454,8 @@ endif
all: ../../$(LAPACKELIB)
.PHONY: ../../$(LAPACKELIB)
../../$(LAPACKELIB): $(OBJ_A) $(OBJ_B) $(DEPRECATED) $(EXTENDED) $(MATGEN)
$(ARCH) $(ARCHFLAGS) $@ $(OBJ_A)
$(ARCH) $(ARCHFLAGS) $@ $(OBJ_B)

View File

@ -552,6 +552,8 @@ endif
all: ../$(LAPACKLIB)
.PHONY: ../$(LAPACKLIB)
../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
$(RANLIB) $@

View File

@ -57,6 +57,8 @@ all: ../../$(TMGLIB)
ALLOBJ = $(SMATGEN) $(CMATGEN) $(SCATGEN) $(DMATGEN) $(ZMATGEN) \
$(DZATGEN)
.PHONY: ../../$(TMGLIB)
../../$(TMGLIB): $(ALLOBJ)
$(ARCH) $(ARCHFLAGS) $@ $^
$(RANLIB) $@