From 841118e5f8b2456d61bbf3d0e65094fac3c935cc Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 7 Nov 2016 11:49:26 -0800 Subject: [PATCH] configure: add build directory to gitignore (#2543) --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 8829fed9..9e61d997 100644 --- a/configure.ac +++ b/configure.ac @@ -146,6 +146,15 @@ else print_BUILD_MANS=no fi +git_dir=`git rev-parse --git-dir 2>/dev/null` +if test -n "$git_dir"; then + srcdir=`dirname "$git_dir"` + exclude_dir=`pwd | sed "s,^$srcdir,,g"` + if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then + echo "$exclude_dir" >> "$git_dir/info/exclude" + fi +fi + echo \ "-------------------------------------------------------------------------------- build configured: -- 2.39.5