[build] Only consider includes at the start of the line (#30725)

pull/30774/head
Craig Tiller 2 years ago committed by GitHub
parent 535168431a
commit ee03a64d17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      tools/distrib/fix_build_deps.py

@ -305,10 +305,10 @@ def grpc_cc_library(name,
for src in hdrs + public_hdrs + srcs:
filename = '%s%s' % ((parsing_path + '/' if parsing_path else ''), src)
for line in open(filename):
m = re.search(r'#include <(.*)>', line)
m = re.search(r'^#include <(.*)>', line)
if m:
inc.add(m.group(1))
m = re.search(r'#include "(.*)"', line)
m = re.search(r'^#include "(.*)"', line)
if m:
inc.add(m.group(1))
if 'grpc::g_glip' in line or 'grpc::g_core_codegen_interface' in line:

Loading…
Cancel
Save