[check] Move the hidden symbol check into check-{def,plt}.sh

Behdad, once again the arbiter of good taste, objected to the use of
the dotfile within the Makefile, and suggested that one calls $MAKE to
pre-process the source file from within the check scripts.

Doing so removes the ugly wart added to Makefile.am...
This commit is contained in:
Chris Wilson 2008-01-11 21:13:05 +00:00
parent bcf0c442b9
commit ed113ef422
4 changed files with 10 additions and 23 deletions

View file

@ -318,16 +318,12 @@ install-data-local:
TESTS_ENVIRONMENT = srcdir="$(srcdir)" MAKE="$(MAKE)"
TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh
EXTRA_DIST += $(TESTS)
EXTRA_DIST += $(TESTS) check-has-hidden-symbols.c
check-def.sh check-plt.sh: .check-has-hidden-symbols
EXTRA_PROGRAMS = check-has-hidden-symbols
CLEANFILES += $(EXTRA_PROGRAMS) .check-has-hidden-symbols
check_has_hidden_symbols_CFLAGS = -I$(srcdir) $(CAIRO_CFLAGS)
.check-has-hidden-symbols: check-has-hidden-symbols$(EXEEXT)
@nm check-has-hidden-symbols$(EXEEXT) 2>/dev/null | grep cairo_has_hidden_symbols 2>/dev/null >/dev/null && echo 1 > $@ || echo 0 > $@
# The pre-processed result is used by check-{def,plt}.sh to determine whether
# cairo has been compiled with symbol hiding.
.c.i: $(cairo_headers) cairo-features.h $(top_builddir)/config.h
$(CPP) -DHAVE_CONFIG_H -I$(srcdir) -I$(builddir) -I$(top_builddir) $(CAIRO_CFLAGS) $< -o $@
SPARSE = sparse
sparse:

View file

@ -11,8 +11,8 @@ test -z "$srcdir" && srcdir=.
test -z "$MAKE" && MAKE=make
status=0
has_hidden_symbols=`cat .check-has-hidden-symbols`
if test "x$has_hidden_symbols" != "x1"; then
$MAKE check-has-hidden-symbols.i || exit 1
if tail -1 check-has-hidden-symbols.i | grep CAIRO_HAS_HIDDEN_SYMBOLS >/dev/null; then
echo "Compiler doesn't support symbol visibility; skipping test"
exit 0
fi

View file

@ -1,12 +1,3 @@
#include "cairoint.h"
#if CAIRO_HAS_HIDDEN_SYMBOLS
extern cairo_public int cairo_has_hidden_symbols;
int cairo_has_hidden_symbols;
#endif
int
main (void)
{
return 0;
}
CAIRO_HAS_HIDDEN_SYMBOLS

View file

@ -10,8 +10,8 @@ fi
test -z "$srcdir" && srcdir=.
status=0
has_hidden_symbols=`cat .check-has-hidden-symbols`
if test "x$has_hidden_symbols" != "x1"; then
$MAKE check-has-hidden-symbols.i || exit 1
if tail -1 check-has-hidden-symbols.i | grep CAIRO_HAS_HIDDEN_SYMBOLS >/dev/null; then
echo "Compiler doesn't support symbol visibility; skipping test"
exit 0
fi