Where is my help text?

Denis Vlasenko vda.linux at googlemail.com
Thu Jun 14 18:25:01 UTC 2007


On Wednesday 13 June 2007 09:44, Bernhard Fischer wrote:
> On Tue, Jun 12, 2007 at 10:56:20PM +0200, Denis Vlasenko wrote:
> >Fixed:
> >
> >+++ busybox.2/applets/Kbuild    2007-06-12 22:51:54.000000000 +0200
> >@@ -9,6 +9,7 @@ obj-y   += applets.o
> >
> > # Generated file needs additional love
> >
> >+applets/usage:     .config
> > applets/applets.o: .config include/usage_compressed.h
> 
> Well, shouldn't this work automagically as usage.c should depend on
> usage_compressed.h (which it doesn't) and usage_compressed.h should
> depend on .config ?
> 
> While the hunk above may work, i'm not confident that it is correct..
> Thoughts?

I'm not very good at makefiles.

Let's see.

applets/applets.o: .config include/usage_compressed.h

hostprogs-y += usage
always := $(hostprogs-y)
HOSTCFLAGS_usage.o = -I$(srctree)/include

include/usage_compressed.h: .config $(srctree)/include/usage.h applets/usage
        $(call cmd,gen_usage_compressed)

Well, usage_compressed.h will be re-generated if .config changes, but
it is regenerated by running applets/usage, which can be stale.
That's why adding

applets/usage:     .config

helps - make realizes that usage must be rebuilt first.

Ok, strictly speaking, we can remove .config from usage_compressed.h
dependencies.

I don't know why we have $(srctree)/include/usage.h listed explicitly
as a dependency. Quick experiment shows that we don't need it...

How about this patch?
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6.patch
Type: text/x-diff
Size: 1459 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070614/a354bfc1/attachment-0002.bin 


More information about the busybox mailing list