On Thu, 20 Aug 2020 at 17:56, Daniel P. Berrangé <berra...@redhat.com> wrote: > Meson requires the build dir to be separate from the source tree. Many > people are used to just running "./configure && make" though and the > meson conversion breaks that. > > This introduces some backcompat support to make it appear as if an > "in source tree" build is being done, but with the the results in the > "build/" directory. This allows "./configure && make" to work as it > did historically, albeit with the output binaries staying under build/.
> +if test "$PWD" == "$source_path" > +then > + echo "Using './build' as the directory for build output" > + rm -rf build > + mkdir -p build Can we put in a mollyguard here so we only blow away build/ if we previously auto-created it? Something like if ! -e build || -e build/created-by-configure; then rm -rf build mkdir -p build touch build/created-by-configure else echo "some helpful error message here" fi (shell syntax probably wrong but you get the idea) My current setup has multiple build-directories like build/x86, build/clang, ... and I'd like a guard against configure blowing them all away if I accidentally run it from the source tree some day. thanks -- PMM