axi3-interconnect/sim/import-sources.sh

27 lines
409 B
Bash
Raw Permalink Normal View History

2020-03-10 20:06:17 +01:00
#!/bin/bash
if [[ -z $1 ]]; then
echo "Specify object directory"
exit -1
fi
if [[ -z $2 ]]; then
echo "Specify source folder to scan"
exit -1
fi
if [[ -z $3 ]]; then
echo "Specify target library"
exit -1
fi
echo "Scanning \"$2\" for lib \"$3\" to obj dir \"$1\""
files=`find "$2" -name "*.vhd"`
for file in $files; do
echo "Importing file $file"
ghdl -i --workdir="$1" --work="$3" "$file"
done