Driver Installation Ubuntu kernel 2.6.17 Basic Help
Bryan Kadzban
bryan
Thu Apr 5 09:45:52 PDT 2007
On Thu, Apr 05, 2007 at 09:43:47AM -0400, Bob Beers wrote:
> (I think bash has deprecated that usage in favor of "$()", but I don't know
> which way is more portable across different shells.)
Backticks are definitely more portable, as any sh-compatible shell will
support them. $(...) is bash-only AFAIK; it was introduced because it's
hard to nest backticks properly (they need to be escaped up to the level
of nesting). I hadn't heard that backticks were deprecated though.
(Not that it really matters; I suspect the OP is using bash anyway.)
> (it should be the same as ./, but hey, your mileage will obviously vary)
Well, "./" is the current working directory *at the time the expression
is evaluated by the shell that make uses*. When you use -C, the first
thing that make does is change directories to the argument that you pass
to -C (to find the Makefile, usually). This means that its shell will
inherit that current directory, and "./" will refer to that directory,
not whichever directory you were in when you ran make.
Whereas if you use $(pwd) or `pwd`, the shell does the process
substitution, so it runs pwd before running make (and passes the result
of pwd to make directly). Of course make will still change directories
first, but it already has the full path passed to it, so it works right.
ahuguet at cttc.es wrote:
> Now, even if I use the make -C /usr/src/linux-source-2.6.17 SUBDIRS=./
> clean doesn't seem to make any difference.
That's because you need to use `pwd` instead of ./ in all the cases.
Try this instead:
make -C /usr/src/linux-source-2.6.17 SUBDIRS=`pwd` clean
(Likewise for "make modules_install", and in fact any make target in the
kernel. They all need to use `pwd` if you build them from any directory
outside the kernel source tree.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20070405/b708de1f/attachment.pgp
More information about the Hostap
mailing list