[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
exception to Paul's Second Rule?
From: |
Noel Yap |
Subject: |
exception to Paul's Second Rule? |
Date: |
Thu, 16 Oct 2003 10:04:46 -0400 |
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.