chiark / gitweb /
build: Don't make libraries for precomputation utilities on demand.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 7 Jun 2013 21:03:40 +0000 (22:03 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 21 Jun 2013 10:55:26 +0000 (11:55 +0100)
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.

Makefile.am
hash/Makefile.am
vars.am

index 5b393f71ce07c518d2e52d0a43ef7e671fb44a71..101d53383b196a2a0f17080307ba604eb689c720 100644 (file)
@@ -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
index 938b605ec6de108daf5e28e83f352cde756f9b82..fa829e0739e59192a45a70cf2d607178a02418e0 100644 (file)
@@ -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 2450f28b42cec1c53f6310e5c25353e6c6b30238..33f54953f9f354a43484ca6e0d1a87589ad86406 100644 (file)
--- 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.