mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-25 14:27:32 -04:00
33 lines
1.1 KiB
Tcl
33 lines
1.1 KiB
Tcl
proc parse_vcs_list {flist_path} {
|
|
set f [split [string trim [read [open $flist_path r]]] "\n"]
|
|
set flist [list ]
|
|
set dir_list [list ]
|
|
set def_list [list ]
|
|
foreach x $f {
|
|
if {![string match "" $x]} {
|
|
# If the item starts with +incdir+, directory files need to be added
|
|
if {[string match "#*" $x]} {
|
|
# get rid of comment line
|
|
} elseif {[string match "+incdir+*" $x]} {
|
|
set trimchars "+incdir+"
|
|
set temp [string trimleft $x $trimchars]
|
|
set expanded [subst $temp]
|
|
lappend dir_list $expanded
|
|
} elseif {[string match "+define+*" $x]} {
|
|
set trimchars "+define+"
|
|
set temp [string trimleft $x $trimchars]
|
|
set expanded [subst $temp]
|
|
lappend def_list $expanded
|
|
} else {
|
|
set expanded [subst $x]
|
|
lappend flist $expanded
|
|
}
|
|
}
|
|
}
|
|
|
|
#puts $flist
|
|
#puts $dir_list
|
|
#puts $def_list
|
|
|
|
return [list $flist $dir_list $def_list]
|
|
}
|