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

Commit b22b9987 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Fix the generated getevent labels.

Some of the less-used stuff stayed behind in input.h, so we need to
parse both files.

Change-Id: Iff2b6e3fc4f5a6584169d12f16427b4f235da21a
Test: manual inspection of the generated file.
parent 54c12196
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ $(TOOLS_H):

$(LOCAL_PATH)/getevent.c: $(intermediates)/input.h-labels.h

UAPI_INPUT_EVENT_CODES_H := bionic/libc/kernel/uapi/linux/input-event-codes.h
UAPI_INPUT_EVENT_CODES_H := bionic/libc/kernel/uapi/linux/input.h bionic/libc/kernel/uapi/linux/input-event-codes.h
INPUT_H_LABELS_H := $(intermediates)/input.h-labels.h
$(INPUT_H_LABELS_H): PRIVATE_LOCAL_PATH := $(LOCAL_PATH)
# The PRIVATE_CUSTOM_TOOL line uses = to evaluate the output path late.
+34 −33
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@ ff_list = []

r = re.compile(r'#define\s+(\S+)\s+((?:0x)?\d+)')

with open(sys.argv[1], 'r') as f:
for arg in sys.argv[1:]:
  with open(arg, 'r') as f:
    for line in f:
      m = r.match(line)
      if m: