]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3267] fix find header script not finding files
authorAndrei Pavel <andrei@isc.org>
Thu, 21 Mar 2024 14:35:38 +0000 (16:35 +0200)
committerAndrei Pavel <andrei@isc.org>
Thu, 21 Mar 2024 16:00:16 +0000 (18:00 +0200)
Script did not find files that are on the same line as the _HEADERS
variable.

tools/find-uninstalled-headers.py

index 5963af6e5718b0410419db6a698f3d237a93d491..2b934b59fc0e8e157c44017239ab02c4f471dae1 100755 (executable)
@@ -32,12 +32,12 @@ def main():
 
                 header = None
 
+                backslash_matches = backslash_pattern.search(line)
                 headers_matches = headers_pattern.search(line)
                 if headers_matches is None:
                     if not in_headers_block:
                         continue
 
-                    backslash_matches = backslash_pattern.search(line)
                     if backslash_matches is None:
                         header = line
                         in_headers_block = False
@@ -45,8 +45,9 @@ def main():
                         header = backslash_matches.group(1)
                 else:
                     in_headers_block = True
-                    if '\\' in headers_matches.group(2) and len(headers_matches.group(1)) != 0:
-                        header = headers_matches.group(1)
+                    candidate = headers_matches.group(1)
+                    if backslash_matches is None and len(candidate):
+                        header = candidate
 
                 if header is not None:
                     relative_path = makefile_am.parent / header.strip()