Search for m4 aliases as well.
This commit is contained in:
parent
a94cf977c0
commit
c0f150c716
1 changed files with 3 additions and 1 deletions
|
@ -489,12 +489,14 @@ def resolve_perl_file_req(apt_mgr, req):
|
||||||
def _find_aclocal_fun(macro):
|
def _find_aclocal_fun(macro):
|
||||||
# TODO(jelmer): Use the API for codesearch.debian.net instead?
|
# TODO(jelmer): Use the API for codesearch.debian.net instead?
|
||||||
defun_prefix = b"AC_DEFUN([%s]," % macro.encode("ascii")
|
defun_prefix = b"AC_DEFUN([%s]," % macro.encode("ascii")
|
||||||
|
au_alias_prefix = b"AU_ALIAS([%s]," % macro.encode("ascii")
|
||||||
|
prefixes = [defun_prefix, au_alias_prefix]
|
||||||
for entry in os.scandir("/usr/share/aclocal"):
|
for entry in os.scandir("/usr/share/aclocal"):
|
||||||
if not entry.is_file():
|
if not entry.is_file():
|
||||||
continue
|
continue
|
||||||
with open(entry.path, "rb") as f:
|
with open(entry.path, "rb") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith(defun_prefix):
|
if any([line.startswith(prefix) for prefix in prefixes]):
|
||||||
return entry.path
|
return entry.path
|
||||||
raise KeyError
|
raise KeyError
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue