Daniel P. Berrangé <berra...@redhat.com> writes: > Given that we're aiming to convert to meson, how much effort do we really > want to put into fixing this inconsistency ? > > I'd argue the best way to fix "clean" and "distclean" is to delete them > entirely. Instead enforce that builddir != srcdir when running configure, > so cleaning up simply means deleting the builddir sub-tree entirely.
I don't wish to belittle anybody's efforts at improving make targets clean and distclean, but like Daniel, I've long given up on them[*]. My "make distclean" is "rm -rf BUILD-DIR", and my "make clean" is "nuke-bld BUILD-DIR", where nuke-bld is the script below. #!/bin/sh -e if [ $# -gt 1 ] then echo "Usage: $0 [bld-dir]" >&2 exit 1 fi [ $# -eq 1 ] && cd "$1" if [ ! -e config.status ] then echo "$0: not a build tree" >&2 exit 1 fi rm -f .config.status mv config.status .config.status rm -r * mv .config.status config.status ./config.status [*] Along with .gitignore.