Check for *.va files, exit if adms is selected

and *.va files are not available
This commit is contained in:
Holger Vogt 2018-05-19 20:19:15 +02:00
parent e536155947
commit 410345cf82
1 changed files with 34 additions and 2 deletions

View File

@ -105,9 +105,41 @@ check_adms()
}
}
# check if verilog-a files exist in every adms device directory
check_adms_va()
{
echo
# get the devices directories from configure.ac
admsdirs=`awk '$1 ~ /#VLAMKF/ { print $2 }' < configure.ac`
admsdirs=`echo $admsdirs | sed "s/\/Makefile//g"`
for adms_dir in $admsdirs ; do
FOK=0
if [ -d "$adms_dir" ]; then
ls $adms_dir/admsva/*.va > /dev/null 2>&1
exitcode=${PIPESTATUS[0]}
if [ $exitcode -ne 0 ]; then
FOK=1
fi
else
FOK=1
fi
if [ "$FOK" -eq 1 ]; then
echo "Error: No *.va file found in $adms_dir/admsva"
echo "Please download patch file ng-adms-va.tar.gz from"
echo "http://ngspice.sourceforge.net/experimental/ng-adms-va.tar.gz"
echo "and expand it into the ngspice directory"
echo
DIE=1
fi
done
}
case "$1" in
"--adms" | "-a")
check_adms
check_adms_va
ADMS=1
;;
@ -167,7 +199,7 @@ $znew
case "$adms_dir" in
"admst")
echo "Skipping scripts dir"
# echo "Skipping admst dir"
;;
*)
@ -175,7 +207,7 @@ $znew
echo "-->"$ADMSDIR/$adms_dir
(
cd $ADMSDIR/$adms_dir
$ADMSXML `ls admsva/*.va` -Iadmsva -xv \
$ADMSXML `ls admsva/*.va` -Iadmsva -xv -x \
-e ../admst/ngspiceVersion.xml \
-e ../admst/ngspiceMakefile.am.xml
)