From 5a428bd9fe1c08c6189a83b2bc3d613f513315bb Mon Sep 17 00:00:00 2001
From: "Thiago Marcos P. Santos" <tmpsantos@gmail.com>
Date: Fri, 20 Jul 2012 15:16:32 +0300
Subject: [PATCH] build: fixed target dependency issues

tests and tools depends on libraries generated by the src target. Adding
as dependency at the Makefile inside these respective folders is not
enough since libseccomp uses recursive make.

Signed-off-by: Thiago Marcos P. Santos <thiago.santos@intel.com>
---
 Makefile |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 60bce3d..b54f4c9 100644
--- a/Makefile
+++ b/Makefile
@@ -71,7 +71,15 @@ $(VERSION_HDR): version_info.mk
 	echo "#define VERSION_RELEASE \"$(VERSION_RELEASE)\"" >> $$hdr; \
 	echo "#endif" >> $$hdr;
 
-$(SUBDIRS_BUILD): $(VERSION_HDR) $(CONFIGS)
+src: $(VERSION_HDR) $(CONFIGS)
+	@echo "INFO: building in directory $@/ ..."
+	@$(MAKE) -s -C $@
+
+tests: src
+	@echo "INFO: building in directory $@/ ..."
+	@$(MAKE) -s -C $@
+
+tools: src
 	@echo "INFO: building in directory $@/ ..."
 	@$(MAKE) -s -C $@
 
-- 
1.7.9.5

