kbuild: replace genhdr-y with generated-y
Originally, generated-y and genhdr-y had different meaning, like
follows:
- generated-y: generated headers (other than asm-generic wrappers)
- header-y : headers to be exported
- genhdr-y : generated headers to be exported (generated-y + header-y)
Since commit fcc8487d47
("uapi: export all headers under uapi
directories"), headers under UAPI directories are all exported.
So, there is no more difference between generated-y and genhdr-y.
We see two users of genhdr-y, arch/{arm,x86}/include/uapi/asm/Kbuild.
They generate some headers in arch/{arm,x86}/include/generated/uapi/asm
directories, which are obviously exported.
Replace them with generated-y, and abolish genhdr-y.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
This commit is contained in:
parent
bfb38988c5
commit
ae3f415173
|
@ -45,10 +45,9 @@ This document describes the Linux kernel Makefiles.
|
||||||
|
|
||||||
=== 7 Kbuild syntax for exported headers
|
=== 7 Kbuild syntax for exported headers
|
||||||
--- 7.1 no-export-headers
|
--- 7.1 no-export-headers
|
||||||
--- 7.2 genhdr-y
|
--- 7.2 generic-y
|
||||||
--- 7.3 generic-y
|
--- 7.3 generated-y
|
||||||
--- 7.4 generated-y
|
--- 7.4 mandatory-y
|
||||||
--- 7.5 mandatory-y
|
|
||||||
|
|
||||||
=== 8 Kbuild Variables
|
=== 8 Kbuild Variables
|
||||||
=== 9 Makefile language
|
=== 9 Makefile language
|
||||||
|
@ -1277,18 +1276,7 @@ See subsequent chapter for the syntax of the Kbuild file.
|
||||||
avoid exporting specific headers (e.g. kvm.h) on architectures that do
|
avoid exporting specific headers (e.g. kvm.h) on architectures that do
|
||||||
not support it. It should be avoided as much as possible.
|
not support it. It should be avoided as much as possible.
|
||||||
|
|
||||||
--- 7.2 genhdr-y
|
--- 7.2 generic-y
|
||||||
|
|
||||||
genhdr-y specifies asm files to be generated.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
#arch/x86/include/uapi/asm/Kbuild
|
|
||||||
genhdr-y += unistd_32.h
|
|
||||||
genhdr-y += unistd_64.h
|
|
||||||
genhdr-y += unistd_x32.h
|
|
||||||
|
|
||||||
|
|
||||||
--- 7.3 generic-y
|
|
||||||
|
|
||||||
If an architecture uses a verbatim copy of a header from
|
If an architecture uses a verbatim copy of a header from
|
||||||
include/asm-generic then this is listed in the file
|
include/asm-generic then this is listed in the file
|
||||||
|
@ -1315,11 +1303,10 @@ See subsequent chapter for the syntax of the Kbuild file.
|
||||||
Example: termios.h
|
Example: termios.h
|
||||||
#include <asm-generic/termios.h>
|
#include <asm-generic/termios.h>
|
||||||
|
|
||||||
--- 7.4 generated-y
|
--- 7.3 generated-y
|
||||||
|
|
||||||
If an architecture generates other header files alongside generic-y
|
If an architecture generates other header files alongside generic-y
|
||||||
wrappers, and not included in genhdr-y, then generated-y specifies
|
wrappers, generated-y specifies them.
|
||||||
them.
|
|
||||||
|
|
||||||
This prevents them being treated as stale asm-generic wrappers and
|
This prevents them being treated as stale asm-generic wrappers and
|
||||||
removed.
|
removed.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# UAPI Header export list
|
# UAPI Header export list
|
||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
genhdr-y += unistd-common.h
|
generated-y += unistd-common.h
|
||||||
genhdr-y += unistd-oabi.h
|
generated-y += unistd-oabi.h
|
||||||
genhdr-y += unistd-eabi.h
|
generated-y += unistd-eabi.h
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# UAPI Header export list
|
# UAPI Header export list
|
||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
genhdr-y += unistd_32.h
|
generated-y += unistd_32.h
|
||||||
genhdr-y += unistd_64.h
|
generated-y += unistd_64.h
|
||||||
genhdr-y += unistd_x32.h
|
generated-y += unistd_x32.h
|
||||||
|
|
|
@ -15,7 +15,7 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
|
||||||
|
|
||||||
# Stale wrappers when the corresponding files are removed from generic-y
|
# Stale wrappers when the corresponding files are removed from generic-y
|
||||||
# need removing.
|
# need removing.
|
||||||
generated-y := $(generic-y) $(genhdr-y) $(generated-y)
|
generated-y := $(generic-y) $(generated-y)
|
||||||
all-files := $(patsubst %, $(obj)/%, $(generated-y))
|
all-files := $(patsubst %, $(obj)/%, $(generated-y))
|
||||||
old-headers := $(wildcard $(obj)/*.h)
|
old-headers := $(wildcard $(obj)/*.h)
|
||||||
unwanted := $(filter-out $(all-files),$(old-headers))
|
unwanted := $(filter-out $(all-files),$(old-headers))
|
||||||
|
|
Loading…
Reference in New Issue