X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/5bd808a6591d299489a6e7af6a4c00ae40410e35..5c0f2e080603967952db43eb7b12d44dd64f7169:/vars.am?ds=sidebyside diff --git a/vars.am b/vars.am index 33f5495..a2c349e 100644 --- a/vars.am +++ b/vars.am @@ -25,22 +25,41 @@ ### MA 02111-1307, USA. ###-------------------------------------------------------------------------- -### Installation directories. +### Miscellaneous useful definitions. +## Installation directories. pkglibexecdir = $(libexecdir)/$(PACKAGE) ###-------------------------------------------------------------------------- ### Initial values for common variables. +EXTRA_DIST = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = +BUILT_SOURCES = + bin_PROGRAMS = check_PROGRAMS = pkginclude_HEADERS = -PRECOMPS = +noinst_DATA = + PROGMANS = LIBMANS = -EXTRA_DIST = $(PRECOMPS) $(LIBMANS) $(PROGMANS) -CLEANFILES = -MAINTAINERCLEANFILES = $(PRECOMPS) + +SUFFIXES = + +###-------------------------------------------------------------------------- +### Machinery for precomputations. + +## Location of precomputed tables. +precomp = $(top_srcdir)/precomp + +## Precomputed source code files. +PRECOMPS = +EXTRA_DIST += $(PRECOMPS) +BUILT_SOURCES += $(PRECOMPS) +MAINTAINERCLEANFILES += $(PRECOMPS) ###-------------------------------------------------------------------------- ### Include path. @@ -61,7 +80,7 @@ MLIB_INCLUDES = \ AM_CPPFLAGS = $(MLIB_INCLUDES) ###-------------------------------------------------------------------------- -### Miscellaneous useful definitions. +### Standard configuration substitutions. ## Substitute tags in files. confsubst = $(top_srcdir)/config/confsubst @@ -70,10 +89,13 @@ SUBSTITUTIONS = \ prefix=$(prefix) exec_prefix=$(exec_prefix) \ libdir=$(libdir) includedir=$(includedir) \ bindir=$(bindir) sbindir=$(sbindir) \ - PACKAGE=$(PACKAGE) VERSION=$(VERSION) + PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ + MLIB_LIBS="$(MLIB_LIBS)" -## Location of precomputed tables. -precomp = $(top_srcdir)/precomp +V_SUBST = $(V_SUBST_@AM_V@) +V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@) +V_SUBST_0 = @echo " SUBST $@"; +SUBST = $(V_SUBST)$(confsubst) ###-------------------------------------------------------------------------- ### Building utilities. @@ -98,19 +120,36 @@ tests::; ###-------------------------------------------------------------------------- ### Manual. -EXTRA_DIST += $(LIBMANS) $(PROGMANS) +noinst_DATA += $(PROGMANS) $(LIBMANS) +CLEANFILES += $(PROGMANS) $(LIBMANS) + +SUFFIXES += .1 .1.in +SUFFIXES += .3 .3.in + +mandefs = $(top_srcdir)/defs.man + +V_MAN = $(V_MAN_@AM_V@) +V_MAN_ = $(V_MAN_@AM_DEFAULT_V@) +V_MAN_0 = @echo " MAN $@"; + +.1.in.1 .3.in.3: + $(V_MAN) + $(AM_V_at)sed '/^\.$$/ d; /^\.\\"/ d' $(mandefs) >$@.defs + $(AM_V_at)sed -e '/@@@PRE@@@/ {' -e 'r$@.defs' -e 'd' -e '}' \ + $< >$@.new + $(AM_V_at)rm -f $@.defs && mv $@.new $@ install-data-local: install-man install-man: $(LIBMANS) $(PROGMANS) @$(NORMAL_INSTALL) $(mkdir_p) $(DESTDIR)$(mandir) $(top_srcdir)/config/maninst \ - -d $(DESTDIR)$(mandir) -s $(srcdir) \ + -d $(DESTDIR)$(mandir) -s . \ -i "$(INSTALL)" \ install $(PROGMANS) $(top_srcdir)/config/maninst \ - -d $(DESTDIR)$(mandir) -s $(srcdir) \ - -i "$(INSTALL)" -e $(manext) \ + -d $(DESTDIR)$(mandir) -s . \ + -i "$(INSTALL)" -e "$(manext)" \ install $(LIBMANS) .PHONY: install-man @@ -118,10 +157,10 @@ uninstall-local: uninstall-man uninstall-man: @$(NORMAL_UNINSTALL) $(top_srcdir)/config/maninst \ - -d $(DESTDIR)$(mandir) -s $(srcdir) \ + -d $(DESTDIR)$(mandir) -s . \ uninstall $(PROGMANS) $(top_srcdir)/config/maninst \ - -d $(DESTDIR)$(mandir) -s $(srcdir) -e $(manext) \ + -d $(DESTDIR)$(mandir) -s . -e "$(manext)" \ uninstall $(LIBMANS) .PHONY: uninstall-man