From 28e7d9aa4dfa2373652cac423d2f148255202cf2 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 17 Sep 2012 08:15:23 +0200 Subject: [PATCH] Fix sanity failure on Mac OS X. * src/sanity/Makefile.am: Pass TOPBUILD to includes.test, and split the tests in different targets. * src/sanity/includes.test: Add include directories to bin/'s headers. --- src/sanity/Makefile.am | 23 ++++++++++++++++++----- src/sanity/includes.test | 8 +++++++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/sanity/Makefile.am b/src/sanity/Makefile.am index f252fdab6..90e3097e2 100644 --- a/src/sanity/Makefile.am +++ b/src/sanity/Makefile.am @@ -1,7 +1,8 @@ -## Copyright (C) 2010, 2011 Laboratoire de Recherche et Développement -## de l'Epita (LRDE). +## -*- coding: utf-8 -*- +## Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et +## Développement de l'Epita (LRDE). ## Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), -## département Systèmes Répartis Coopératifs (SRC), Université Pierre +## département Systèmes Répartis Coopératifs (SRC), Université Pierre ## et Marie Curie. ## ## This file is part of Spot, a model checking library. @@ -26,19 +27,31 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS) # Run `make TESTHEADER=foo.hh check' if you want to check only one # header. -check-local: +check-80columns: INCDIR='$(top_srcdir)/src' \ $(SHELL) $(srcdir)/80columns.test $(TESTHEADER) + +check-style: INCDIR='$(top_srcdir)/src' \ $(SHELL) $(srcdir)/style.test $(TESTHEADER) + +check-readme: top_srcdir='$(top_srcdir)' \ $(PERL) $(srcdir)/readme.test + +check-includes: CXX='$(CXX)' \ - CPPFLAGS='$(AM_CPPFLAGS) $(CPPFLAGS)' \ + CPPFLAGS='$(AM_CPPFLAGS) $(CPPFLAGS) $(DEFS)' \ CXXFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' \ INCDIR='$(top_srcdir)/src' \ + TOPBUILD='$(top_builddir)' \ $(SHELL) $(srcdir)/includes.test $(TESTHEADER) +.PHONY: check-80columns check-style check-readme check-includes +check-local: check-80columns check-style check-readme check-includes + + + # Ensure we have not forgotten to include an header. installcheck-local: CXX='$(CXX)' \ diff --git a/src/sanity/includes.test b/src/sanity/includes.test index 5e84ef5d3..355e1d8e4 100755 --- a/src/sanity/includes.test +++ b/src/sanity/includes.test @@ -30,7 +30,13 @@ for file in `find "$INCDIR" \( -name "${1-*}.hh" \ #include <$file> #include <$file> EOF - if $CXX $CPPFLAGS -DSKIP_DEPRECATED_WARNING $CXXFLAGS -c incltest.cc; then + + case $file in + *bin/*) MOREFLAGS="-I $TOPBUILD/lib/ -I $INCDIR/../lib/ -I $TOPBUILD";; + *) MOREFLAGS=;; + esac + + if $CXX $MOREFLAGS $CPPFLAGS -DSKIP_DEPRECATED_WARNING $CXXFLAGS -c incltest.cc; then echo "PASS: $file" else echo "FAIL: $file"