Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10b63956 authored by David Howells's avatar David Howells
Browse files

UAPI: Plumb the UAPI Kbuilds into the user header installation and checking



Plumb the UAPI Kbuilds into the user header installation and checking system.
As the headers are split the entries will be transferred across from the old
Kbuild files to the UAPI Kbuild files.

The changes made in this commit are:

 (1) Exported generated files (of which there are currently four) are moved to
     uapi/ directories under the appropriate generated/ directory, thus we
     get:

	include/generated/uapi/linux/version.h
	arch/x86/include/generated/uapi/asm/unistd_32.h
	arch/x86/include/generated/uapi/asm/unistd_64.h
	arch/x86/include/generated/uapi/asm/unistd_x32.h

     These paths were added to the build as -I flags in a previous patch.

 (2) scripts/Makefile.headersinst is now given the UAPI path to install from
     rather than the old path.

     It then determines the old path from that and includes that Kbuild also
     if it exists, thus permitting the headers to exist in either directory
     during the changeover.

     I also renamed the "install" variable to "installdir" as it refers to a
     directory not the install program.

 (3) scripts/headers_install.pl is altered to take a list of source file paths
     instead of just their names so that the makefile can tell it exactly
     where to find each file.

     For the moment, files can be obtained from one of four places for each
     output directory:

	.../include/uapi/foo/
	.../include/generated/uapi/foo/
	.../include/foo/
	.../include/generated/foo/

     The non-UAPI paths will be dropped later.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: default avatarDave Jones <davej@redhat.com>
parent ec28b7f2
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ asm-generic:
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).

version_h := include/generated/linux/version.h
version_h := include/generated/uapi/linux/version.h

no-dot-config-targets := clean mrproper distclean \
			 cscope gtags TAGS tags help %docs check% coccicheck \
@@ -908,10 +908,10 @@ headers_install_all:

PHONY += headers_install
headers_install: __headers
	$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/asm/Kbuild),, \
	$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
	  $(error Headers not exportable for the $(SRCARCH) architecture))
	$(Q)$(MAKE) $(hdr-inst)=include
	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/asm $(hdr-dst)
	$(Q)$(MAKE) $(hdr-inst)=include/uapi
	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst)

PHONY += headers_check_all
headers_check_all: headers_install_all
@@ -919,8 +919,8 @@ headers_check_all: headers_install_all

PHONY += headers_check
headers_check: headers_install
	$(Q)$(MAKE) $(hdr-inst)=include HDRCHECK=1
	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/asm $(hdr-dst) HDRCHECK=1
	$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1

# ---------------------------------------------------------------------------
# Modules
+0 −4
Original line number Diff line number Diff line
@@ -22,7 +22,3 @@ header-y += sigcontext32.h
header-y += ucontext.h
header-y += vm86.h
header-y += vsyscall.h

genhdr-y += unistd_32.h
genhdr-y += unistd_64.h
genhdr-y += unistd_x32.h
+1 −1
Original line number Diff line number Diff line
out := $(obj)/../include/generated/asm
uapi := $(obj)/../include/generated/asm
uapi := $(obj)/../include/generated/uapi/asm

# Create output directory if not already present
_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)') \
+0 −2
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@ header-y += netfilter_ipv6/
header-y += usb/
header-y += wimax/

genhdr-y += version.h

ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
		  $(srctree)/include/asm-$(SRCARCH)/a.out.h \
		  $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),)
+2 −0
Original line number Diff line number Diff line
@@ -20,3 +20,5 @@ header-y += netfilter_ipv4/
header-y += netfilter_ipv6/
header-y += usb/
header-y += wimax/

genhdr-y += version.h
Loading