Add compile script for creating a ngspicexx-tar.gz
distribution file, using 'make dist'.
This commit is contained in:
parent
b3676bb763
commit
5d4b5232ce
|
|
@ -13,7 +13,7 @@ EXTRA_DIST = FAQ autogen.sh Stuarts_Poly_Notes \
|
|||
compile_min.sh compile_linux.sh compile_min_shared.sh \
|
||||
compile_linux_shared.sh compile_cyg_make_short_check_64.sh \
|
||||
compile_macos_clang.sh compile_macos_gcc.sh \
|
||||
ngspice.pc.in .gitignore
|
||||
compile_linux_dist.sh ngspice.pc.in .gitignore
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 ar-lib compile config.guess \
|
||||
src/include/ngspice/config.h.in config.sub configure install-sh \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
# ngspice build script for Linux distributable, 64 bit
|
||||
# compile_linux_dist.sh <d>
|
||||
|
||||
# Procedure:
|
||||
# Install gcc, bison, flex, libtool, autoconf, automake,
|
||||
# libx11 and libx11-dev (headers), libXaw and libXaw-dev, libreadline and dev
|
||||
# Declare 'compile_linux_dist.sh' executable and start compiling with
|
||||
# './compile_linux_dist.sh' from the ngspice directory.
|
||||
|
||||
SECONDS=0
|
||||
|
||||
|
||||
if [ ! -d "release" ]; then
|
||||
mkdir release
|
||||
if [ $? -ne 0 ]; then echo "mkdir release failed"; exit 1 ; fi
|
||||
fi
|
||||
|
||||
|
||||
# If compiling sources from git, you may need to uncomment the following two lines:
|
||||
./autogen.sh
|
||||
if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi
|
||||
|
||||
echo
|
||||
cd release
|
||||
if [ $? -ne 0 ]; then echo "cd release failed"; exit 1 ; fi
|
||||
echo "configuring for 64 bit release"
|
||||
echo
|
||||
|
||||
../configure --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp --enable-osdi --disable-debug CFLAGS="-m64 -O2" LDFLAGS="-m64 -s"
|
||||
|
||||
if [ $? -ne 0 ]; then echo "../configure failed"; exit 1 ; fi
|
||||
|
||||
echo
|
||||
# make clean is required for properly making the code models
|
||||
echo "cleaning (see make_clean.log)"
|
||||
make clean 2>&1 -j8 | tee make_clean.log
|
||||
exitcode=${PIPESTATUS[0]}
|
||||
if [ $exitcode -ne 0 ]; then echo "make clean failed"; exit 1 ; fi
|
||||
echo "generate distribution (see make_dist.log)"
|
||||
make dist 2>&1 -j8 | tee make_dist.log
|
||||
exitcode=${PIPESTATUS[0]}
|
||||
if [ $exitcode -ne 0 ]; then echo "make dist failed"; exit 1 ; fi
|
||||
|
||||
ELAPSED="Elapsed compile time: $(($SECONDS / 3600))hrs $((($SECONDS / 60) % 60))min $(($SECONDS % 60))sec"
|
||||
echo
|
||||
echo $ELAPSED
|
||||
echo "success"
|
||||
exit 0
|
||||
Loading…
Reference in New Issue