# Parse --TAG file... groups
groups = {}
current_tag = None for arg in sys.argv[4:]: if arg.startswith('--'):
current_tag = arg[2:]
groups[current_tag] = [] elif current_tag isnotNone:
groups[current_tag].append(arg)
# Build #include lines for each group def make_includes(files):
seen = set()
lines = [] for f in sorted(files): ifnot f.endswith('.cc'): continue
rel = pathlib.Path(os.path.relpath(os.path.abspath(f), CURRENT_SOURCE_DIR)).as_posix() if rel notin seen:
seen.add(rel)
lines.append('#include "{}"'.format(rel)) return'\n'.join(lines)
# Read template and substitute with open(TEMPLATE, 'r') as f:
content = f.read()
for tag, files in groups.items():
placeholder = '%%{}%%'.format(tag)
content = content.replace(placeholder, make_includes(files))
with open(OUTPUT, 'w') as f:
f.write(content)
# Copy back to source tree if changed
baseline = os.path.join(CURRENT_SOURCE_DIR, os.path.basename(OUTPUT)) try: with open(baseline, 'r') as b: if b.read() == content:
sys.exit(0) except FileNotFoundError: pass
try:
shutil.copyfile(OUTPUT, baseline) except OSError: import filecmp if os.path.exists(baseline) andnot filecmp.cmp(OUTPUT, baseline, shallow=False):
sys.exit('{} is out of date; regenerate with a writable source tree'.format(baseline))
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.