summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-03-26 19:42:41 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-03-29 00:17:46 +0100
commitba33d1f3cf0b9143963f13dd1ea05c93b1db8864 (patch)
tree38f8fa6c341a9002353ec8d2814d99e46f7f34ee
parent07c73773777a88139603adbd23af13d3a6662dfe (diff)
downloadgstreamer-common-ba33d1f3cf0b9143963f13dd1ea05c93b1db8864.tar.gz
parallel-subdirs.mak: snippet to include in Makefiles to build subdirectories in parallel
Build sub-directories in parallel if make -jN is used. We'll descend into the sub-directories a second time after the first parallel run, but at that point there shouldn't be anything left to do. Assumes there are no dependencies between any of the sub-directories.
-rw-r--r--parallel-subdirs.mak13
1 files changed, 13 insertions, 0 deletions
diff --git a/parallel-subdirs.mak b/parallel-subdirs.mak
new file mode 100644
index 0000000..36885df
--- /dev/null
+++ b/parallel-subdirs.mak
@@ -0,0 +1,13 @@
+# include this at the end of $MODULE/ext/Makefile.am to force make to
+# build subdirectories in parallel when make -jN is used. We will end up
+# descending into all subdirectories a second time, but only after the first
+# (parallel) run has finished, so it should go right through the second time.
+
+.PHONY: independent-subdirs $(SUBDIRS)
+
+independent-subdirs: $(SUBDIRS)
+
+$(SUBDIRS):
+ $(MAKE) -C $@
+
+all-recursive: independent-subdirs