From: Sam Ravnborg <sam@ravnborg.org>
To: kbuild <linux-kbuild@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
David Woodhouse <dwmw2@infradead.org>,
Adrian Bunk <bunk@kernel.org>
Subject: [PATCH 02/24] kbuild: always unifdef files in headers_install*
Date: Mon, 30 Jun 2008 23:34:56 +0200 [thread overview]
Message-ID: <1214861718-32626-2-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <20080630213155.GA32479@uranus.ravnborg.org>
unifdef utility is fast enough to warrant that we always
run the scripts through unifdef.
This patch runs all headers listed with header-y and unifdef-y
through unifdef.
Next step is to drop unifdef-y in all Kbuild files and
that can now be done in smaller steps.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Adrian Bunk <bunk@kernel.org>
---
| 29 ++++++++++-------------------
1 files changed, 10 insertions(+), 19 deletions(-)
--git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 53dae3e..22b17af 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -50,25 +50,22 @@ ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)$(BIASMDIR))
_dst := include/asm
endif
-header-y := $(sort $(header-y))
-unifdef-y := $(sort $(unifdef-y))
+header-y := $(sort $(header-y) $(unifdef-y))
subdir-y := $(patsubst %/,%,$(filter %/, $(header-y)))
header-y := $(filter-out %/, $(header-y))
-header-y := $(filter-out $(unifdef-y),$(header-y))
# stamp files for header checks
-check-y := $(patsubst %,.check.%,$(header-y) $(unifdef-y) $(objhdr-y))
+check-y := $(patsubst %,.check.%,$(header-y) $(objhdr-y))
# Work out what needs to be removed
oldheaders := $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/*.h))
-unwanted := $(filter-out $(header-y) $(unifdef-y) $(objhdr-y),$(oldheaders))
+unwanted := $(filter-out $(header-y) $(objhdr-y),$(oldheaders))
oldcheckstamps := $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/.check.*.h))
unwanted += $(filter-out $(check-y),$(oldcheckstamps))
# Prefix them all with full paths to $(INSTALL_HDR_PATH)
header-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(header-y))
-unifdef-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(unifdef-y))
objhdr-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(objhdr-y))
check-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(check-y))
@@ -88,10 +85,6 @@ quiet_cmd_o_hdr_install = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
cmd_o_hdr_install = cp $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(objtree)/$(obj)/%,$@) \
$(INSTALL_HDR_PATH)/$(_dst)
-quiet_cmd_headers_install = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
- cmd_headers_install = $(HDRSED) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@) \
- > $@
-
quiet_cmd_unifdef = UNIFDEF $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
cmd_unifdef = $(UNIFDEF) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@) \
| $(HDRSED) > $@ || :
@@ -151,10 +144,10 @@ include /dev/null $(wildcard $(check-y))
else
# Rules for installing headers
-__headersinst: $(subdir-y) $(header-y) $(unifdef-y) $(altarch-y) $(objhdr-y)
+__headersinst: $(subdir-y) $(header-y) $(altarch-y) $(objhdr-y)
@true
-$(objhdr-y) $(subdir-y) $(header-y) $(unifdef-y): | $(INSTALL_HDR_PATH)/$(_dst) $(unwanted)
+$(objhdr-y) $(subdir-y) $(header-y): | $(INSTALL_HDR_PATH)/$(_dst) $(unwanted)
$(INSTALL_HDR_PATH)/$(_dst):
$(call cmd,mkdir)
@@ -164,18 +157,16 @@ $(unwanted):
$(call cmd,remove)
ifdef GENASM
-$(objhdr-y) $(header-y) $(unifdef-y): $(KBUILDFILES)
+$(objhdr-y) $(header-y): $(KBUILDFILES)
$(call cmd,gen)
else
-$(objhdr-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(objtree)/$(obj)/%.h $(KBUILDFILES)
+$(objhdr-y): $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(objtree)/$(obj)/%.h $(KBUILDFILES)
$(call cmd,o_hdr_install)
-$(header-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)
- $(call cmd,headers_install)
-
-$(unifdef-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)
+$(header-y): $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)
$(call cmd,unifdef)
+
endif
endif
@@ -184,7 +175,7 @@ hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
.PHONY: altarch-dir
# All the files in the normal arch dir must be created first, since we test
# for their existence.
-altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y)
+altarch-dir: $(subdir-y) $(header-y) $(objhdr-y)
$(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH)
$(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm$(BIASMDIR)
--
1.5.6.1.93.gef98
next prev parent reply other threads:[~2008-06-30 21:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 21:31 kbuild - pending stuff, and Maintainer news Sam Ravnborg
2008-06-30 21:34 ` [PATCH 01/24] kbuild: refactor headers_* targets in Makefile Sam Ravnborg
2008-06-30 21:34 ` Sam Ravnborg [this message]
2008-06-30 21:34 ` [PATCH 03/24] kbuild: drop support of ALTARCH for headers_* Sam Ravnborg
2008-06-30 21:34 ` [PATCH 04/24] kbuild: code refactoring in Makefile.headerinst Sam Ravnborg
2008-06-30 21:34 ` [PATCH 05/24] kbuild: error out early in make headers_install Sam Ravnborg
2008-06-30 21:35 ` [PATCH 06/24] kbuild: only one call for include/ in make headers_* Sam Ravnborg
2008-06-30 21:35 ` [PATCH 07/24] kbuild: optimize headers_* targets Sam Ravnborg
2008-06-30 21:35 ` [PATCH 08/24] kbuild: make clean removes *.o.* as well Sam Ravnborg
2008-07-01 12:10 ` Jan Engelhardt
2008-07-01 20:21 ` Sam Ravnborg
2008-06-30 21:35 ` [PATCH 09/24] kbuild: install all headers when arch is changed Sam Ravnborg
2008-06-30 21:35 ` [PATCH 10/24] kbuild: prepare headers_* for arch/$ARCH/include Sam Ravnborg
2008-06-30 21:35 ` [PATCH 11/24] kbuild: support arch/$ARCH/include for tags, cscope Sam Ravnborg
2008-06-30 21:35 ` [PATCH 12/24] kbuild: asm symlink support for arch/$ARCH/include Sam Ravnborg
2008-06-30 21:35 ` [PATCH 13/24] kbuild: add arch/$ARCH/include to search path Sam Ravnborg
2008-06-30 21:35 ` [PATCH 15/24] vmlinux.lds: move __attribute__((__cold__)) functions back into final .text section Sam Ravnborg
2008-06-30 21:35 ` [PATCH 16/24] kernel-doc: handle/strip __init Sam Ravnborg
2008-06-30 21:35 ` [PATCH 17/24] kbuild: sparse needs CF not CHECKFLAGS Sam Ravnborg
2008-06-30 21:35 ` [PATCH 18/24] kbuild: remove Module.markers during mrproper Sam Ravnborg
2008-06-30 21:35 ` [PATCH 19/24] kconfig: add diffconfig utility Sam Ravnborg
2008-06-30 21:35 ` [PATCH 20/24] kconfig: set all new symbols automatically Sam Ravnborg
2008-06-30 21:35 ` [PATCH 21/24] kconfig: prefix hex values with 0x in .config Sam Ravnborg
2008-07-01 6:41 ` Ingo Molnar
2008-07-01 8:08 ` Sam Ravnborg
2008-06-30 21:35 ` [PATCH 22/24] kconfig: speed up all*config + randconfig Sam Ravnborg
2008-06-30 21:35 ` [PATCH 23/24] kconfig: make oldconfig is now less chatty Sam Ravnborg
2008-06-30 21:35 ` [PATCH 24/24] kconfig: make defconfig is no longer chatty 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=1214861718-32626-2-git-send-email-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=bunk@kernel.org \
--cc=dwmw2@infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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