From eccb4696e8b0dfbe12b7983d0ef1bae61aa5f173 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 5 Mar 2010 14:40:19 +0000 Subject: Fix Makefile targets that generate several files at once In a few places in the tree the Makefiles have constructs like this: one_file another_file: $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE) This is wrong, because make will run _two copies_ of the same command at once. This generally causes races and hard-to-reproduce build failures. Notably, `make -j4' at the top level will build stubdom libxc twice simultaneously! In this patch we replace the occurrences of this construct with the correct idiom: one_file: another_file another_file: $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE) Signed-off-by: Ian Jackson --- stubdom/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'stubdom') diff --git a/stubdom/Makefile b/stubdom/Makefile index 15048f08a1..43e8e9217b 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -265,9 +265,11 @@ $(TARGETS_MINIOS): mini-os-%: .PHONY: libxc libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a -libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a:: cross-zlib +libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: cross-zlib CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C libxc-$(XEN_TARGET_ARCH) + libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a + ####### # ioemu ####### -- cgit v1.2.3