summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xcheck_boost.sh16
2 files changed, 14 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index ff0aaae7..71088f3d 100644
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,8 @@ Version 0.6.7 "I said 'Step pause turn
* [all]: Include build of gtest when building gmock. (Closes: #670403)
+ * [all]: Fix check_boost.sh for out-of-tree builds
+
- Documentation:
* [doc]: Apply patch from Ubuntu: update Finnish manpage to point to
diff --git a/check_boost.sh b/check_boost.sh
index 59c378fc..2ffb8244 100755
--- a/check_boost.sh
+++ b/check_boost.sh
@@ -18,20 +18,28 @@ BOOST_PATTERN='boost/[a-zA-Z0-9_./-]*\.hpp'
# Exclude headers that are only used, e.g., to write configure tests.
BOOST_CONFIGURE_PATTERN="$BOOST_PATTERN"' dnl$'
+SRCDIR=${srcdir:-.}
+
+if [ ! -f $SRCDIR/configure.ac ]
+then
+ echo "Could not locate configure.ac."
+ exit 2
+fi
+
# Check that the source code and the configure check look for the same
# Boost headers.
-SRC_OCCURRENCES=$((find src \( -name \*.cc -or -name \*.h \) -print0; find tests \( -name \*.cc -or -name \*.h \) -print0) \
+SRC_OCCURRENCES=$((find $SRCDIR/src \( -name \*.cc -or -name \*.h \) -print0; find $SRCDIR/tests \( -name \*.cc -or -name \*.h \) -print0) \
| xargs -0 grep -h --only-matching "$BOOST_PATTERN" | sort -u)
-if ! grep -h --only-matching "$BOOST_CONFIGURE_PATTERN" configure.ac | sed 's/ dnl$//' | sort -c
+if ! grep -h --only-matching "$BOOST_CONFIGURE_PATTERN" $SRCDIR/configure.ac | sed 's/ dnl$//' | sort -c
then
echo "The list of Boost headers in configure.ac is not sorted."
RESULT=2
fi
-CONFIGURE_OCCURRENCES=$(grep -h --only-matching "$BOOST_CONFIGURE_PATTERN" configure.ac | sed 's/ dnl$//' | sort -u)
+CONFIGURE_OCCURRENCES=$(grep -h --only-matching "$BOOST_CONFIGURE_PATTERN" $SRCDIR/configure.ac | sed 's/ dnl$//' | sort -u)
-if ! cmp <(echo "$SRC_OCCURRENCES") <(echo "$CONFIGURE_OCCURRENCES")
+if ! cmp <(echo "$SRC_OCCURRENCES") <(echo "$CONFIGURE_OCCURRENCES") >/dev/null
then
ONLY_SRC=$(comm -2 -3 <(echo "$SRC_OCCURRENCES") <(echo "$CONFIGURE_OCCURRENCES"))
ONLY_CONFIG=$(comm -1 -3 <(echo "$SRC_OCCURRENCES") <(echo "$CONFIGURE_OCCURRENCES"))