aboutsummaryrefslogtreecommitdiffstats
path: root/tools/flask
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-03-05 14:40:19 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-03-05 14:40:19 +0000
commiteccb4696e8b0dfbe12b7983d0ef1bae61aa5f173 (patch)
treee3a0433d71f64d89eaa22f6dca662b24cc99312e /tools/flask
parent2fcc5699d4f9f43e6edc78271123e42d051a0edc (diff)
downloadxen-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/flask')
-rw-r--r--tools/flask/policy/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/flask/policy/Makefile b/tools/flask/policy/Makefile
index 4c0d428b57..e39f0761ea 100644
--- a/tools/flask/policy/Makefile
+++ b/tools/flask/policy/Makefile
@@ -166,7 +166,8 @@ $(LOADPATH): policy.conf
#
# Load the binary policy
#
-reload tmp/load: $(LOADPATH) $(FCPATH)
+tmp/load: reload
+reload: $(LOADPATH) $(FCPATH)
@echo "Loading $(NAME) $(LOADPATH)"
$(QUIET) $(LOADPOLICY) $(LOADPATH)
@touch tmp/load
@@ -205,7 +206,8 @@ tmp/post_te_files.conf: $(POST_TE_FILES)
# extract attributes and put them first. extract post te stuff
# like genfscon and put last. portcon, nodecon, and netifcon
# is delayed since they are generated by m4
-tmp/all_attrs_types.conf tmp/only_te_rules.conf tmp/all_post.conf: tmp/all_te_files.conf tmp/post_te_files.conf
+tmp/all_attrs_types.conf tmp/all_post.conf: tmp/only_te_rules.conf
+tmp/only_te_rules.conf: tmp/all_te_files.conf tmp/post_te_files.conf
$(QUIET) grep ^attribute tmp/all_te_files.conf > tmp/all_attrs_types.conf || true
$(QUIET) grep '^type ' tmp/all_te_files.conf >> tmp/all_attrs_types.conf
$(QUIET) cat tmp/post_te_files.conf > tmp/all_post.conf