Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1572355
| Path | csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v5 4/8] Makefile.headersinst: cleanup input files |
| Date | Thu, 02 Feb 2017 14:30:02 +0100 |
| Message-ID | <t6pCy-4Bc-29@gated-at.bofh.it> (permalink) |
| References | <t5JtE-2Tw-13@gated-at.bofh.it> <t6pCx-4Bc-7@gated-at.bofh.it> |
| X-Mailer | git-send-email 2.8.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 70 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | mmarek@suse.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, airlied@linux.ie, davem@davemloft.net, linux@armlinux.org.uk, bp@alien8.de, slash.tmp@free.fr, daniel.vetter@ffwll.ch, rmk+kernel@armlinux.org.uk, msalter@redhat.com, jengelh@inai.de, hch@infradead.org, tklauser@distanz.ch, mpe@ellerman.id.au, mingo@kernel.org, Nicolas Dichtel <nicolas.dichtel@6wind.com> |
| X-Original-Date | Thu, 2 Feb 2017 14:25:06 +0100 |
| X-Original-Message-ID | <1486041910-2665-5-git-send-email-nicolas.dichtel@6wind.com> |
| X-Original-References | <20170131162133.GA8258@gmail.com> <1486041910-2665-1-git-send-email-nicolas.dichtel@6wind.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1572355 |
Show key headers only | View raw
After the last four patches, all exported headers are under uapi/, thus
input-files2 are not needed anymore.
The side effect is that input-files1-name is exactly header-y.
Note also that input-files3-name is genhdr-y.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
scripts/Makefile.headersinst | 34 +++++++++++-----------------------
1 file changed, 11 insertions(+), 23 deletions(-)
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 1106d6ca3a38..3e20d03432d2 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -40,31 +40,20 @@ wrapper-files := $(filter $(header-y), $(generic-y))
srcdir := $(srctree)/$(obj)
gendir := $(objtree)/$(gen)
-oldsrcdir := $(srctree)/$(subst /uapi,,$(obj))
-
# all headers files for this dir
header-y := $(filter-out $(generic-y), $(header-y))
all-files := $(header-y) $(genhdr-y) $(wrapper-files)
output-files := $(addprefix $(installdir)/, $(all-files))
-input-files1 := $(foreach hdr, $(header-y), \
- $(if $(wildcard $(srcdir)/$(hdr)), \
- $(wildcard $(srcdir)/$(hdr))) \
- )
-input-files1-name := $(notdir $(input-files1))
-input-files2 := $(foreach hdr, $(header-y), \
- $(if $(wildcard $(srcdir)/$(hdr)),, \
- $(if $(wildcard $(oldsrcdir)/$(hdr)), \
- $(wildcard $(oldsrcdir)/$(hdr)), \
- $(error Missing UAPI file $(srcdir)/$(hdr))) \
- ))
-input-files2-name := $(notdir $(input-files2))
-input-files3 := $(foreach hdr, $(genhdr-y), \
- $(if $(wildcard $(gendir)/$(hdr)), \
- $(wildcard $(gendir)/$(hdr)), \
- $(error Missing generated UAPI file $(gendir)/$(hdr)) \
- ))
-input-files3-name := $(notdir $(input-files3))
+# Check that all expected files exist
+$(foreach hdr, $(header-y), \
+ $(if $(wildcard $(srcdir)/$(hdr)),, \
+ $(error Missing UAPI file $(srcdir)/$(hdr)) \
+ ))
+$(foreach hdr, $(genhdr-y), \
+ $(if $(wildcard $(gendir)/$(hdr)),, \
+ $(error Missing generated UAPI file $(gendir)/$(hdr)) \
+ ))
# Work out what needs to be removed
oldheaders := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
@@ -78,9 +67,8 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
file$(if $(word 2, $(all-files)),s))
cmd_install = \
- $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(input-files1-name); \
- $(CONFIG_SHELL) $< $(installdir) $(oldsrcdir) $(input-files2-name); \
- $(CONFIG_SHELL) $< $(installdir) $(gendir) $(input-files3-name); \
+ $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-y); \
+ $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-y); \
for F in $(wrapper-files); do \
echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \
done; \
--
2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v4 3/7] x86: put msr-index.h in uapi Ingo Molnar <mingo@kernel.org> - 2017-01-31 17:30 +0100
[PATCH v5 1/8] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
[PATCH v5 3/8] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
Re: [PATCH v5 3/8] x86: stop exporting msr-index.h to userland Ingo Molnar <mingo@kernel.org> - 2017-02-02 14:40 +0100
[PATCH v5 0/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
[PATCH v5 8/8] uapi: export all arch specifics directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
Re: [PATCH v5 8/8] uapi: export all arch specifics directories kbuild test robot <lkp@intel.com> - 2017-02-02 15:40 +0100
Re: [PATCH v5 8/8] uapi: export all arch specifics directories kbuild test robot <lkp@intel.com> - 2017-02-02 15:50 +0100
[PATCH v5 4/8] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
[PATCH v5 6/8] uapi: includes linux/types.h before exporting files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
Re: [PATCH v5 6/8] uapi: includes linux/types.h before exporting files kbuild test robot <lkp@intel.com> - 2017-02-02 16:30 +0100
[PATCH v5 2/8] nios2: put setup.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
[PATCH v5 5/8] Makefile.headersinst: remove destination-y option Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
Re: [PATCH v5 5/8] Makefile.headersinst: remove destination-y option Paul Bolle <pebolle@tiscali.nl> - 2017-02-03 22:50 +0100
csiph-web