diff --git a/ChangeLog b/ChangeLog index af0c7761d..9fa36e27e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-12-29 Robert Larice + * configure.ac , + * src/Makefile.am , + * src/spinit.in , + * src/tclspinit.in : + generate spinit and tclspinit at `make' time + to obey (info "(autoconf) Installation Directory Variables") + and edit them for codemodels in $(pkglibdir) + 2011-12-29 Robert Larice * src/xspice/icm/GNUmakefile.in , * src/xspice/icm/makedefs.in : diff --git a/configure.ac b/configure.ac index d322af04c..2b9f89ddb 100644 --- a/configure.ac +++ b/configure.ac @@ -1008,8 +1008,6 @@ AC_CONFIG_FILES([Makefile man/Makefile man/man1/Makefile src/Makefile - src/spinit - src/tclspinit src/spicelib/Makefile src/spicelib/analysis/Makefile src/spicelib/devices/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 5c401495f..5571f3266 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -280,6 +280,23 @@ ngspice.idx: ngmakeidx$(EXEEXT) $(srcdir)/ngspice.txt endif !WINDOWS +## create spinit at compile time, see +## (info "(autoconf) Installation Directory Variables") + +edit = sed \ + -e 's|@XSPICEINIT[@]|$(XSPICEINIT)|g' \ + -e 's|@pkglibdir[@]|$(pkglibdir)|g' + +spinit tclspinit : Makefile + rm -f $@ $@.tmp + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + $(edit) $${srcdir}$@.in >$@.tmp + mv $@.tmp $@ + +spinit: $(srcdir)/spinit.in +tclspinit: $(srcdir)/tclspinit.in + ## General Includes and libraries: @@ -422,8 +439,8 @@ install-tcl-recursive: done; install-tclspice: - $(mkinstalldirs) $(DESTDIR)$(libdir)/spice - $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(libdir)/spice + $(mkinstalldirs) $(DESTDIR)$(pkglibdir) + $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) endif TCL_MODULE diff --git a/src/spinit.in b/src/spinit.in index b0238a530..e5bcf8ba8 100644 --- a/src/spinit.in +++ b/src/spinit.in @@ -21,13 +21,13 @@ if $__flag = 0 * For SPICE2 POLYs, edit the below line to point to the location * of your codemodel. -@XSPICEINIT@ codemodel @prefix@/@libname@/spice/spice2poly.cm +@XSPICEINIT@ codemodel @pkglibdir@/spice2poly.cm * The other codemodels -@XSPICEINIT@ codemodel @prefix@/@libname@/spice/analog.cm -@XSPICEINIT@ codemodel @prefix@/@libname@/spice/digital.cm -@XSPICEINIT@ codemodel @prefix@/@libname@/spice/xtradev.cm -@XSPICEINIT@ codemodel @prefix@/@libname@/spice/xtraevt.cm +@XSPICEINIT@ codemodel @pkglibdir@/analog.cm +@XSPICEINIT@ codemodel @pkglibdir@/digital.cm +@XSPICEINIT@ codemodel @pkglibdir@/xtradev.cm +@XSPICEINIT@ codemodel @pkglibdir@/xtraevt.cm end unset __flag diff --git a/src/tclspinit.in b/src/tclspinit.in index e07cc8044..85615336c 100644 --- a/src/tclspinit.in +++ b/src/tclspinit.in @@ -12,13 +12,13 @@ if $__flag = 0 * For SPICE2 POLYs, edit the below line to point to the location * of your codemode. -@XSPICEINIT@ codemodel @libdir@/spice/spice2poly.cm +@XSPICEINIT@ codemodel @pkglibdir@/spice2poly.cm * The other codemodels -@XSPICEINIT@ codemodel @libdir@/spice/analog.cm -@XSPICEINIT@ codemodel @libdir@/spice/digital.cm -@XSPICEINIT@ codemodel @libdir@/spice/xtradev.cm -@XSPICEINIT@ codemodel @libdir@/spice/xtraevt.cm +@XSPICEINIT@ codemodel @pkglibdir@/analog.cm +@XSPICEINIT@ codemodel @pkglibdir@/digital.cm +@XSPICEINIT@ codemodel @pkglibdir@/xtradev.cm +@XSPICEINIT@ codemodel @pkglibdir@/xtraevt.cm end unset __flag