mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
3c5994c838
Several arch/*/include/uapi/asm/* header simply include the corresponding <asm-generic/*> file. This patch allows such files to be specified in uapi/asm/Kbuild via "generic-y += ..." to be automatically generated (similar to asm/Kbuild). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: David Howells <dhowells@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Arnd Bergmann <arnd@arndb.de>
25 lines
684 B
Makefile
25 lines
684 B
Makefile
# include/asm-generic contains a lot of files that are used
|
|
# verbatim by several architectures.
|
|
#
|
|
# This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild
|
|
# and for each file listed in this file with generic-y creates
|
|
# a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm)
|
|
|
|
kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild
|
|
-include $(kbuild-file)
|
|
|
|
include scripts/Kbuild.include
|
|
|
|
# Create output directory if not already present
|
|
_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
|
|
|
|
quiet_cmd_wrap = WRAP $@
|
|
cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@
|
|
|
|
all: $(patsubst %, $(obj)/%, $(generic-y))
|
|
@:
|
|
|
|
$(obj)/%.h:
|
|
$(call cmd,wrap)
|
|
|