Message ID | d47b1aaa839631e454cbfeb14684ca851d941d43.1302002802.git.ext-andriy.shevchenko@nokia.com |
---|---|
State | New, archived |
Headers | show |
On Tue, Apr 5, 2011 at 7:33 AM, Andy Shevchenko <ext-andriy.shevchenko@nokia.com> wrote > > -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) We don't want the tests installed by default, do we? If we do for some reason, it might be better to stick them in /usr/libexec/mtd-utils/ or /usr/share/mtd-utils/ or something. I doubt we need them sitting in /usr/sbin,/sbin,/bin,/usr/bin on 99% of the installs. josh
On Tue, 2011-04-05 at 08:44 -0400, Josh Boyer wrote: > On Tue, Apr 5, 2011 at 7:33 AM, Andy Shevchenko > <ext-andriy.shevchenko@nokia.com> wrote > > > > -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) > > We don't want the tests installed by default, do we? If we do for > some reason, it might be better to stick them in > /usr/libexec/mtd-utils/ or /usr/share/mtd-utils/ or something. I > doubt we need them sitting in /usr/sbin,/sbin,/bin,/usr/bin on 99% of > the installs. I agree that installing tests should be a separate option.
On Tuesday 05 April 2011 14:44:24 Josh Boyer wrote: > On Tue, Apr 5, 2011 at 7:33 AM, Andy Shevchenko > <ext-andriy.shevchenko@nokia.com> wrote > > > -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) > > We don't want the tests installed by default, do we? If we do for > some reason, it might be better to stick them in > /usr/libexec/mtd-utils/ or /usr/share/mtd-utils/ or something. I > doubt we need them sitting in /usr/sbin,/sbin,/bin,/usr/bin on 99% of > the installs. Most embedded distributions would prefer tests to be disabled by default. If this is absolutely required, they should still be built as a separate Make target. -- Florian
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)
Also, append Makefile to the tests subdirectory. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> --- Makefile | 4 ++-- tests/Makefile | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 tests/Makefile