From 7dfaf94349c18fd65cced3abaf38393c548492a0 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 8 Jan 2025 11:10:29 -0600 Subject: [PATCH] xml: T7029: allow wildcard in include directive --- .../xml-component-version.xml.in | 50 +------------------ scripts/transclude-template | 5 +- 2 files changed, 5 insertions(+), 50 deletions(-) diff --git a/interface-definitions/xml-component-version.xml.in b/interface-definitions/xml-component-version.xml.in index 67d86a1d02..70957c5fa8 100644 --- a/interface-definitions/xml-component-version.xml.in +++ b/interface-definitions/xml-component-version.xml.in @@ -1,52 +1,4 @@ - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include + #include diff --git a/scripts/transclude-template b/scripts/transclude-template index 5c6668a847..767583acd5 100755 --- a/scripts/transclude-template +++ b/scripts/transclude-template @@ -23,6 +23,7 @@ import os import re import sys +import glob regexp = re.compile(r'^ *#include <(.+)>$') @@ -34,7 +35,9 @@ def parse_file(filename): if line: result = regexp.match(line) if result: - lines += parse_file(os.path.join(directory, result.group(1))) + res = os.path.join(directory, result.group(1)) + for g in sorted(glob.glob(res)): + lines += parse_file(g) else: lines += line else: