From patchwork Wed Aug 10 23:16:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 1055142 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7ANHVXH003872 for ; Wed, 10 Aug 2011 23:17:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755343Ab1HJXRb (ORCPT ); Wed, 10 Aug 2011 19:17:31 -0400 Received: from casper.infradead.org ([85.118.1.10]:36407 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755292Ab1HJXRa (ORCPT ); Wed, 10 Aug 2011 19:17:30 -0400 Received: from i7.infradead.org ([2001:8b0:10b:1:225:64ff:fee8:e9df]) by casper.infradead.org with esmtpsa (Exim 4.76 #1 (Red Hat Linux)) id 1QrI1Q-0006sp-37; Wed, 10 Aug 2011 23:17:12 +0000 Subject: Re: [PATCH 2/2] Enable 'make CONFIG_FOO=y oldconfig' From: David Woodhouse To: Arnaud Lacombe Cc: Michal Marek , "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Date: Thu, 11 Aug 2011 00:16:49 +0100 In-Reply-To: References: <1312067499.22074.59.camel@i7.infradead.org> <1312067670.22074.61.camel@i7.infradead.org> <4E34998D.8060806@zytor.com> <4E4140B3.7090802@suse.cz> <4E4280BA.9050109@suse.cz> <1312981658.2989.39.camel@i7.infradead.org> <1312985888.2989.46.camel@i7.infradead.org> <1312993987.2989.53.camel@i7.infradead.org> <1312999168.2989.61.camel@i7.infradead.org> <1313002322.2989.88.camel@i7.infradead.org> X-Mailer: Evolution 3.0.2 (3.0.2-3.fc15) Message-ID: <1313018232.2989.114.camel@i7.infradead.org> Mime-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html 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 (demeter1.kernel.org [140.211.167.41]); Wed, 10 Aug 2011 23:17:32 +0000 (UTC) On Wed, 2011-08-10 at 18:33 -0400, Arnaud Lacombe wrote: > > We're not enabling anything that we're later going to break. I can't see > > many people *depending* on the fact that 'make CONFIG_SATA_MV=y > > oldconfig' actually does *nothing* in some cases. > > > you are wrong, you ends up with half-baked compile-time dependency, > which break the build: s/*nothing*/nothing useful/, for crying out loud. The point remains that we're not enabling anything which we're later going to break. Nobody is going to come to *depend* on this behaviour. And anyway, this behaviour exists even *before* my patches, as Michal pointed out in a far more helpful and constructive fashion in earlier today. It's simple enough to fix, too: diff --git a/Makefile b/Makefile index 1fc5172..6cc7f7b 100644 --- a/Makefile +++ b/Makefile @@ -474,6 +474,9 @@ ifeq ($(KBUILD_EXTMOD),) endif endif +# This could probably be simpler? +CONFIG_OVERRIDES := $(patsubst line:%,%,$(filter line:%,$(foreach var, $(filter CONFIG_%,$(.VARIABLES)), $(origin $(var)):$(var)))) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets). @@ -507,6 +510,10 @@ else # Build targets only - this includes vmlinux, arch specific targets, clean # targets and others. In general all targets except *config targets. +ifneq ($(CONFIG_OVERRIDES),) +$(error Cannot perform build targets with CONFIG symbols overridden) +endif + ifeq ($(KBUILD_EXTMOD),) # Additional helpers built in scripts/ # Carefully list dependencies so we do not try to build scripts twice