Intrusive Makefile for d-programming-language.org

mta`chrono chrono at mta-international.net
Sun Jan 15 05:28:39 PST 2012


> 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.

You're right! Makefiles shouldn't do anything outside their own
directory, but building the website is a little bit complicated as
d-progamming-language.org relys on the sources of druntime and phobos to
generate the documentation.

I think it can not be avoided in this particular case. The Makefile has
to do some work in the parent folder.

BUT, it's probably best to add a "README.md" and give a short
explanation of how to build the website.

----
mkdir -p /tmp/workdir
cd /tmp/workdir
git checkout ...
git checkout ...
git checkout ...
make -f ....
move BLA to your /var/www/public_html folder
rm -rf /var/workdir
----


More information about the Digitalmars-d mailing list