Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266165AbUFUJCF (ORCPT ); Mon, 21 Jun 2004 05:02:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266168AbUFUJCF (ORCPT ); Mon, 21 Jun 2004 05:02:05 -0400 Received: from witte.sonytel.be ([80.88.33.193]:57512 "EHLO witte.sonytel.be") by vger.kernel.org with ESMTP id S266165AbUFUJCA (ORCPT ); Mon, 21 Jun 2004 05:02:00 -0400 Date: Mon, 21 Jun 2004 11:01:34 +0200 (MEST) From: Geert Uytterhoeven To: Sam Ravnborg cc: Andrew Morton , Linus Torvalds , Linux Kernel Development , Andreas Gruenbacher , Kai Germaschewski Subject: Re: [PATCH 2/2] kbuild: Improved external module support In-Reply-To: <20040620212353.GD10189@mars.ravnborg.org> Message-ID: References: <20040620211905.GA10189@mars.ravnborg.org> <20040620212353.GD10189@mars.ravnborg.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1851 Lines: 57 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/