diff --git a/ChangeLog b/ChangeLog index 335de6ae9..5f0b31c6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-04-23 Alexandre Duret-Lutz + * src/sanity/Makefile.am, src/sanity/includes.test: New files. + * src/Makefile.am (SUBDIRS): Add sanity. + * configure.ac: Output src/sanity/Makefile.in. + * src/tgbatest/Makefile.am (check_PROGRAMS): Move ltl2tgba ... (noinst_PROGRAMS): ... here. * iface/gspn/Makefile.am (check_PROGRAMS): Rename as ... diff --git a/configure.ac b/configure.ac index b60594ed0..85001121b 100644 --- a/configure.ac +++ b/configure.ac @@ -50,25 +50,26 @@ AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind]) AC_CONFIG_FILES([ Makefile - doc/Makefile doc/Doxyfile + doc/Makefile iface/Makefile iface/gspn/Makefile iface/gspn/defs src/Makefile - src/ltlenv/Makefile src/ltlast/Makefile + src/ltlenv/Makefile src/ltlparse/Makefile src/ltltest/Makefile src/ltltest/defs src/ltlvisit/Makefile + src/misc/Makefile + src/sanity/Makefile src/tgba/Makefile src/tgbaalgos/Makefile src/tgbaalgos/gtec/Makefile src/tgbaparse/Makefile src/tgbatest/Makefile src/tgbatest/defs - src/misc/Makefile wrap/Makefile wrap/python/Makefile wrap/python/cgi/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index b8fdd5cb4..14b09d8fa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -## Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6), +## Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), ## département Systèmes Répartis Coopératifs (SRC), Université Pierre ## et Marie Curie. ## @@ -24,7 +24,7 @@ AUTOMAKE_OPTIONS = subdir-objects # List directories in the order they must be built. # Keep tests at the end. SUBDIRS = misc ltlenv ltlast ltlvisit ltlparse tgba tgbaalgos tgbaparse . \ - ltltest tgbatest + ltltest tgbatest sanity lib_LTLIBRARIES = libspot.la libspot_la_SOURCES = diff --git a/src/sanity/Makefile.am b/src/sanity/Makefile.am new file mode 100644 index 000000000..42eb4d9e1 --- /dev/null +++ b/src/sanity/Makefile.am @@ -0,0 +1,43 @@ +## Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), +## département Systèmes Répartis Coopératifs (SRC), Université Pierre +## et Marie Curie. +## +## This file is part of Spot, a model checking library. +## +## Spot 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; either version 2 of the License, or +## (at your option) any later version. +## +## Spot 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 Spot; see the file COPYING. If not, write to the Free +## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +## 02111-1307, USA. + +AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) +AM_CXXFLAGS = $(WARNING_CXXFLAGS) + +# Run `make TESTHEADER=foo.hh check' if you want to check only one +# header. +check-local: + CXX='$(CXX)' \ + CPPFLAGS='$(AM_CPPFLAGS) $(CPPFLAGS)' \ + CXXFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' \ + INCDIR='$(top_srcdir)/src' \ + $(SHELL) $(srcdir)/includes.test $(TESTHEADER) + +# Ensure we have not forgotten to include an header. +installcheck-local: + CXX='$(CXX)' \ + CPPFLAGS='-I $(includedir) -I$(pkgincludedir) $(LIBGSPN_CPPFLAGS) $(CPPFLAGS)' \ + CXXFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' \ + INCDIR='$(pkgincludedir)' \ + $(SHELL) $(srcdir)/includes.test $(TESTHEADER) + + +CLEANFILES = failures incltest.* diff --git a/src/sanity/includes.test b/src/sanity/includes.test new file mode 100755 index 000000000..01b8d15e1 --- /dev/null +++ b/src/sanity/includes.test @@ -0,0 +1,25 @@ +#! /bin/sh + +# Check that each header is self contained and generates no warning. + +set -e + +rm -f failures + +for file in `find "$INCDIR" -name "${1-*}.hh" -type f -print | + sed "s,$INCDIR/,,g"`; do + echo "#include <$file>" > incltest.cc + if $CXX $CPPFLAGS $CXXFLAGS -c incltest.cc; then + echo "PASS: $file" + else + echo "FAIL: $file" + echo " $file" >> failures + fi +done + +if test -f failures; then + echo "Failed files:" + cat failures + rm failures + exit 1; +fi