diff --git a/.gitignore b/.gitignore
index cdf37962a..a5f7248c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
 # Build directory
-[Bb]uild/
+[Bb]uild*/
 doc-build/
 
 # Generated source files