diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-03-05 14:40:19 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-03-05 14:40:19 +0000 |
commit | eccb4696e8b0dfbe12b7983d0ef1bae61aa5f173 (patch) | |
tree | e3a0433d71f64d89eaa22f6dca662b24cc99312e /tools/xenstat | |
parent | 2fcc5699d4f9f43e6edc78271123e42d051a0edc (diff) | |
download | xen-eccb4696e8b0dfbe12b7983d0ef1bae61aa5f173.tar.gz xen-eccb4696e8b0dfbe12b7983d0ef1bae61aa5f173.tar.bz2 xen-eccb4696e8b0dfbe12b7983d0ef1bae61aa5f173.zip |
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 <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/xenstat')
-rw-r--r-- | tools/xenstat/libxenstat/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile index b40992959f..44313c77fe 100644 --- a/tools/xenstat/libxenstat/Makefile +++ b/tools/xenstat/libxenstat/Makefile @@ -107,7 +107,8 @@ SWIG_FLAGS=-module xenstat -Isrc # Python bindings PYTHON_VERSION=2.3 PYTHON_FLAGS=-I/usr/include/python$(PYTHON_VERSION) -lpython$(PYTHON_VERSION) -$(PYSRC) $(PYMOD): bindings/swig/xenstat.i +$(PYMOD): $(PYSRC) +$(PYSRC): bindings/swig/xenstat.i swig -python $(SWIG_FLAGS) -outdir $(@D) -o $(PYSRC) $< $(PYLIB): $(PYSRC) @@ -128,7 +129,8 @@ endif # Perl bindings PERL_FLAGS=`perl -MConfig -e 'print "$$Config{ccflags} -I$$Config{archlib}/CORE";'` -$(PERLSRC) $(PERLMOD): bindings/swig/xenstat.i +$(PERLMOD): $(PERLSRC) +$(PERLSRC): bindings/swig/xenstat.i swig -perl $(SWIG_FLAGS) -outdir $(@D) -o $(PERLSRC) $< $(PERLLIB): $(PERLSRC) |