[jamming] Automatic creation of target directories
Alen Ladavac
alenl-ml at croteam.com
Thu May 10 03:02:07 PDT 2007
Craig wrote:
> What's the advantage Alen? Are you struggling for an optimization? ;)
Yeah... optimization of my time writing a matching MkDir for each target
file created, and tracking down the instances where I forgot it. :)
Anyway, I did the change here:
==== make1.c#18 (text) ====
if( t->actions )
{
+ /* Prepare its dir first. */
+ if ( ! (t->flags&T_FLAG_NOTFILE) ) {
+ makefiledir(t->boundname);
+ }
+
++counts->total;
if( DEBUG_MAKE && !( counts->total % 100 ) )
-----------------
And it works well. Btw, makefiledir() is a function I added
previously, for some other changes I made. I can provide the source
for it if someone wants it.
Cheers,
Alen
More information about the jamming
mailing list