From 9c025523587410371d5b2e9e4d9643e02f33b5e2 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Partial solution for parallel make issue. This is due to the multiple outputs produced by the configure rule, which cause multiple invocations of configure when make is run in parallel. Various solutions are detailed in the Multiple-Outputs section of the GNU automake manual which apply generally to makefiles. This solution is a simpler one, but should solve the problem, though it can fail on "mutilated" trees ie. where some of the configure outputs are present, but not all... but this situation is not common, tends to be due to an error in configure and should be recoverable by a "make clean && ./configure" call. --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 45f50f99d7..88b60ca73f 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ include $(srcdir)/Makefile.common # check if configure has been run or has been changed since last run ENGINE_SUBDIRS_CONFIGURE := $(wildcard $(srcdir)/engines/*/configure.engine) -config.h config.mk engines/plugins_table.h engines/engines.mk: $(srcdir)/configure $(ENGINE_SUBDIRS_CONFIGURE) +config.h: $(srcdir)/configure $(ENGINE_SUBDIRS_CONFIGURE) ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk" @echo "Running $(srcdir)/configure with the last specified parameters" @sleep 2 @@ -95,6 +95,14 @@ else $(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters) endif +config.mk engines/plugins_table.h engines/engines.mk: config.h + @if test -f $@; then \ + touch $@; \ + else \ + rm -f config.h; \ + $(MAKE) config.h; \ + fi + ifneq ($(origin port_mk), undefined) include $(srcdir)/$(port_mk) endif -- cgit v1.2.3