usb_drv: disambiguate header scan locations

When creating a source archive for the USB driver, both the contrib and
Genode-specific source codes are merged into a single directory
structure. In this case, the original way of determining the Linux
source code to scan for #include directives would apply the scanning to
Genode-specific source codes too. This patch tightens the search
criterion such that only Linux source codes are processed.
This commit is contained in:
Norman Feske 2017-04-04 16:27:00 +02:00 committed by Christian Helmuth
parent 075c32409a
commit 7200ab2935
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@ LX_EMUL_H := $(REP_DIR)/src/lib/usb/include/lx_emul.h
# Determine the header files included by the contrib code. For each
# of these header files we create a symlink to 'lx_emul.h'.
#
GEN_INCLUDES := $(shell grep -rIh "^\#include .*\/" $(USB_CONTRIB_DIR) |\
SCAN_DIRS := $(addprefix $(USB_CONTRIB_DIR)/include/, asm-generic linux scsi uapi) \
$(addprefix $(USB_CONTRIB_DIR)/, drivers lib)
GEN_INCLUDES := $(shell grep -rIh "^\#include .*\/" $(SCAN_DIRS) |\
sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" |\
sort | uniq)
#