lkml.org 
[lkml]   [2004]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] kbuild: Improved external module support
On Mon, Jun 21, 2004 at 11:01:34AM +0200, Geert Uytterhoeven wrote:
> > +
> > +KERNELSRC := $1
> > +KERNELOUTPUT := $2
> > +
> > +MAKEFLAGS += --no-print-directory
> > +
> > +all:
> > + \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
> > +
> > +%:
> > + \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
> > +
> > +EOF
>
> The generated Makefile looks sufficiently similar to the one I'm using, so I'm
> wondering: Does it work if I say e.g. `make drivers/char/mem.o'? For me that
> part never worked, but `make drivers/char/' does work.

The Makefile is derived from the one you posted, I just typed it by hand.
Therefore the variable names differ.

In the "Match-Anything Rules::" part of 'info make' the trick needed to
let 'make drivers/char/mem.o' work was described - thanks for reminding me of this issue.

The match-anything rule must be marked as terminal rule using double-colon - viola.

So the rule now looks:
%::
\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@


Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans