From: Mark Wooding Date: Fri, 7 Jun 2013 21:03:40 +0000 (+0100) Subject: build: Don't make libraries for precomputation utilities on demand. X-Git-Tag: 2.2.1~14 X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/commitdiff_plain/5bd808a6591d299489a6e7af6a4c00ae40410e35 build: Don't make libraries for precomputation utilities on demand. If `make' is in parallel mode, it will fire off multiple simultaneous builds of the same library, and they interfere with each other. Instead, just arrange that the libraries are made when we try to distribute things. --- diff --git a/Makefile.am b/Makefile.am index 5b393f7..101d533 100644 --- a/Makefile.am +++ b/Makefile.am @@ -107,6 +107,12 @@ SUBDIRS += t ###-------------------------------------------------------------------------- ### Distribution. +## Make sure the precomputed tables are available. Hang this off of any +## distributed file. +mLib.pc.in: ensure-precomp-libs +ensure-precomp-libs: + for d in ui utils; do (cd $$d && $(MAKE) all) || exit 1; done + ## Release number. dist-hook:: echo $(VERSION) >$(distdir)/RELEASE diff --git a/hash/Makefile.am b/hash/Makefile.am index 938b605..fa829e0 100644 --- a/hash/Makefile.am +++ b/hash/Makefile.am @@ -48,7 +48,6 @@ PRECOMPS += $(precomp)/crc32-tab.c if !CROSS_COMPILING $(precomp)/crc32-tab.c: @$(mkdir_p) $(precomp) - @$(build_util_libs) @$(MAKE) crc-mktab$(EXEEXT) $(AM_V_GEN)./crc-mktab -o $@.new \ -p0x04c11db7 -b32 -B8 -r -c \ @@ -80,7 +79,6 @@ PRECOMPS += $(precomp)/unihash-global.c if !CROSS_COMPILING $(precomp)/unihash-global.c: @$(mkdir_p) $(precomp) - @$(build_util_libs) @$(MAKE) unihash-mkstatic$(EXEEXT) $(AM_V_GEN)./unihash-mkstatic -c -sunihash_global -iunihash.h \ -o$@.new && mv $@.new $@ diff --git a/vars.am b/vars.am index 2450f28..33f5495 100644 --- a/vars.am +++ b/vars.am @@ -83,13 +83,6 @@ UTIL_LIBS = \ $(top_builddir)/ui/libui.la \ $(top_builddir)/utils/libutils.la -## Making sure they're built properly. Without this, `make dist' on a bare -## source tree fails hopelessly. -build_util_libs = \ - for i in ui utils; do \ - (cd $(top_builddir)/$$i && $(MAKE) lib$$i.la) || exit 1; \ - done - ###-------------------------------------------------------------------------- ### Testing.