From patchwork Fri Apr 12 21:52:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 2438231 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 94F14DF2A1 for ; Fri, 12 Apr 2013 21:52:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753164Ab3DLVwt (ORCPT ); Fri, 12 Apr 2013 17:52:49 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:53077 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752796Ab3DLVws (ORCPT ); Fri, 12 Apr 2013 17:52:48 -0400 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id D1AF312E06D; Fri, 12 Apr 2013 15:54:25 -0600 (MDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id E02CFE4103; Fri, 12 Apr 2013 15:52:45 -0600 (MDT) Message-ID: <5168822C.6040303@wwwdotorg.org> Date: Fri, 12 Apr 2013 15:52:44 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Vineet Gupta CC: "linux-arch@vger.kernel.org" , linux-kernel@vger.kernel.org, Michal Marek , Stephen Warren , Grant Likely , linux-kbuild@vger.kernel.org, Sam Ravnborg Subject: Re: [PATCH] Kbuild: Avoid DTB rebuilds if source files are untouched References: <1364973141-16354-1-git-send-email-vgupta@synopsys.com> <515BD6B8.1020607@synopsys.com> <515C5652.8070705@wwwdotorg.org> <515D0FFB.4030803@synopsys.com> <515DBA0E.6000604@wwwdotorg.org> <51642158.3070205@synopsys.com> <5167BA67.5080403@synopsys.com> In-Reply-To: <5167BA67.5080403@synopsys.com> X-Enigmail-Version: 1.4.6 X-Virus-Scanned: clamav-milter 0.97.7 at avon.wwwdotorg.org X-Virus-Status: Clean Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org On 04/12/2013 01:40 AM, Vineet Gupta wrote: > On 04/09/2013 07:40 PM, Vineet Gupta wrote: >> On 04/04/2013 11:06 PM, Stephen Warren wrote: >> >>> +.SECONDARY: $(obj)/%.dtb.S >>> + >>> $(obj)/%.dtb.S: $(obj)/%.dtb >>> $(call cmd,dt_S_dtb) >>> >>> and no longer see make rm'ing the .dtb.S file. So, the .SECONDARY is >>> behaving as expected, and should fix your problem. >> Interestingly, if I make the file name explicit, .SECONDARY works for me too. >> >> .SECONDARY: $(obj)/angel4.dtb.S >> >> http://stackoverflow.com/questions/5426934/why-this-makefile-removes-my-goal >> >> Is this a make bug or is it related to when the rule is parsed by make ! >> >> -Vineet > > Ping ? Anyone know how to resolve this After installing the ARC toolchain (which was a bit painful to track down and install...) I reproduced your exact problem. I believe the patch below fixes it: Signed-off-by: Stephen Warren --- 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/arch/arc/boot/dts/Makefile b/arch/arc/boot/dts/Makefile index 5776835..2f2cf23 100644 --- a/arch/arc/boot/dts/Makefile +++ b/arch/arc/boot/dts/Makefile @@ -8,6 +8,8 @@ endif obj-y += $(builtindtb-y).dtb.o targets += $(builtindtb-y).dtb +.SECONDARY: $(obj)/$(builtindtb-y).dtb.S + dtbs: $(addprefix $(obj)/, $(builtindtb-y).dtb) clean-files := *.dtb