
* Makefile.am (LOCAL_RECURSIVE_TARGETS): Remove pretty-check. ($(LOCAL_RECURSIVE_TARGETS)): Recurse in scribo/ too. (pretty-check): New target, recursing only in milena/. * milena/tests/tests-recursive.mk: Move... * build-aux/tests-recursive.mk: ...here. * milena/tests/tests.mk: Adjust. Remove old comments. * scribo/Makefile.am (tests): New target. (bin): Use common idioms. * scribo/tests/tests.mk: Include milena/tests/tests-recursive.mk. --- ChangeLog | 15 ++++++++ Makefile.am | 10 ++++-- {milena/tests => build-aux}/tests-recursive.mk | 0 milena/tests/tests.mk | 11 +------ scribo/Makefile.am | 7 +++- scribo/tests/tests.mk | 42 ++++++++++++++--------- 6 files changed, 53 insertions(+), 32 deletions(-) rename {milena/tests => build-aux}/tests-recursive.mk (100%) diff --git a/ChangeLog b/ChangeLog index da9a4dd..4e49879 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2013-02-06 Roland Levillain <roland@lrde.epita.fr> + + Equip Scribo with a recursive `tests' target. + + * Makefile.am (LOCAL_RECURSIVE_TARGETS): Remove pretty-check. + ($(LOCAL_RECURSIVE_TARGETS)): Recurse in scribo/ too. + (pretty-check): New target, recursing only in milena/. + * milena/tests/tests-recursive.mk: Move... + * build-aux/tests-recursive.mk: ...here. + * milena/tests/tests.mk: Adjust. + Remove old comments. + * scribo/Makefile.am (tests): New target. + (bin): Use common idioms. + * scribo/tests/tests.mk: Include milena/tests/tests-recursive.mk. + 2010-10-27 Roland Levillain <roland@lrde.epita.fr> Add advice about the release process. diff --git a/Makefile.am b/Makefile.am index 73def28..cb82a4d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012 EPITA Research and +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012, 2013 EPITA Research and # Development Laboratory (LRDE). # # This file is part of Olena. @@ -28,10 +28,14 @@ if ENABLE_SCRIBO endif ENABLE_SCRIBO # Target shortcuts delegating the actual action to milena/Makefile. -LOCAL_RECURSIVE_TARGETS = pretty-check tests +LOCAL_RECURSIVE_TARGETS = tests +.PHONY: $(LOCAL_RECURSIVE_TARGETS) $(LOCAL_RECURSIVE_TARGETS): cd milena && $(MAKE) $(AM_MAKEFLAGS) $@ -.PHONY: $(LOCAL_RECURSIVE_TARGETS) + cd scribo && $(MAKE) $(AM_MAKEFLAGS) $@ +.PHONY: pretty-check +pretty-check: + cd milena && $(MAKE) $(AM_MAKEFLAGS) $@ # Regen files recursively. include $(top_srcdir)/build-aux/regen-recursive.mk diff --git a/milena/tests/tests-recursive.mk b/build-aux/tests-recursive.mk similarity index 100% rename from milena/tests/tests-recursive.mk rename to build-aux/tests-recursive.mk diff --git a/milena/tests/tests.mk b/milena/tests/tests.mk index 85ee5d5..1f32738 100644 --- a/milena/tests/tests.mk +++ b/milena/tests/tests.mk @@ -19,19 +19,10 @@ ## You should have received a copy of the GNU General Public License ## along with Olena. If not, see <http://www.gnu.org/licenses/>. - -# FIXME: Revamp (see Olena 0.11's test suite). - # Look for Milena header in srcdir and for (generated) test headers # (like data.hh) in builddir. AM_CPPFLAGS = -I$(top_srcdir)/milena -I$(top_builddir)/milena -# FIXME: Add -# -# AM_CXXFLAGS = $(CXXFLAGS_STRICT) $(CXXFLAGS_DEBUG) -# -# when oln.m4 (or just a part of it) is available in the distribution, -# instead of using the hand-made TESTS_CXXFLAGS. TESTS_CXXFLAGS = @TESTS_CXXFLAGS@ AM_CXXFLAGS = $(TESTS_CXXFLAGS) @@ -55,4 +46,4 @@ TIFF_LDFLAGS = @TIFF_LDFLAGS@ # Inject rules to compile tests (recursively), without running them. -include $(top_srcdir)/milena/tests/tests-recursive.mk +include $(top_srcdir)/build-aux/tests-recursive.mk diff --git a/scribo/Makefile.am b/scribo/Makefile.am index a8ce510..46133ae 100644 --- a/scribo/Makefile.am +++ b/scribo/Makefile.am @@ -18,9 +18,12 @@ SUBDIRS = demo tests src .PHONY: bin - bin: - make -C src + cd src && $(MAKE) $(AM_MAKEFLAGS) $@ + +.PHONY: tests +tests: + cd tests && $(MAKE) $(AM_MAKEFLAGS) $@ # Regen files recursively. include $(top_srcdir)/build-aux/regen-recursive.mk diff --git a/scribo/tests/tests.mk b/scribo/tests/tests.mk index d95e4d2..7918569 100644 --- a/scribo/tests/tests.mk +++ b/scribo/tests/tests.mk @@ -1,19 +1,23 @@ -# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory -# (LRDE). -# -# This file is part of Olena. -# -# Olena is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, version 2 of the License. -# -# Olena is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Olena. If not, see <http://www.gnu.org/licenses/>. +## tests.mk -*- Makefile-Automake -*- + +## Shared configuration for tests. + +## Copyright (C) 2009, 2010, 2013 EPITA Research and Development +## Laboratory (LRDE). +## +## This file is part of Olena. +## +## Olena is free software: you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free +## Software Foundation, version 2 of the License. +## +## Olena is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Olena. If not, see <http://www.gnu.org/licenses/>. AM_CPPFLAGS = \ -I$(top_srcdir)/scribo \ @@ -36,4 +40,8 @@ QT_CPPFLAGS = @QT_CPPFLAGS@ QT_LDFLAGS = @QT_LDFLAGS@ @QT_LIBS@ TESSERACT_CPPFLAGS = @TESSERACT_CPPFLAGS@ -TESSERACT_LDFLAGS = @TESSERACT_LDFLAGS@ \ No newline at end of file +TESSERACT_LDFLAGS = @TESSERACT_LDFLAGS@ + + +# Inject rules to compile tests (recursively), without running them. +include $(top_srcdir)/build-aux/tests-recursive.mk -- 1.7.2.5