Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: don't append valgrind CPPFLAGS if not installed (macOS) #1019

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ case $host_os in
# These Homebrew packages may be keg-only, meaning that they won't be found
# in expected paths because they may conflict with system files. Ask
# Homebrew where each one is located, then adjust paths accordingly.
valgrind_prefix=`$BREW --prefix valgrind 2>/dev/null`
if test x$valgrind_prefix != x; then
if $BREW list --versions valgrind >/dev/null; then
valgrind_prefix=`$BREW --prefix valgrind 2>/dev/null`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
valgrind_prefix=`$BREW --prefix valgrind 2>/dev/null`
valgrind_prefix=$($BREW --prefix valgrind 2>/dev/null)

See https://github.com/koalaman/shellcheck/wiki/SC2006

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the Bash FAQ says " ... is the legacy syntax required by only the very oldest of non-POSIX-compatible bourne-shells." But then if we want to perform that cleanup, we should do this change in the entire file...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I wasn't going to make other random cleanups.

VALGRIND_CPPFLAGS="-I$valgrind_prefix/include"
fi
else
Expand Down