add spdx license id to compiled header

This commit adjusts the merging script to include a SPDX license
identifier at the start of the single header file. This can help users
of Crow which have environments using license scanning tools to help
manage/monitor used implementation.

Signed-off-by: James Knight <james.d.knight@live.com>
This commit is contained in:
James Knight 2024-02-23 01:01:00 -05:00 committed by gittiver
parent 5ecd04ade2
commit cb38b9fe4f
1 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,8 @@ for x in edges:
assert order.index(x) < order.index(y), 'cyclic include detected'
print(order)
build = [lsc, '#pragma once']
spdx_lsc = '// SPDX-License-Identifier: BSD-3-Clause AND ISC AND MIT'
build = [spdx_lsc, lsc, '#pragma once']
for header in order:
d = open(pt.join(header_path, header), encoding='UTF-8').read()
d_no_depend = re_depends.sub(lambda x: '', d)