[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make: Unexpected Behavior with Dependencies and include Statement
From: |
Edward Welbourne |
Subject: |
Re: Make: Unexpected Behavior with Dependencies and include Statement |
Date: |
Wed, 23 Sep 2015 20:33:21 +0000 |
> I was thinking to build the objects but not the dependencies. We do a lot
> of one-time only builds, where we don't need dependencies at all.
In that case, leave out the include of any .d whose .o doesn't exist;
you fatuously know you need to build the .o, so you don't need to know
its dependencies. <code>
src = various.c
obj = $(src:.c=.o)
# etc.
dep = $(patsubst %.o %.d, $(wildcard $(obj)))
ifneq (,$(dep))
-include $(dep)
endif
</code>
If you *also* build .d as a side-effect of building each .o, you'll have
all needed .d files in time for the next build.
Eddy.
- Make: Unexpected Behavior with Dependencies and include Statement, John Westing, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, John Westing, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, Mike Shal, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, Paul Smith, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, John Westing, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, Paul Smith, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, John Westing, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, Paul Smith, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, John Westing, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement, Paul Smith, 2015/09/23
- Re: Make: Unexpected Behavior with Dependencies and include Statement,
Edward Welbourne <=