Skip to content

Commit e670c24

Browse files
authored
Merge pull request #4250 from luarss/feat/include-tool-licenses
feat(docker): collect tool LICENSE files into install dir
2 parents 7b05472 + 5738db2 commit e670c24

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Build working directories
2+
tools/OpenROAD/build/
3+
tools/yosys-slang/build/
4+
tools/kepler-formal/build/
25

36
# Build files
47
build_openroad.log

docker/Dockerfile.builder

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ if [ -n "${verificPath}" ]; then
4545
fi
4646
EOF
4747

48+
# Collect LICENSE files from tool source trees into the install directory so
49+
# they are available in the final image. tools/OpenROAD/src/sta is excluded
50+
# because it is covered by a separate commercial license agreement.
51+
RUN find /OpenROAD-flow-scripts/tools \( -name "*LICENSE*" -o -name "*LICENSES*" \) \
52+
| grep -v '/OpenROAD/src/sta/' \
53+
| grep -v '/AutoTuner/' \
54+
| grep -v '^/OpenROAD-flow-scripts/tools/install/' \
55+
| while IFS= read -r f; do \
56+
rel="${f#/OpenROAD-flow-scripts/tools/}"; \
57+
mkdir -p "/OpenROAD-flow-scripts/tools/install/licenses/$(dirname "$rel")"; \
58+
cp -r "$f" "/OpenROAD-flow-scripts/tools/install/licenses/$rel"; \
59+
done
60+
4861
FROM orfs-base
4962

5063
# The order for copying the directories is based on the frequency of changes (ascending order),

0 commit comments

Comments
 (0)