[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to make dirs without races
From: |
Mark Galeck (CW) |
Subject: |
how to make dirs without races |
Date: |
Mon, 4 Mar 2013 15:16:00 -0800 |
Hello,
This worked for me:
.PRECIOUS: %/.
%/.:
mkdir -p $@
until I realized (duh) that this has a race condition, which is benign, but I
would like to avoid it nevertheless.
Well, OK, I tried this, but does not work deeper than 1 level of directories, I
guess because the chain of implicit rules does not apply (or something of that
sort)
.PRECIOUS: %/.
.SECONDEXPANSION:
%/.: $$(dir $$*).
mkdir $*
So how to do this so that it works, and without racing?
Thank you,
Mark
- how to make dirs without races,
Mark Galeck (CW) <=