39 lines
988 B
Tcl
39 lines
988 B
Tcl
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# Lightweight manifest validation. Runs with plain tclsh; Vivado is not needed.
|
|
|
|
set B210_SCRIPT_DIR [file dirname [file normalize [info script]]]
|
|
set B210_REPO_ROOT [file normalize [file join $B210_SCRIPT_DIR ../..]]
|
|
source [file join $B210_SCRIPT_DIR sources.tcl]
|
|
|
|
set groups {
|
|
B210_GLOBAL_INCLUDE_SOURCES
|
|
B210_HDL_SOURCES
|
|
B210_NETLIST_SOURCES
|
|
B210_MEMORY_SOURCES
|
|
B210_IP_SOURCES
|
|
B210_CONSTRAINT_SOURCES
|
|
}
|
|
|
|
set total 0
|
|
set missing 0
|
|
foreach group $groups {
|
|
set entries [set $group]
|
|
puts [format "%-31s %3d" $group [llength $entries]]
|
|
foreach rel $entries {
|
|
incr total
|
|
set p [file normalize [file join $B210_REPO_ROOT $rel]]
|
|
if {![file exists $p]} {
|
|
puts stderr "MISSING: $rel"
|
|
incr missing
|
|
}
|
|
}
|
|
}
|
|
|
|
puts "---------------------------------------"
|
|
puts "Manifest entries: $total"
|
|
puts "Missing files: $missing"
|
|
|
|
if {$missing != 0} {
|
|
exit 1
|
|
}
|