From 6003733aa27e39ed2856f1f5b794b924068eb645 Mon Sep 17 00:00:00 2001 From: Michael Zimmermann Date: Tue, 11 Jul 2017 07:22:43 +0200 Subject: [PATCH] lkl: add support for LKL_INSTALL_ADDITIONAL_HEADERS environment variable this environment variable contains a path to a file with a list of additional header files to install when running "make install". - The file contains one header per line. - empty lines are permitted - '#' comments are supported - even inline Signed-off-by: Michael Zimmermann --- arch/lkl/scripts/headers_install.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/lkl/scripts/headers_install.py b/arch/lkl/scripts/headers_install.py index c9b10e14c052a0..6365da92ab0339 100755 --- a/arch/lkl/scripts/headers_install.py +++ b/arch/lkl/scripts/headers_install.py @@ -129,6 +129,13 @@ def replace(h): find_headers("arch/lkl/include/uapi/asm/syscalls.h") headers.add("arch/lkl/include/uapi/asm/host_ops.h") +if 'LKL_INSTALL_ADDITIONAL_HEADERS' in os.environ: + with open(os.environ['LKL_INSTALL_ADDITIONAL_HEADERS'], 'rU') as f: + for line in f.readlines(): + line = line.split('#', 1)[0].strip() + if line != '': + headers.add(line) + new_headers = set() for h in headers: