[PATCHv1 2/3] tests: build tests by default

Andy Shevchenko ext-andriy.shevchenko at nokia.com
Tue Apr 5 07:33:09 EDT 2011


Also, append Makefile to the tests subdirectory.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko at nokia.com>
---
 Makefile       |    4 ++--
 tests/Makefile |    8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 tests/Makefile

diff --git a/Makefile b/Makefile
index 7ab9743..7269c6a 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ ifeq ($(WITHOUT_XATTR), 1)
   CPPFLAGS += -DWITHOUT_XATTR
 endif
 
-SUBDIRS = lib ubi-utils mkfs.ubifs
+SUBDIRS = lib ubi-utils mkfs.ubifs tests
 
 TARGETS = ftl_format flash_erase nanddump doc_loadbios \
 	ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info \
@@ -54,7 +54,7 @@ LDLIBS_jffs2reader  = -lz -llzo2
 
 $(BUILDDIR)/lib/libmtd.a: subdirs_lib_all ;
 
-install:: ${TARGETS} ${SCRIPTS}
+install:: ${TARGETS} ${SCRIPTS} tests
 	mkdir -p ${DESTDIR}/${SBINDIR}
 	install -m 0755 ${TARGETS} ${SCRIPTS} ${DESTDIR}/${SBINDIR}/
 	mkdir -p ${DESTDIR}/${MANDIR}/man1
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..05b37e9
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,8 @@
+
+SUBDIRS = checkfs fs-tests jittertest ubi-tests
+
+all clean tests: $(SUBDIRS)
+
+.PHONY: $(SUBDIRS)
+$(SUBDIRS):
+	$(MAKE) -C $@ $(MAKECMDGOALS)
-- 
1.6.3.3




More information about the linux-mtd mailing list