I've created the following rule:
.PRECIOUS: %/../...
%/../...:
@mkdir -p $(dir $(patsubst %/,%,$(dir $(@D)))) && : >> $(dir $(patsubst
%/,%,$(dir $(@D))))$(@F)
which lets me do stuff like:
%.o: %.c %.o/../...
%.d: %.c %.d/../...
so that parent directories are automatically created.
Since, in the end, the file corresponding to %/../... is created, is this an exception
to Paul's Second Rule (http://make.paulandlesley.org/rules.html)? What problems are
there with this rule that I'm not seeing?
If there are problems, is there something like $$(@D) for pattern rules that exists or
that can be added? What alternatives are there?
Thanks,
Noel
--
NOTICE: If received in error, please destroy and notify sender. Sender does not waive
confidentiality or privilege, and use is prohibited.
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make