chiark / gitweb /
c6f78842b320fae584d01204046ce5d6153002f6
[mLib] / vars.am
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 ###--------------------------------------------------------------------------
28 ### Installation directories.
29
30 pkglibexecdir            = $(libexecdir)/$(PACKAGE)
31
32 ###--------------------------------------------------------------------------
33 ### Initial values for common variables.
34
35 bin_PROGRAMS             =
36 check_PROGRAMS           =
37 pkginclude_HEADERS       =
38 PROGMANS                 =
39 LIBMANS                  =
40 EXTRA_DIST               = $(LIBMANS) $(PROGMANS)
41 CLEANFILES               =
42 MAINTAINERCLEANFILES     = 
43
44 ###--------------------------------------------------------------------------
45 ### Include path.
46
47 MLIB_INCLUDES = \
48         -I$(top_srcdir)/buf \
49         -I$(top_srcdir)/codec \
50         -I$(top_srcdir)/hash \
51         -I$(top_srcdir)/mem \
52         -I$(top_srcdir)/net \
53         -I$(top_srcdir)/struct \
54         -I$(top_srcdir)/sys \
55         -I$(top_srcdir)/test \
56         -I$(top_srcdir)/trace \
57         -I$(top_srcdir)/ui \
58         -I$(top_srcdir)/utils
59
60 CPPFLAGS += $(MLIB_INCLUDES)
61
62 ###--------------------------------------------------------------------------
63 ### Miscellaneous useful definitions.
64
65 ## Substitute tags in files.
66 confsubst                = $(top_srcdir)/config/confsubst
67
68 SUBSTITUTIONS = \
69         prefix=$(prefix) exec_prefix=$(exec_prefix) \
70         libdir=$(libdir) includedir=$(includedir) \
71         bindir=$(bindir) sbindir=$(sbindir) \
72         PACKAGE=$(PACKAGE) VERSION=$(VERSION)
73
74 ###--------------------------------------------------------------------------
75 ### Building utilities.
76
77 ## Which libraries we need.
78 UTIL_LIBS = \
79         $(top_builddir)/ui/libui.la \
80         $(top_builddir)/utils/libutils.la
81
82 ## Making sure they're built properly.  Without this, `make dist' on a bare
83 ## source tree fails hopelessly.
84 build_util_libs = \
85         for i in ui utils; do \
86           (cd $(top_builddir)/$$i && $(MAKE) lib$$i.la) || exit 1; \
87         done
88
89 ###--------------------------------------------------------------------------
90 ### Testing.
91
92 TEST_CPPFLAGS            = -DTEST_RIG -DSRCDIR="\"$(srcdir)\"" $(AM_CPPFLAGS)
93 LDADD                    = $(top_builddir)/libmLib.la
94
95 check: tests
96 .PHONY: check tests
97
98 ###--------------------------------------------------------------------------
99 ### Manual.
100
101 EXTRA_DIST              += $(LIBMANS) $(PROGMANS)
102
103 install-data-local: install-man
104 install-man: $(LIBMANS) $(PROGMANS)
105         @$(NORMAL_INSTALL)
106         $(mkdir_p) $(DESTDIR)$(mandir)
107         $(top_srcdir)/config/maninst \
108                 -d $(DESTDIR)$(mandir) -s $(srcdir) \
109                 -i "$(INSTALL)" \
110                 install $(PROGMANS)
111         $(top_srcdir)/config/maninst \
112                 -d $(DESTDIR)$(mandir) -s $(srcdir) \
113                 -i "$(INSTALL)" -e $(manext) \
114                 install $(LIBMANS)
115 .PHONY: install-man
116
117 uninstall-local: uninstall-man
118 uninstall-man:
119         @$(NORMAL_UNINSTALL)
120         $(top_srcdir)/config/maninst \
121                 -d $(DESTDIR)$(mandir) -s $(srcdir) \
122                 uninstall $(PROGMANS)
123         $(top_srcdir)/config/maninst \
124                 -d $(DESTDIR)$(mandir) -s $(srcdir) -e $(manext) \
125                 uninstall $(LIBMANS)
126 .PHONY: uninstall-man
127
128 ###----- That's all, folks --------------------------------------------------