From patchwork Tue Jun 7 15:29:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 857492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p57FTrpR031904 for ; Tue, 7 Jun 2011 15:29:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753774Ab1FGP3x (ORCPT ); Tue, 7 Jun 2011 11:29:53 -0400 Received: from cantor.suse.de ([195.135.220.2]:59360 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341Ab1FGP3x (ORCPT ); Tue, 7 Jun 2011 11:29:53 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 146F98FEA2; Tue, 7 Jun 2011 17:29:52 +0200 (CEST) Received: by sepie.suse.cz (Postfix, from userid 10020) id 79651764E2; Tue, 7 Jun 2011 17:29:51 +0200 (CEST) Date: Tue, 7 Jun 2011 17:29:50 +0200 From: Michal Marek To: Arnaud Lacombe Cc: linux-kbuild@vger.kernel.org Subject: Re: [RFCv3] Kbuild: factor parser rules Message-ID: <20110607152950.GA4612@sepie.suse.cz> References: <1306138239-13440-1-git-send-email-lacombar@gmail.com> <1307121412-6314-1-git-send-email-lacombar@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1307121412-6314-1-git-send-email-lacombar@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 07 Jun 2011 15:29:54 +0000 (UTC) On Fri, Jun 03, 2011 at 01:16:52PM -0400, Arnaud Lacombe wrote: > Hi Michal, > > Here is some update concerning the parser generation merge. I do not repost the > whole serie as it may be overkill. You can find the latest branch at: > > git://github.com/lacombar/linux-2.6.git kbuild-implicit-parser-rule > > You'll find an updated diff between v2 [rebased on top of v3.0-rc1] and v3 > below. > > Changes since v2: > - allow a parser to specify the prefix to be used. This will allow for multiple > parser to use the implicit rules, which was not previously possible, as it > was using the `yy' default. > - drop the zconf prefix changes > - add a `baseprereq' global to kbuild, which mimics `basetarget' > - rebase on top of v3.0-rc1 Nice. But it still breaks the _shipped rule for files other than those handled explicitely. I guess the problem you are trying to solve is the double-colon in rule? That was added back in 2002 by http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=2e8556ce and it looks to me like a hack to make the _shipped rule fire early enough. Maybe it's not needed nowadays at all, because 53c700.o is a normal object file and not the final module. Nevertheless, if I change it to a normal rule and delete the ones added by you, it all works fine except for genksyms: I'll look into the problem with genksyms later today. Michal --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index f76d9ba..520f958 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -192,20 +192,10 @@ endif quiet_cmd_shipped = SHIPPED $@ cmd_shipped = cat $< > $@ -$(obj)/%.tab.c: $(src)/%.tab.c_shipped - $(call cmd,shipped) - -$(obj)/%.tab.h: $(src)/%.tab.h_shipped - $(call cmd,shipped) -$(obj)/%.lex.c: $(src)/%.lex.c_shipped +$(obj)/%: $(src)/%_shipped $(call cmd,shipped) -$(obj)/%.hash.c: $(src)/%.hash.c_shipped - $(call cmd,shipped) - -$(obj)/%:: $(src)/%_shipped - # Commands useful for building a boot image # =========================================================================== #