diff options
author | D G Turner | 2013-11-07 12:58:34 +0100 |
---|---|---|
committer | D G Turner | 2013-11-24 00:48:01 +0000 |
commit | 9c025523587410371d5b2e9e4d9643e02f33b5e2 (patch) | |
tree | ebae2e7cede1acc65b3f0cd2ee3cae7a208c4beb /Makefile | |
parent | 100e45e7488e45eec46a937aa841da1372f4956d (diff) | |
download | scummvm-rg350-9c025523587410371d5b2e9e4d9643e02f33b5e2.tar.gz scummvm-rg350-9c025523587410371d5b2e9e4d9643e02f33b5e2.tar.bz2 scummvm-rg350-9c025523587410371d5b2e9e4d9643e02f33b5e2.zip |
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.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |