[Devel] [PATCH] cr_tests: Prettify toplevel Makefile

Matt Helsley matthltc at us.ibm.com
Sun Jul 12 20:19:25 PDT 2009


Simplify the toplevel Makefile to avoid the need for a subshell by
using make -C foo instead of ( cd foo ; make ). Also use the MAKE
variable instead of "make" to re-invoke.

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index cf88ed1..5af82d6 100644
--- a/Makefile
+++ b/Makefile
@@ -5,11 +5,11 @@ targets = ns_exec
 
 all: $(targets)
 	for s in $(SUBDIRS) ; do \
-		( cd $$s ; make ) ; \
+		$(MAKE) -C $$s ; \
 	done
 
 clean:
 	rm -f $(targets)
 	for s in $(SUBDIRS) ; do \
-		( cd $$s ; make clean ) ; \
+		$(MAKE) -C $$s $@ ; \
 	done
-- 
1.5.6.3

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list