You can build LibreOffice into another directory than your checkout. This helps keep the source code tree clean and eases building multiple versions.