tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make .ORDER



On Tue, Jan 22, 2013 at 05:26:51PM +0000, David Holland wrote:
> IME using make rules for directories never works all that well,
> though.

GNU's make has order-only prerequisites using the pipe | character that
works for directories.

http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

$(OBJS): | $(OBJDIR)

$(OBJDIR):
        mkdir -p $(OBJDIR)

touching $(OBJDIR) doesn't cause the objects to be rebuilt, as it would
if they were normal prereqs.

.ORDER has always seemed like a hack to get around troubles with
expressing inter-directory dependencies for a recursive make.

I've often thought it would be either a good test of makefile mettle or
dastardly fiendish to have an option to make which chose leaf nodes of
the dependency tree at random, to see if your dependency rules are
actually complete.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | 
agrier%poofygoof.com@localhost


Home | Main Index | Thread Index | Old Index