> From: "Noel Yap" <[EMAIL PROTECTED]>
>
> .PRECIOUS: %/../...
> %/../...:
> @mkdir -p $(dir $(patsubst %/,%,$(dir $(@D))))  &&  : >> $(dir $(patsubst
%/,%,$(dir $(@D))))$(@F)

Is there a reason why you didn't use either of:

  @mkdir -p $(dir $(dir $(dir $@)))
  @mkdir -p $(dir $(patsubst %/../...,%,$@))

I haven't tried them, but I assume they work. ;-)

I don't care for the file name you've chosen! ;-)  Would something like
".creator" be easier on the eyes?  In fact, changing the code from the "fast
lane" to the "slow lane" yields:

.PRECIOUS: %.mkdir
%.mkdir:
        @mkdir -p $(dir $@)
        @touch $@

Now I grant you, the "cool factor" of yours is way beyond the "slow"
version, but this one actually follows Paul's second rule at the cost of
more files created and visible to the user.  (Not a trivial cost, I admit.)

A very interesting idea!

Cheers,
Robert



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to