mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] headercheck: add dependency check and improve speed
Date: Wed, 23 May 2007 22:11:43 +0200	[thread overview]
Message-ID: <20070523201143.GA24481@uranus.ravnborg.org> (raw)
In-Reply-To: <1179949225.8303.27.camel@shinybook.infradead.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 <linux/auxvec.h> 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)

  reply	other threads:[~2007-05-23 20:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23 18:11 Sam Ravnborg
2007-05-23 18:45 ` Sam Ravnborg
2007-05-23 19:02   ` David Woodhouse
2007-05-23 19:34     ` Sam Ravnborg
2007-05-23 19:40       ` David Woodhouse
2007-05-23 20:11         ` Sam Ravnborg [this message]
2007-06-17 10:41 ` David Woodhouse
2007-06-17 13:15   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070523201143.GA24481@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome