Intrusive Makefile for d-programming-language.org

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jan 15 07:19:17 PST 2012


On 1/15/12 7:09 AM, Peter Alexander wrote:
> I'm not particularly well versed in Makefile ethics, but this caught me
> by surprise.
>
> Suppose I clone d-programming-language.org into my home directory (as I
> did), do some work, then later on run make clean.
>
> git clone https://.../d-programming-language.org.git
> cd d-programming-language.org
> .... do stuff ...
> make -fposix.mak clean
>
>
> Here's what clean does:
>
> rm -rf ../web ../dmd.2.056 2.056.ddoc
> rm -rf ../druntime.2.056 ../phobos.2.056
>
>
> If I had a web dir in my home directory (not exactly uncommon), it would
> have been deleted without warning. Luckily, I didn't. I now have it
> cloned into a separate dir where it can do no harm.
>
> Is it normal for Makefiles to be so intrusive? IMO, Makefiles shouldn't
> be deleting anything outside their own directory.

I'll fix that.

Andrei


More information about the Digitalmars-d mailing list