changeset 108:3b9cc76f2073

target-utils/Makefile: make clean: support for subset packaging
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 13 Sep 2013 17:00:09 +0000
parents 8b44e806b6e1
children 91460c8957f0
files target-utils/Makefile
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/Makefile	Fri Sep 13 16:47:09 2013 +0000
+++ b/target-utils/Makefile	Fri Sep 13 17:00:09 2013 +0000
@@ -10,10 +10,14 @@
 pirexplore:	libcommon libmpffs libprintf
 
 ${SUBDIR}: FRC
-	cd $@; make ${MFLAGS}
+	cd $@; ${MAKE} ${MFLAGS}
 
 clean: FRC
 	rm -f a.out core errs
-	for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
+	for i in ${SUBDIR}; do \
+		if [ -d $$i ]; then \
+			(cd $$i; ${MAKE} ${MFLAGS} clean) \
+		fi \
+	done
 
 FRC: