kill autogen.sh and adms specifics, use autoreconf -vi instead

This commit is contained in:
Robert Larice 2011-12-27 18:54:02 +01:00 committed by rlar
parent 4f8d97e1b0
commit 8a2fa89af3
4 changed files with 2 additions and 271 deletions

View File

@ -1,235 +0,0 @@
#!/bin/sh
# Configuration script for ngspice.
#
# This script performs initial configuration of ngspice source
# package.
#
#
# temp-adms.ac: modified configure.ac if --adms is selected
# for temporary use by autoconf, will be deleted automatically
# configure.ac stays untouched
PROJECT=ngspice
# ADMS variables
ADMSDIR=src/spicelib/devices/adms
XMLPATH=src/spicelib/devices/adms/admst
ADMSXML=admsXml
ADMS=0
# Exit variable
DIE=0
help()
{
echo
echo "$PROJECT autogen.sh help"
echo
echo "--adms -a: enables adms feature"
echo "--adms3 : enables adms3 feature"
echo "--help -h: print this file"
echo "--version -v: print version"
echo
}
version()
{
echo
echo "$PROJECT autogen.sh 1.0"
echo
}
error_and_exit()
{
echo "Error: $1"
if [ "$ADMS" -eq 1 ]; then
rm -f temp-adms.ac
fi
exit 1
}
check_awk()
{
(awk --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have awk installed to compile $PROJECT with --adms."
exit 1
}
}
check_autoconf()
{
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "See http://www.gnu.org/software/automake/"
echo "(newest stable release is recommended)"
DIE=1
}
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile $PROJECT."
echo "See http://www.gnu.org/software/libtool/"
echo "(newest stable release is recommended)"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "See http://www.gnu.org/software/automake/"
echo "(newest stable release is recommended)"
DIE=1
}
}
check_adms()
{
(admsXml --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have admsXml installed to compile adms models."
echo "See http://mot-adms.sourceforge.net"
echo "(newest stable release is recommended)"
DIE=1
}
}
case "$1" in
"--adms" | "-a")
check_adms
ADMS=1
;;
"--adms3" )
check_adms
ADMS=3
;;
"--help" | "-h")
help
exit 0
;;
"--version" | "-v")
version
exit 0
;;
*)
;;
esac
check_autoconf
if [ "$DIE" -eq 1 ]; then
exit 1
fi
[ -f "DEVICES" ] || {
echo "You must run this script in the top-level $PROJECT directory"
exit 1
}
# only for --adms:
if [ "$ADMS" -gt 0 ]; then
check_awk
# add adms related Makefile entries to a configure.ac style file for
# autoconf and automake
# Find all lines with "#VLAMKF" and put the second token of each line
# into a shell variable
adms_Makefiles=`awk '$1 ~ /#VLAMKF/ { print "./" $2 }' < configure.ac`
# just the same, but escape newlines with '\' for the following sed expression
znew=`awk '$1 ~ /#VLAMKF/ { print " " $2 "\\\\" }' < configure.ac`
# Find "tests/vbic/Makefile" and insert the list of Makefiles
# some sed's fail to process the '\n' escape on the RHS,
# thus use an escaped plain newline
sed \
-e "s,tests\\/vbic\\/Makefile,&\\
$znew
," \
configure.ac > temp-adms.ac
for adms_dir in `ls $ADMSDIR` ; do
if [ -d "$ADMSDIR/$adms_dir" ]; then
case "$adms_dir" in
"CVS")
echo "Skipping CVS"
;;
"admst")
echo "Skipping scripts dir"
;;
*)
echo "Entering into directory: $adms_dir"
echo "-->"$ADMSDIR/$adms_dir
(
cd $ADMSDIR/$adms_dir
if [ "$ADMS" -eq 3 ]; then
$ADMSXML \
-I adms3va \
--create_makefile_am \
-e ../admst/ngspice.xml \
`ls adms3va/*.va`
else
$ADMSXML `ls admsva/*.va` -Iadmsva -xv \
-e ../admst/ngspiceVersion.xml \
-e ../admst/ngspiceMakefile.am.xml
fi
)
;;
esac
fi
done
fi
echo "Running aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS \
|| error_and_exit "aclocal failed"
echo "Running libtoolize"
libtoolize --copy --force \
|| error_and_exit "libtoolize failed"
# optional feature: autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Running autoheader"
autoheader \
|| error_and_exit "autoheader failed"
fi
echo "Running automake -Wall --copy --add-missing"
automake -Wall --copy --add-missing \
|| error_and_exit "automake failed"
if [ "$ADMS" -gt 0 ]; then
echo "Running automake for adms"
automake -Wall --copy --add-missing $adms_Makefiles \
|| error_and_exit "automake failed"
fi
echo "Running autoconf"
if [ "$ADMS" -gt 0 ]; then
autoconf temp-adms.ac > configure \
|| error_and_exit "autoconf failed, with adms"
rm -f temp-adms.ac
else
autoconf \
|| error_and_exit "autoconf failed"
fi
echo "Success."
exit 0

View File

@ -884,38 +884,9 @@ if test "$enable_adms" = "yes" -o "$enable_adms3" = "yes" ; then
AC_DEFINE(ADMS,[1],[Support for Verilog-A models])
fi
VLADEVDIR=" adms/ekv \
adms/hicum0 \
adms/hicum2 \
adms/mextram \
adms/psp102 "
dnl The makefiles for adms (to be added to AC_CONFIG_FILES by ./autogen.sh --adms)
#VLAMKF src/spicelib/devices/adms/ekv/Makefile
#VLAMKF src/spicelib/devices/adms/hicum0/Makefile
#VLAMKF src/spicelib/devices/adms/hicum2/Makefile
#VLAMKF src/spicelib/devices/adms/mextram/Makefile
#VLAMKF src/spicelib/devices/adms/psp102/Makefile
NOTVLADEVDIR=""
VLADEV=" spicelib/devices/adms/ekv/libekv.la \
spicelib/devices/adms/hicum0/libhicum0.la \
spicelib/devices/adms/hicum2/libhicum2.la \
spicelib/devices/adms/mextram/libbjt504t.la \
spicelib/devices/adms/psp102/libpsp102.la "
else
VLADEVDIR=""
NOTVLADEVDIR="adms"
fi
AC_SUBST(ADMSXML)
AC_SUBST(VLADEVDIR)
AC_SUBST(VLADEV)
AC_SUBST(NOTVLADEVDIR)
dnl NDEV option
if test "$enable_ndev" = "yes"; then

View File

@ -84,8 +84,7 @@ DYNAMIC_DEVICELIBS = \
spicelib/devices/vbic/libvbic.la \
spicelib/devices/vccs/libvccs.la \
spicelib/devices/vcvs/libvcvs.la \
spicelib/devices/vsrc/libvsrc.la \
@VLADEV@
spicelib/devices/vsrc/libvsrc.la
## Build ngspice first:

View File

@ -48,8 +48,7 @@ SUBDIRS = \
vbic \
vccs \
vcvs \
vsrc \
@VLADEVDIR@
vsrc
if NDEV_WANTED
SUBDIRS += ndev
@ -60,7 +59,6 @@ SUBDIRS += nbjt nbjt2 numd numd2 numos
endif
DIST_SUBDIRS = \
@VLADEVDIR@ \
asrc \
bjt \
bsim1 \
@ -132,8 +130,6 @@ libdev_la_SOURCES = \
cktinit.c \
limit.c
EXTRA_DIST = @NOTVLADEVDIR@
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices
MAINTAINERCLEANFILES = Makefile.in