From 0d5e569aca403c9cd58a23e8ee66b217a3f111dd Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 29 Dec 2011 14:35:45 +0000 Subject: [PATCH] cleanup src/Makefile.am --- ChangeLog | 8 ++++++++ src/Makefile.am | 38 +++++++++++++++----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7820d4deb..91faf7406 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-12-29 Robert Larice + * src/Makefile.am : + cleanup src/Makefile.am + TCL_MODULE rules + CLEANFILES + edit pkgIndex.tcl at `make' time + to obey (info "(autoconf) Installation Directory Variables") + 2011-12-29 Robert Larice * configure.ac : remove @libname@ diff --git a/src/Makefile.am b/src/Makefile.am index 5571f3266..94bacf024 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -308,15 +308,17 @@ if WINDOWS LIBS += -lpsapi endif -MAINTAINERCLEANFILES = Makefile.in ngspice.idx +CLEANFILES = ngspice.idx spinit tclspinit pkgIndex.tcl + +MAINTAINERCLEANFILES = Makefile.in ## Tcl: if TCL_MODULE lib_LTLIBRARIES = libspice.la -install: install-libLTLIBRARIES install-tcl-recursive install-tclspice install-data-am -EXTRA_DIST += tclspice.c initdata_DATA += tclspinit +pkgIndex_DATA = pkgIndex.tcl +pkgIndexdir = $(pkglibdir) if TCLWIN LIBS += -lpsapi -ltcl84 -lBLT24 @@ -416,31 +418,21 @@ libspice_la_LDFLAGS += -no-undefined libspice_la_LDFLAGS += --def spice.def @TCL_LIB_SPEC@ endif -CLEANFILES = pkgIndex.tcl libspice.so - -TCL_PKG_PATH = @TCL_PACKAGE_PATH@ - TCLSPICE_VERSION = @VERSION@ -TCL_FILES = libspice.la pkgIndex.tcl +pkgIndex_edit = sed \ + -e 's|%LIB_DIR%|$(libdir)|g' \ + -e 's|%VERSION%|$(TCLSPICE_VERSION)|g' -pkgIndex.tcl: pkgIndex.tcl.in - rm -f $@ - sed -e 's;%LIB_DIR%;$(DESTDIR)$(libdir);g' $< | \ - sed -e 's;%VERSION%;$(TCLSPICE_VERSION);g' > $@ +pkgIndex.tcl : Makefile + rm -f $@ $@.tmp + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + $(pkgIndex_edit) $${srcdir}$@.in >$@.tmp + mv $@.tmp $@ -all: $(TCL_FILES) +pkgIndex.tcl: $(srcdir)/pkgIndex.tcl.in -install-tcl-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) install) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; - -install-tclspice: - $(mkinstalldirs) $(DESTDIR)$(pkglibdir) - $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) endif TCL_MODULE