chiark / gitweb /
@@@ fltfmt wip
[mLib] / vars.am
CommitLineData
18c831dc
MW
1### -*-Makefile-*-
2###
3### Common build-system definition
4###
5### (c) 1998 Straylight/Edgeware
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of the mLib utilities library.
11###
12### mLib is free software; you can redistribute it and/or modify
13### it under the terms of the GNU Library General Public License as
14### published by the Free Software Foundation; either version 2 of the
15### License, or (at your option) any later version.
16###
17### mLib is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU Library General Public License for more details.
21###
22### You should have received a copy of the GNU Library General Public
23### License along with mLib; if not, write to the Free
24### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25### MA 02111-1307, USA.
26
27###--------------------------------------------------------------------------
118a549c
MW
28### Miscellaneous useful definitions.
29
118a549c 30## Installation directories.
18c831dc
MW
31pkglibexecdir = $(libexecdir)/$(PACKAGE)
32
33###--------------------------------------------------------------------------
34### Initial values for common variables.
35
118a549c
MW
36EXTRA_DIST =
37CLEANFILES =
38DISTCLEANFILES =
39MAINTAINERCLEANFILES =
40BUILT_SOURCES =
41
18c831dc
MW
42bin_PROGRAMS =
43check_PROGRAMS =
44pkginclude_HEADERS =
c4ccbbf9 45noinst_DATA =
118a549c 46
18c831dc
MW
47PROGMANS =
48LIBMANS =
c4ccbbf9
MW
49
50SUFFIXES =
118a549c
MW
51
52###--------------------------------------------------------------------------
53### Machinery for precomputations.
54
55## Location of precomputed tables.
56precomp = $(top_srcdir)/precomp
57
58## Precomputed source code files.
59PRECOMPS =
60EXTRA_DIST += $(PRECOMPS)
61BUILT_SOURCES += $(PRECOMPS)
62MAINTAINERCLEANFILES += $(PRECOMPS)
18c831dc
MW
63
64###--------------------------------------------------------------------------
65### Include path.
66
4af1c336 67MLIB_INCLUDES = \
18c831dc
MW
68 -I$(top_srcdir)/buf \
69 -I$(top_srcdir)/codec \
70 -I$(top_srcdir)/hash \
71 -I$(top_srcdir)/mem \
72 -I$(top_srcdir)/net \
73 -I$(top_srcdir)/struct \
74 -I$(top_srcdir)/sys \
75 -I$(top_srcdir)/test \
76 -I$(top_srcdir)/trace \
77 -I$(top_srcdir)/ui \
78 -I$(top_srcdir)/utils
79
4af1c336 80AM_CPPFLAGS = $(MLIB_INCLUDES)
18c831dc
MW
81
82###--------------------------------------------------------------------------
118a549c 83### Standard configuration substitutions.
18c831dc
MW
84
85## Substitute tags in files.
86confsubst = $(top_srcdir)/config/confsubst
87
88SUBSTITUTIONS = \
89 prefix=$(prefix) exec_prefix=$(exec_prefix) \
90 libdir=$(libdir) includedir=$(includedir) \
91 bindir=$(bindir) sbindir=$(sbindir) \
5b2eac52
MW
92 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
93 MLIB_LIBS="$(MLIB_LIBS)"
18c831dc 94
dd8acfea
MW
95V_SUBST = $(V_SUBST_@AM_V@)
96V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@)
97V_SUBST_0 = @echo " SUBST $@";
2cf5abdf 98SUBST = $(V_SUBST)$(confsubst)
173ff44a 99
18c831dc
MW
100###--------------------------------------------------------------------------
101### Building utilities.
102
103## Which libraries we need.
104UTIL_LIBS = \
105 $(top_builddir)/ui/libui.la \
106 $(top_builddir)/utils/libutils.la
107
18c831dc
MW
108###--------------------------------------------------------------------------
109### Testing.
110
111TEST_CPPFLAGS = -DTEST_RIG -DSRCDIR="\"$(srcdir)\"" $(AM_CPPFLAGS)
112LDADD = $(top_builddir)/libmLib.la
113
114check: tests
115.PHONY: check tests
116
7cf5c72a
MW
117tests::;
118.PHONY: tests
119
18c831dc
MW
120###--------------------------------------------------------------------------
121### Manual.
122
c4ccbbf9
MW
123noinst_DATA += $(PROGMANS) $(LIBMANS)
124CLEANFILES += $(PROGMANS) $(LIBMANS)
125
126SUFFIXES += .1 .1.in
127SUFFIXES += .3 .3.in
128
129mandefs = $(top_srcdir)/defs.man
130
131V_MAN = $(V_MAN_@AM_V@)
132V_MAN_ = $(V_MAN_@AM_DEFAULT_V@)
133V_MAN_0 = @echo " MAN $@";
134
135.1.in.1 .3.in.3:
136 $(V_MAN)
137 $(AM_V_at)sed '/^\.$$/ d; /^\.\\"/ d' $(mandefs) >$@.defs
138 $(AM_V_at)sed -e '/@@@PRE@@@/ {' -e 'r$@.defs' -e 'd' -e '}' \
139 $< >$@.new
140 $(AM_V_at)rm -f $@.defs && mv $@.new $@
18c831dc
MW
141
142install-data-local: install-man
143install-man: $(LIBMANS) $(PROGMANS)
144 @$(NORMAL_INSTALL)
145 $(mkdir_p) $(DESTDIR)$(mandir)
146 $(top_srcdir)/config/maninst \
c4ccbbf9 147 -d $(DESTDIR)$(mandir) -s . \
18c831dc
MW
148 -i "$(INSTALL)" \
149 install $(PROGMANS)
150 $(top_srcdir)/config/maninst \
c4ccbbf9 151 -d $(DESTDIR)$(mandir) -s . \
33bbf104 152 -i "$(INSTALL)" -e "$(manext)" \
18c831dc
MW
153 install $(LIBMANS)
154.PHONY: install-man
155
156uninstall-local: uninstall-man
157uninstall-man:
158 @$(NORMAL_UNINSTALL)
159 $(top_srcdir)/config/maninst \
c4ccbbf9 160 -d $(DESTDIR)$(mandir) -s . \
18c831dc
MW
161 uninstall $(PROGMANS)
162 $(top_srcdir)/config/maninst \
c4ccbbf9 163 -d $(DESTDIR)$(mandir) -s . -e "$(manext)" \
18c831dc
MW
164 uninstall $(LIBMANS)
165.PHONY: uninstall-man
166
167###----- That's all, folks --------------------------------------------------