Message ID | 70d48001851ef7d188d07b2b0846548bd142f246.1302181786.git.ext-andriy.shevchenko@nokia.com |
---|---|
State | Accepted |
Commit | 2fd3de12b9afbb22adc0fe808312ca4e142dd459 |
Headers | show |
On Thu, 2011-04-07 at 16:10 +0300, Andy Shevchenko wrote: > + > +tests:: > + $(MAKE) -C $(TESTS) two colons?
On Thu, 2011-04-07 at 16:10 +0300, Artem Bityutskiy wrote: > On Thu, 2011-04-07 at 16:10 +0300, Andy Shevchenko wrote: > > + > > +tests:: > > + $(MAKE) -C $(TESTS) > > two colons? Yep, exactly. We have tests subdirectory, and we have tests rule in tests/Makefile. So, double colon here makes the rule a) independent, b) runs every time when asked.
On Thu, 2011-04-07 at 16:27 +0300, Andy Shevchenko wrote: > On Thu, 2011-04-07 at 16:10 +0300, Artem Bityutskiy wrote: > > On Thu, 2011-04-07 at 16:10 +0300, Andy Shevchenko wrote: > > > + > > > +tests:: > > > + $(MAKE) -C $(TESTS) > > > > two colons? > Yep, exactly. > > We have tests subdirectory, and we have tests rule in tests/Makefile. > So, double colon here makes the rule a) independent, b) runs every time > when asked. Ok, got it. Pushed to mtd-utils.git, thanks.
diff --git a/Makefile b/Makefile index 7ab9743..1f264e9 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ ifeq ($(WITHOUT_XATTR), 1) endif SUBDIRS = lib ubi-utils mkfs.ubifs +TESTS = tests TARGETS = ftl_format flash_erase nanddump doc_loadbios \ ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info \ @@ -38,6 +39,7 @@ ifneq ($(BUILDDIR),$(CURDIR)) endif endif endif + $(MAKE) -C $(TESTS) clean $(SYMLINKS): ln -sf ../fs/jffs2/$@ $@ @@ -59,3 +61,6 @@ install:: ${TARGETS} ${SCRIPTS} install -m 0755 ${TARGETS} ${SCRIPTS} ${DESTDIR}/${SBINDIR}/ mkdir -p ${DESTDIR}/${MANDIR}/man1 gzip -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz + +tests:: + $(MAKE) -C $(TESTS) 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)
This patch appends Makefile to the tests subdirectory and introduces tests target in the root Makefile. Additionally the clean target removes temporary stuff under tests subdirectory as well. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> --- Makefile | 5 +++++ tests/Makefile | 8 ++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) create mode 100644 tests/Makefile