summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: c513bad3d10354ed962c02bf77935712fb7f9a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
## Process this file with automake to produce Makefile.in
##
## Copyright (C) 1994, 1995 Graeme Wilford.
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
##               2011, 2012 Colin Watson.
##
## This file is part of man-db.
##
## man-db is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## man-db is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with man-db; if not, write to the Free Software Foundation,
## Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

pkglibexecdir = $(libexecdir)/@PACKAGE@

SUBDIRS = . tests

bin_PROGRAMS = \
	catman \
	lexgrog \
	man \
	man-recode \
	mandb \
	manpath \
	whatis
sbin_PROGRAMS = accessdb
pkglibexec_PROGRAMS = globbing manconv zsoelim
noinst_DATA = man_db.conf

EXTRA_DIST = lexgrog.c zsoelim.c

AM_CPPFLAGS = \
	-I$(top_builddir)/include \
	-I$(top_builddir)/gl/lib \
	-I$(top_srcdir)/gl/lib \
	-I$(top_srcdir)/lib \
	-I$(top_srcdir)/libdb \
	-DCONFIG_FILE=\"$(config_file)\" \
	-DAPROPOS=\"$(bindir)/$(TRANS_APROPOS)\" \
	-DAPROPOS_NAME=\"$(TRANS_APROPOS)\" \
	-DMAN=\"$(bindir)/$(TRANS_MAN)\" \
	-DMANCONV=\"$(pkglibexecdir)/$(TRANS_MANCONV)\" \
	-DMANDB=\"$(bindir)/$(TRANS_MANDB)\" \
	-DWHATIS=\"$(bindir)/$(TRANS_WHATIS)\" \
	-DZSOELIM=\"$(pkglibexecdir)/$(TRANS_ZSOELIM)\"
AM_CFLAGS = \
	$(WARN_CFLAGS) \
	$(libpipeline_CFLAGS)

LIBMAN = $(top_builddir)/lib/libman.la $(top_builddir)/gl/lib/libgnu.la \
	 @LTLIBINTL@
LIBMANDB = $(top_builddir)/libdb/libmandb.la $(LIBMAN) $(DBLIBS)

accessdb_LDADD = $(LIBMANDB)
catman_LDADD = $(LIBMANDB) $(libpipeline_LIBS)
globbing_LDADD = $(LIBMAN)
lexgrog_LDADD = $(LIBMAN) $(LIBCOMPRESS) $(libpipeline_LIBS) $(LTLIBICONV)
man_LDADD = $(LIBMANDB) $(LIBCOMPRESS) $(libpipeline_LIBS) $(LTLIBICONV)
man_recode_LDADD = $(LIBMANDB) $(LIBCOMPRESS) $(libpipeline_LIBS) $(LTLIBICONV)
manconv_LDADD = $(LIBMAN) $(LIBCOMPRESS) $(libpipeline_LIBS) $(LTLIBICONV)
mandb_LDADD = $(LIBMANDB) $(LIBCOMPRESS) $(libpipeline_LIBS) $(LTLIBICONV)
manpath_LDADD = $(LIBMAN)
whatis_LDADD = $(LIBMANDB) $(libpipeline_LIBS) $(LTLIBICONV)
zsoelim_LDADD = $(LIBMAN) $(LIBCOMPRESS) $(libpipeline_LIBS)

accessdb_SOURCES = \
	accessdb.c
catman_SOURCES = \
	catman.c \
	globbing.c \
	globbing.h \
	manp.c \
	manp.h
globbing_SOURCES = \
	globbing.c \
	globbing.h \
	globbing_test.c
lexgrog_SOURCES = \
	compression.c \
	decompress.c \
	decompress.h \
	descriptions.c \
	descriptions.h \
	filenames.c \
	filenames.h \
	globbing.c \
	globbing.h \
	lexgrog.l \
	lexgrog_test.c \
	manconv.c \
	manconv.h \
	manconv_client.c \
	manconv_client.h \
	ult_src.c \
	ult_src.h
man_SOURCES = \
	compression.c \
	decompress.c \
	decompress.h \
	filenames.c \
	filenames.h \
	globbing.c \
	globbing.h \
	man.c \
	manconv.c \
	manconv.h \
	manconv_client.c \
	manconv_client.h \
	manp.c \
	manp.h \
	ult_src.c \
	ult_src.h \
	zsoelim.h \
	zsoelim.l
man_recode_SOURCES = \
	compression.c \
	decompress.c \
	decompress.h \
	man-recode.c \
	manconv.c \
	manconv.h \
	manconv_client.c \
	manconv_client.h
manconv_SOURCES = \
	decompress.c \
	decompress.h \
	manconv.c \
	manconv.h \
	manconv_main.c
mandb_SOURCES = \
	check_mandirs.c \
	check_mandirs.h \
	compression.c \
	decompress.c \
	decompress.h \
	descriptions.c \
	descriptions.h \
	descriptions_store.c \
	filenames.c \
	filenames.h \
	globbing.c \
	globbing.h \
	lexgrog.l \
	manconv.c \
	manconv.h \
	manconv_client.c \
	manconv_client.h \
	mandb.c \
	manp.c \
	manp.h \
	straycats.c \
	ult_src.c \
	ult_src.h
manpath_SOURCES = \
	globbing.c \
	globbing.h \
	manp.c \
	manp.h \
	manpath.c
whatis_SOURCES = \
	globbing.c \
	globbing.h \
	manp.c \
	manp.h \
	whatis.c
zsoelim_SOURCES = \
	decompress.c \
	decompress.h \
	globbing.c \
	globbing.h \
	manp.c \
	manp.h \
	zsoelim.h \
	zsoelim.l \
	zsoelim_main.c

CLEANFILES = apropos man_db.conf

apropos$(EXEEXT): whatis$(EXEEXT)
	rm -f $@
	$(LN_S) whatis$(EXEEXT) $@

all-am: apropos$(EXEEXT)

install-exec-hook:
	if [ "$(man_owner)" ] && [ "$(man_mode)" = 6755 ]; then \
		chown $(man_owner):$(man_owner) \
			$(DESTDIR)$(bindir)/$(TRANS_MAN) \
			$(DESTDIR)$(bindir)/$(TRANS_MANDB); \
	fi
	chmod $(man_mode) \
		$(DESTDIR)$(bindir)/$(TRANS_MAN) \
		$(DESTDIR)$(bindir)/$(TRANS_MANDB)
	cd $(DESTDIR)$(bindir) && rm -f $(TRANS_APROPOS)$(EXEEXT) && \
		$(LN_S) $(TRANS_WHATIS)$(EXEEXT) $(TRANS_APROPOS)$(EXEEXT)

install-data-hook:
	@if test -f $(DESTDIR)$(config_file); then \
		echo "$(DESTDIR)$(config_file) already exists; overwrite manually if necessary"; \
	else \
		test -z "$(config_file_dirname)" || $(MKDIR_P) "$(DESTDIR)$(config_file_dirname)"; \
		echo " $(INSTALL_DATA) man_db.conf $(DESTDIR)$(config_file)"; \
		$(INSTALL_DATA) man_db.conf $(DESTDIR)$(config_file); \
	fi

uninstall-hook:
	rm -f $(DESTDIR)$(bindir)/$(TRANS_APROPOS)$(EXEEXT)
	@echo "Please remove $(DESTDIR)$(config_file) manually if necessary"