tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make .ORDER
On Tue, Jan 29, 2013 at 11:31:12PM -0800, Aaron J. Grier 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.
Neat. I take it the full syntax is something like
$(OBJS): $(SRCS) | $(OBJDIR)
?
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index