Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933388AbcCNEpX (ORCPT ); Mon, 14 Mar 2016 00:45:23 -0400 Received: from mail-ob0-f171.google.com ([209.85.214.171]:34707 "EHLO mail-ob0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933347AbcCNEpT (ORCPT ); Mon, 14 Mar 2016 00:45:19 -0400 MIME-Version: 1.0 In-Reply-To: References: <1457828035-30584-1-git-send-email-yamada.masahiro@socionext.com> From: Andy Lutomirski Date: Sun, 13 Mar 2016 21:44:59 -0700 Message-ID: Subject: Re: [PATCH] kbuild: drop FORCE from PHONY targets To: Masahiro Yamada Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , Russell King , Michal Marek , "linux-kernel@vger.kernel.org" , "linux-kbuild@vger.kernel.org" , Nathan Lynch , Tony Luck , "linux-ia64@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "H. Peter Anvin" , X86 ML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 66 On Sun, Mar 13, 2016 at 9:36 PM, Masahiro Yamada wrote: > 2016-03-14 13:28 GMT+09:00 Andy Lutomirski : >> On Sun, Mar 13, 2016 at 9:08 PM, Masahiro Yamada >> wrote: >>> >>> Hi Andy >>> >>> 2016-03-14 9:39 GMT+09:00 Andy Lutomirski : >>> > On Mar 12, 2016 4:14 PM, "Masahiro Yamada" >>> > wrote: >>> >> >>> >> These targets are marked as PHONY. No need to add FORCE to their >>> >> dependency. >>> > >>> > If this is, in fact, correct, can you update >>> > Documentation/kbuild/makefiles.txt as well? >>> >>> Which line do you want me to update? >>> >> >> All the references to FORCE should probably mention .PHONY as an alternative. > > I do not get your point. > > All the examples in the makefile.txt correctly reference to FORCE. > They are not PHONY targets. > No need to update. But they could be. For example: $(obj)/image: vmlinux FORCE $(call if_changed,objcopy) could be: .PHONY: $(obj)/image $(obj)/image: vmlinux $(call if_changed,objcopy) I would at least change: Note: It is a typical mistake to forget the FORCE prerequisite. to: Note: if-changed is only useful if make executes it, which won't happen if it determines that the inputs have not changed since the output was built. This can be avoided by specifying FORCE as a prerequisite or by making declaring the output as .PHONY. --Andy > > > > > -- > Best Regards > Masahiro Yamada -- Andy Lutomirski AMA Capital Management, LLC