Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266487AbUFUWCl (ORCPT ); Mon, 21 Jun 2004 18:02:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266488AbUFUWCk (ORCPT ); Mon, 21 Jun 2004 18:02:40 -0400 Received: from zeus.kernel.org ([204.152.189.113]:1994 "EHLO zeus.kernel.org") by vger.kernel.org with ESMTP id S266487AbUFUWC1 (ORCPT ); Mon, 21 Jun 2004 18:02:27 -0400 Date: Mon, 21 Jun 2004 23:57:05 +0200 From: Sam Ravnborg To: Geert Uytterhoeven Cc: Sam Ravnborg , Andrew Morton , Linus Torvalds , Linux Kernel Development , Andreas Gruenbacher , Kai Germaschewski Subject: Re: [PATCH 2/2] kbuild: Improved external module support Message-ID: <20040621215705.GA2903@mars.ravnborg.org> Mail-Followup-To: Geert Uytterhoeven , Sam Ravnborg , Andrew Morton , Linus Torvalds , Linux Kernel Development , Andreas Gruenbacher , Kai Germaschewski References: <20040620211905.GA10189@mars.ravnborg.org> <20040620212353.GD10189@mars.ravnborg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1227 Lines: 38 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/