From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764838AbXEWUKx (ORCPT ); Wed, 23 May 2007 16:10:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755849AbXEWUKq (ORCPT ); Wed, 23 May 2007 16:10:46 -0400 Received: from pasmtpa.tele.dk ([80.160.77.114]:54112 "EHLO pasmtpA.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbXEWUKq (ORCPT ); Wed, 23 May 2007 16:10:46 -0400 Date: Wed, 23 May 2007 22:11:43 +0200 From: Sam Ravnborg To: David Woodhouse Cc: LKML , Linus Torvalds Subject: Re: [PATCH] headercheck: add dependency check and improve speed Message-ID: <20070523201143.GA24481@uranus.ravnborg.org> References: <20070523181140.GA23425@uranus.ravnborg.org> <20070523184502.GD23425@uranus.ravnborg.org> <1179946939.8303.23.camel@shinybook.infradead.org> <20070523193434.GA23924@uranus.ravnborg.org> <1179949225.8303.27.camel@shinybook.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1179949225.8303.27.camel@shinybook.infradead.org> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2007 at 03:40:25PM -0400, David Woodhouse wrote: > On Wed, 2007-05-23 at 21:34 +0200, Sam Ravnborg wrote: > > On Wed, May 23, 2007 at 03:02:19PM -0400, David Woodhouse wrote: > > > $ make headers_check > > > $ sed -i /auxvec.h/d include/asm/Kbuild > > > $ make headers_check > > > $ sed -i /auxvec.h/d include/asm-generic/Kbuild.asm > > > $ make headers_check > > > > > > Why doesn't it recheck and fail? > > > > Because asm/auxvec.h gets pulled by asm-generic/Kbuild.asm > > Not after the 4th command in the above sequence, it doesn't. Missed that. This fixes it. Sam diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 6d74b54..7fa28b8 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -51,7 +51,7 @@ ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)$(BIASMDIR)) endif # file generated during checktime listing depfiles and incfiles -depsfile := $(INSTALL_HDR_PATH)/$(_dst)/.check.cmd +depsfile := $(INSTALL_HDR_PATH)/$(_dst)/.check.d checkfile := $(INSTALL_HDR_PATH)/$(_dst)/check @@ -135,15 +135,16 @@ echo "\# endif" ; \ echo "\#endif /* $$STUBDEF */" ; \ ) > $@ -.PHONY: __headersinst __headerscheck +PHONY += __headersinst __headerscheck ifdef HDRCHECK __headerscheck: $(subdir-y) $(checkfile) $(Q): -.PHONY: FORCE +PHONY += FORCE +targets += $(checkfile) $(checkfile): FORCE - $(if $?, $(call cmd,check)) + $(call if_changed,check) $(Q)touch $(checkfile) # Include autogenerated file listing depfiles and incfiles @@ -151,6 +152,15 @@ ifneq ($(wildcard $(depsfile)),) include $(depsfile) endif +targets := $(wildcard $(sort $(targets))) +cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) + +ifneq ($(cmd_files),) + include $(cmd_files) +endif + + + $(checkfile) : $(depfiles) # dummy rule - cannot be made $(depfiles) : ; @@ -195,7 +205,8 @@ altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y) $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm$(BIASMDIR) # Recursion -.PHONY: $(subdir-y) +PHONY += $(subdir-y) $(subdir-y): $(Q)$(MAKE) $(hdrinst)=$(obj)/$@ dst=$(_dst)/$@ rel=../$(rel) +.PHONY: $(PHONY)