check_headers 525 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
#! /bin/sh
# Copyright © 2008 Rémi Denis-Courmont

cd "$(dirname "$0")" || exit $?

# Look for configure #defines in public headers.
# There are incorrect, as external users don't have our <config.h>.
regexp="$(cat ../config.h.in | \
	sed -n -e 's/^#undef \([A-Z0-9_]*\)$/\1/p' | \
10
	grep -v 'WORDS_BIGENDIAN' | \
11
	grep -v '__LIBVLC__' | \
12
	xargs | \
13
    sed -e 's/ /\\\(\\s\\\|$\\\)\\\| /g')"
14
regexp=" $regexp\$"
15

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
16 17 18
echo Looking for private defines in public headers...
! grep -- "$regexp" "$@" || exit $?
echo "None found."