From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Cc: Sam Ravnborg <sam@ravnborg.org>,
David Woodhouse <dwmw2@infradead.org>,
David Miller <davem@davemloft.net>
Subject: [PATCH 3/6] kbuild: drop support of ALTARCH for headers_*
Date: Sun, 8 Jun 2008 22:07:35 +0200 [thread overview]
Message-ID: <1212955658-32168-3-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <20080608094730.GA30098@uranus.ravnborg.org>
ALTARCH is no longer used by any arch(*) so drop
support for this from Makefile.headerinst
Dropping ALTARCH support simplifies Makefile.headerinst
(*) sparc64 uses it but work is ongoing to drop it
and no furter usage is planned.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: David Miller <davem@davemloft.net>
---
| 84 ++++-------------------------------------
1 files changed, 9 insertions(+), 75 deletions(-)
--git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 22b17af..1fb8c00 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -23,30 +23,17 @@ HDRSED := sed -e "s/ inline / __inline__ /g" \
_dst := $(if $(dst),$(dst),$(obj))
-ifeq (,$(patsubst include/asm/%,,$(obj)/))
-# For producing the generated stuff in include/asm for biarch builds, include
-# both sets of Kbuild files; we'll generate anything which is mentioned in
-# _either_ arch, and recurse into subdirectories which are mentioned in either
-# arch. Since some directories may exist in one but not the other, we must
-# use $(wildcard...).
-GENASM := 1
-archasm := $(subst include/asm,asm-$(ARCH),$(obj))
-altarchasm := $(subst include/asm,asm-$(ALTARCH),$(obj))
-KBUILDFILES := $(wildcard $(srctree)/include/$(archasm)/Kbuild $(srctree)/include/$(altarchasm)/Kbuild)
-else
-KBUILDFILES := $(srctree)/$(obj)/Kbuild
-endif
+kbuild-file := $(srctree)/$(obj)/Kbuild
+include $(kbuild-file)
-include $(KBUILDFILES)
+include scripts/Kbuild.include
-include scripts/Kbuild.include
-
-# If this is include/asm-$(ARCH) and there's no $(ALTARCH), then
-# override $(_dst) so that we install to include/asm directly.
+# If this is include/asm-$(ARCH) then override $(_dst) so that
+# we install to include/asm directly.
# Unless $(BIASMDIR) is set, in which case we're probably doing
# a 'headers_install_all' build and we should keep the -$(ARCH)
# in the directory name.
-ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)$(BIASMDIR))
+ifeq ($(obj),include/asm-$(ARCH)$(BIASMDIR))
_dst := include/asm
endif
@@ -69,18 +56,6 @@ header-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(header-y))
objhdr-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(objhdr-y))
check-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(check-y))
-
-ifdef ALTARCH
-ifeq ($(obj),include/asm-$(ARCH))
-altarch-y := altarch-dir
-endif
-endif
-
-# Make the definitions visible for recursive make invocations
-export ALTARCH
-export ARCHDEF
-export ALTARCHDEF
-
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)
@@ -99,34 +74,6 @@ quiet_cmd_remove = REMOVE $(_dst)/$@
quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
cmd_mkdir = mkdir -p $@
-quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
- cmd_gen = \
-FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@); \
-STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \
-(echo "/* File autogenerated by 'make headers_install' */" ; \
-echo "\#ifndef $$STUBDEF" ; \
-echo "\#define $$STUBDEF" ; \
-echo "\# if $(ARCHDEF)" ; \
-if [ -r $(subst /$(_dst)/,/include/$(archasm)/,$@) ]; then \
- echo "\# include <$(archasm)/$$FNAME>" ; \
-else \
- echo "\# error $(archasm)/$$FNAME does not exist in" \
- "the $(ARCH) architecture" ; \
-fi ; \
-echo "\# elif $(ALTARCHDEF)" ; \
-if [ -r $(subst /$(_dst)/,/include/$(altarchasm)/,$@) ]; then \
- echo "\# include <$(altarchasm)/$$FNAME>" ; \
-else \
- echo "\# error $(altarchasm)/$$FNAME does not exist in" \
- "the $(ALTARCH) architecture" ; \
-fi ; \
-echo "\# else" ; \
-echo "\# warning This machine appears to be" \
- "neither $(ARCH) nor $(ALTARCH)." ; \
-echo "\# endif" ; \
-echo "\#endif /* $$STUBDEF */" ; \
-) > $@
-
.PHONY: __headersinst __headerscheck
ifdef HDRCHECK
@@ -144,7 +91,7 @@ include /dev/null $(wildcard $(check-y))
else
# Rules for installing headers
-__headersinst: $(subdir-y) $(header-y) $(altarch-y) $(objhdr-y)
+__headersinst: $(subdir-y) $(header-y) $(objhdr-y)
@true
$(objhdr-y) $(subdir-y) $(header-y): | $(INSTALL_HDR_PATH)/$(_dst) $(unwanted)
@@ -156,29 +103,16 @@ $(INSTALL_HDR_PATH)/$(_dst):
$(unwanted):
$(call cmd,remove)
-ifdef GENASM
-$(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 $(kbuild-file)
$(call cmd,o_hdr_install)
-$(header-y): $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)
+$(header-y): $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(kbuild-file)
$(call cmd,unifdef)
endif
-endif
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) $(objhdr-y)
- $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH)
- $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm$(BIASMDIR)
-
# Recursion
.PHONY: $(subdir-y)
$(subdir-y):
--
1.5.4.1.143.ge7e51
next prev parent reply other threads:[~2008-06-08 20:06 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-08 9:47 [PATCH] Speed up "make headers_*" Sam Ravnborg
2008-06-08 10:12 ` Vegard Nossum
2008-06-08 10:41 ` Sam Ravnborg
2008-06-08 10:49 ` David Woodhouse
2008-06-08 11:17 ` Sam Ravnborg
2008-06-08 12:23 ` Oleg Verych
2008-06-08 13:17 ` David Woodhouse
2008-06-08 17:06 ` Segher Boessenkool
2008-06-08 17:34 ` Andreas Schwab
2008-06-08 19:45 ` Segher Boessenkool
2008-06-08 20:36 ` Geert Uytterhoeven
2008-06-08 11:01 ` WANG Cong
2008-06-08 11:18 ` Sam Ravnborg
2008-06-08 11:06 ` Vegard Nossum
2008-06-08 11:20 ` Sam Ravnborg
2008-06-08 11:20 ` David Woodhouse
2008-06-08 11:30 ` Sam Ravnborg
2008-06-08 11:47 ` David Woodhouse
2008-06-08 12:14 ` David Woodhouse
2008-06-08 12:29 ` David Woodhouse
2008-06-08 20:07 ` Sam Ravnborg
2008-06-08 20:58 ` David Woodhouse
2008-06-08 21:13 ` Sam Ravnborg
2008-06-09 6:23 ` Sam Ravnborg
2008-06-08 20:07 ` [PATCH 1/6] kbuild: refactor headers_* targets in Makefile Sam Ravnborg
2008-06-08 20:07 ` [PATCH 2/6] kbuild: always unifdef files in headers_install* Sam Ravnborg
2008-06-08 20:07 ` Sam Ravnborg [this message]
2008-06-08 20:07 ` [PATCH 4/6] kbuild: code refactoring in Makefile.headerinst Sam Ravnborg
2008-06-08 20:07 ` [PATCH 5/6] kbuild: error out early in make headers_install Sam Ravnborg
2008-06-09 10:19 ` David Woodhouse
2008-06-08 20:07 ` [PATCH 6/6] kbuild: optimize headers_* targets Sam Ravnborg
2008-06-08 20:37 ` Vegard Nossum
2008-06-08 21: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=1212955658-32168-3-git-send-email-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=davem@davemloft.net \
--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