]> git.sur5r.net Git - i3/i3/commitdiff
configure: add build directory to gitignore (#2543)
authorMichael Stapelberg <stapelberg@users.noreply.github.com>
Mon, 7 Nov 2016 19:49:26 +0000 (11:49 -0800)
committerGitHub <noreply@github.com>
Mon, 7 Nov 2016 19:49:26 +0000 (11:49 -0800)
configure.ac

index 8829fed92a30fa59bdf795e2c65d257ad3c5bfb4..9e61d997b51022cd0f10dbd41ccf9e6282864bc0 100644 (file)
@@ -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: