buildroot question -- how can a target be made to depend on the k ernel?
Doyle, Patrick
WPD at dtccom.com
Mon Jan 23 19:58:31 UTC 2006
Technically, this is really a Makefile question, but I didn't anybody would
want to read it if the subject line said "Makefile question" :-)
I have run into a problem with a makefile fragment in the buildroot chain.
The fragment looks something like this:
madwifi-ng: $(LINUX_KERNEL) $(MADWIFI_DIR)/.compiled
blah blah blah
The problem is, at the time that "madwifi-ng.mk" gets included into the top
level makefile, $(LINUX_DIR) has not yet been defined. (It gets defined
later, when ..../linux.mk gets included into the top level makefile).
Consequently, madwifi-ng does not list $(LINUX_KERNEL) as one of its
prerequisites.*
How do folks solve this elsewere? -- basically, there is a depenency
between my madwifi-ng target and whatever makefile fragment exists that is
supposed to define $(LINUX_KERNEL). It would be simplest if I knew that it
would always be the linux.mk in the Soekris tree, but that's not going to be
the case.
Any thoughts?
--wpd
* If you don't believe me, try the following simple example:
=====================================
#A = something
all: $(A) b
@echo making all, A = $(A)
A = something
b:
@echo making b
something:
@echo making something
=====================================
Change the point at which $(A) gets defined and you'll get different
results. It is particularly annoying because regardless of when $(A) gets
defined, the "@echo making all, A = $(A)" command always prints out the
correct value for $(A).
More information about the uClibc
mailing list