qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] Makefile: Remove generated files when doing 'distclean' (


From: Markus Armbruster
Subject: Re: [PATCH v2] Makefile: Remove generated files when doing 'distclean' (and 'clean')
Date: Tue, 08 Oct 2019 20:19:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Daniel P. Berrangé <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]