lkml.org 
[lkml]   [2004]   [Jun]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 21 Jun 2004 11:01:34 +0200 (MEST)
FromGeert Uytterhoeven <>
SubjectRe: [PATCH 2/2] kbuild: Improved external module support
On Sun, 20 Jun 2004, Sam Ravnborg wrote:
> #   1) When using a separate output directory create a small
> #      Makefile that is a simple wrapper, calling the Makefile
> #      in the kernel tree.
> #      - This allows the user to shift to the output directory
> #        and execute make.
> #      - The Makefile is also useful to document the location
> #        source used for the kernel

> diff -Nru a/scripts/mkmakefile b/scripts/mkmakefile
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/scripts/mkmakefile	2004-06-20 23:06:03 +02:00
> @@ -0,0 +1,25 @@
> +#!/bin/sh
> +# Generates a small Makefile used in the root of the output
> +# directory, to allow make to be started from there.
> +# The Makefile also allow for more convinient build of external modules
> +
> +# Usage
> +# $1 - Kernel src directory
> +# $2 - Output directory
> +
> +
> +cat << EOF
> +
> +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.

Gr{oetje,eeting}s,
						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
-
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-2008