cvs commit: src/sys/conf kmod.mk

Bruce Evans bde at zeta.org.au
Fri Apr 22 06:50:59 PDT 2005


On Thu, 21 Apr 2005, Ruslan Ermilov wrote:

> On Thu, Apr 21, 2005 at 05:43:25PM +1000, Bruce Evans wrote:
>> Another dependency bug that sometimes bites me: "make" doesn't work
>> after "make clean", at least under the old version of -current that I
>> use, because dependencies for lots of generated sources (like device_if.c
>> (?)) are missing.  Dependencies for older generated files like
>> vnode_if.c are handled correctly, and "make depend" doesn't have
>> the problem because the necessary dependencies are in BEFORE_DEPEND.
>>
> Maybe this is only an old bug, as there are these lines in kern.post.mk:
>
> .if !exists(${.OBJDIR}/.depend)
> ${SYSTEM_OBJS}: assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/}
> .endif

Note that this only works when .depend doesn't exist (it works using the
usual hack of making all objects depend on all geaders in that case).

> At least "make -n kernel >/dev/null" after "make clean" doesn't
> complain now.

I check that it doesn't work after "make depend; make; make clean".  The
first error is for amd64's GENERIC is:

%%%
In file included from ./../../../dev/aic7xxx/aic7xxx_osm.h:44,
                  from aic7xxx_reg_print.c:9:
../../../sys/bus.h:461:23: device_if.h: No such file or directory
%%%

This can be worked around using either "rm .depend" or "make cleandepend"
so that the above hack works, or using "make depend" which creates all
the generated sources as a side effect.

>> I think the default for NOCLEAN should be to not rebuild dependencies.
>> It is supposed to be fast at the expense of correctness.
>>
> So do I, but I also want it to be a case for the kernel build.
>
>> You often
>> want it to restart a build from where it failed, and then you don't
>> especially want it to rebuild all the makefiles before that point.
>>
> Yes, agreed.  In case of upgrades, it's easy to "make cleandepend"
> first.

I agree with the change in behaviour in your other mail (make
"make depend" behave the same for kernels as for applications).  To
be complete, the stupid message printed by config(8) should be expanded
to give a reminder about not forgetting to run ``make cleandepend'' ;-).

Bruce


More information about the cvs-src mailing list