-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
341 lines (259 loc) · 10.7 KB
/
Makefile.in
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
## -*- text -*- ##
# Master Makefile for the GNU readline library.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This program 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 3 of the License, or
# (at your option) any later version.
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
everything:
RL_LIBRARY_VERSION = @LIBVERSION@
RL_LIBRARY_NAME = readline
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@
AR = @AR@
ARFLAGS = @ARFLAGS@
RM = rm -f
CP = cp
MV = mv
@SET_MAKE@
SHELL = @MAKE_SHELL@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
libdir = @libdir@
mandir = @mandir@
includedir = @includedir@
datadir = @datadir@
localedir = @localedir@
pkgconfigdir = ${libdir}/pkgconfig
infodir = @infodir@
docdir = @docdir@
man3dir = $(mandir)/man3
# Support an alternate destination root directory for package building
DESTDIR =
# Programs to make tags files.
ETAGS = etags
CTAGS = ctags
CFLAGS = @CFLAGS@ -fPIC
LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
CPPFLAGS = @CPPFLAGS@ -MD -MF $@.d -DHAVE_CONFIG_H
DEFS = @DEFS@ @CROSS_COMPILE@
LOCAL_DEFS = @LOCAL_DEFS@
TERMCAP_LIB = @TERMCAP_LIB@
# For libraries which include headers from other libraries.
INCLUDES = -I. -I$(srcdir)
XCCFLAGS = $(ASAN_CFLAGS) $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
CXXFLAGS = -Wno-write-strings $(CCFLAGS) -fpermissive -fPIC
CXX := g++
CC := false
export CC
#CC := /usr/stow/llvm-10a/bin/clang
# could add -Werror here
GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \
-Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wno-implicit -pedantic
GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@
ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer
ASAN_XLDFLAGS = -fsanitize=address
install_examples = @EXAMPLES_INSTALL_TARGET@
.cc.o:
${RM} $@
$(CXX) -c $(CXXFLAGS) $<
# The name of the main library target.
LIBRARY_NAME = libreadline++.a
STATIC_LIBS = libreadline++.a libhistory++.a
# The C code source files for this library.
CSOURCES = $(srcdir)/readline.cc $(srcdir)/funmap.cc $(srcdir)/keymaps.cc \
$(srcdir)/vi_mode.cc $(srcdir)/parens.cc $(srcdir)/rltty.cc \
$(srcdir)/complete.cc $(srcdir)/bind.cc $(srcdir)/isearch.cc \
$(srcdir)/display.cc $(srcdir)/signals.cc $(srcdir)/emacs_keymap.cc \
$(srcdir)/vi_keymap.cc $(srcdir)/util.cc $(srcdir)/kill.cc \
$(srcdir)/undo.cc $(srcdir)/macro.cc $(srcdir)/input.cc \
$(srcdir)/callback.cc $(srcdir)/terminal.cc $(srcdir)/xmalloc.cc $(srcdir)/xfree.cc \
$(srcdir)/history.cc $(srcdir)/histsearch.cc $(srcdir)/histexpand.cc \
$(srcdir)/histfile.cc $(srcdir)/nls.cc $(srcdir)/search.cc \
$(srcdir)/shell.cc $(srcdir)/savestring.cc $(srcdir)/tilde.cc \
$(srcdir)/text.cc $(srcdir)/misc.cc $(srcdir)/compat.cc \
$(srcdir)/mbutil.cc
# The header files for this library.
HSOURCES = $(srcdir)/readline.hh $(srcdir)/rldefs.hh $(srcdir)/chardefs.hh \
$(srcdir)/keymaps.hh $(srcdir)/history.hh $(srcdir)/histlib.hh \
$(srcdir)/posixstat.hh $(srcdir)/posixdir.hh $(srcdir)/posixjmp.hh \
$(srcdir)/tilde.hh $(srcdir)/rlconf.hh $(srcdir)/rltty.hh \
$(srcdir)/ansi_stdlib.hh $(srcdir)/tcap.hh $(srcdir)/rlstdc.hh \
$(srcdir)/xmalloc.hh $(srcdir)/rlprivate.hh $(srcdir)/rlshell.hh \
$(srcdir)/rltypedefs.hh $(srcdir)/rlmbutil.hh \
$(srcdir)/colors.hh $(srcdir)/parse-colors.hh
HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o
TILDEOBJ = tilde.o
COLORSOBJ = colors.o parse-colors.o
OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
rltty.o complete.o bind.o isearch.o display.o signals.o \
util.o kill.o undo.o macro.o input.o callback.o terminal.o \
text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) $(COLORSOBJ) \
xmalloc.o xfree.o compat.o
# The texinfo files which document this library.
DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
DOCOBJECT = doc/readline.dvi
DOCSUPPORT = doc/Makefile
DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile
CREATED_CONFIGURE = config.status config.hh config.cache config.log \
stamp-config stamp-h readline++.pc
CREATED_TAGS = TAGS tags
INSTALLED_HEADERS = readline.hh chardefs.hh keymaps.hh history.hh tilde.hh \
rlstdc.hh rlconf.hh rltypedefs.hh
OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/INSTALL $(srcdir)/README
OTHER_INSTALLED_DOCS = CHANGES INSTALL README
##########################################################################
TARGETS = @STATIC_TARGET@
INSTALL_TARGETS = @STATIC_INSTALL_TARGET@
all: $(TARGETS)
everything: all examples
asan:
${MAKE} ${MFLAGS} ASAN_CFLAGS='${ASAN_XCFLAGS}' ASAN_LDFLAGS='${ASAN_XLDFLAGS}' everything
static: $(STATIC_LIBS)
libreadline++.a: $(OBJECTS)
$(RM) $@
$(AR) $(ARFLAGS) $@ $(OBJECTS)
-test -n "$(RANLIB)" && $(RANLIB) $@
libhistory++.a: $(HISTOBJ) xmalloc.o xfree.o
$(RM) $@
$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o
-test -n "$(RANLIB)" && $(RANLIB) $@
# Since tilde.cc is shared between readline and bash, make sure we compile
# it with the right flags when it's built as part of readline
tilde.o: tilde.cc
rm -f $@
$(CXX) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.cc
readline: $(OBJECTS) readline.hh rldefs.hh chardefs.hh ./libreadline++.a
$(CXX) $(CCFLAGS) -DREADLINE_LIBRARY -o $@ $(top_srcdir)/examples/rl.cc ./libreadline++.a ${TERMCAP_LIB}
lint: force
$(MAKE) $(MFLAGS) CCFLAGS='$(GCC_LINT_CFLAGS)' static
Makefile: config.status $(srcdir)/Makefile.in
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
$(filter-out Makefile, $(CREATED_MAKEFILES)): %: %.in config.status $(srcdir)/Makefile.in
@for mf in $(CREATED_MAKEFILES); do \
CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
done
config.status: configure
$(SHELL) ./config.status --recheck
config.hh: stamp-h
stamp-h: config.status $(srcdir)/config.hh.in
CONFIG_FILES= CONFIG_HEADERS=config.hh ./config.status
echo > $@
$(srcdir)/configure: $(srcdir)/configure.ac ## Comment-me-out in distribution
cd $(srcdir) && autoconf ## Comment-me-out in distribution
documentation: force
-test -d doc || mkdir doc
-( cd doc && $(MAKE) $(MFLAGS) )
examples: all force
-(cd examples && ${MAKE} ${MFLAGS} all )
force:
install: $(INSTALL_TARGETS)
install-headers: installdirs ${INSTALLED_HEADERS}
for f in ${INSTALLED_HEADERS}; do \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/readline ; \
done
uninstall-headers:
-test -n "$(includedir)" && cd $(DESTDIR)$(includedir)/readline && \
${RM} ${INSTALLED_HEADERS}
maybe-uninstall-headers: uninstall-headers
install-pc: installdirs
-$(INSTALL_DATA) $(BUILD_DIR)/readline++.pc $(DESTDIR)$(pkgconfigdir)/readline++.pc
uninstall-pc:
-test -n "$(pkgconfigdir)" && cd $(DESTDIR)$(pkgconfigdir) && \
${RM} readline++.pc
maybe-uninstall-pc: uninstall-pc
install-static: installdirs $(STATIC_LIBS) install-headers install-doc ${install_examples} install-pc
-$(MV) $(DESTDIR)$(libdir)/libreadline++.a $(DESTDIR)$(libdir)/libreadline++.old
$(INSTALL_DATA) libreadline++.a $(DESTDIR)$(libdir)/libreadline++.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline++.a
-$(MV) $(DESTDIR)$(libdir)/libhistory++.a $(DESTDIR)$(libdir)/libhistory++.old
$(INSTALL_DATA) libhistory++.a $(DESTDIR)$(libdir)/libhistory++.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory++.a
installdirs: $(srcdir)/support/mkinstalldirs
-$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \
$(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \
$(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) \
$(DESTDIR)$(pkgconfigdir)
uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc
-test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \
${RM} libreadline++.a libreadline++.old libhistory++.a libhistory++.old
install-examples: installdirs install-headers
-( cd examples ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
uninstall-examples: maybe-uninstall-headers
-( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
install-doc: installdirs
$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
-( if test -d doc ; then \
cd doc && \
${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
fi )
uninstall-doc:
-( cd $(DESTDIR)$(docdir) && ${RM} ${OTHER_INSTALLED_DOCS} )
-( if test -d doc ; then \
cd doc && \
${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} uninstall; \
fi )
TAGS: force
-( cd $(srcdir) && $(ETAGS) $(CSOURCES) $(HSOURCES) )
tags: force
-( cd $(srcdir) && $(CTAGS) $(CSOURCES) $(HSOURCES) )
clean: force
$(RM) $(OBJECTS) $(STATIC_LIBS) $(patsubst %,%.d,$(OBJECTS))
$(RM) readline readline.exe
-( cd doc && $(MAKE) $(MFLAGS) $@ )
-( cd examples && $(MAKE) $(MFLAGS) $@ )
mostlyclean: clean
-( cd doc && $(MAKE) $(MFLAGS) $@ )
-( cd examples && $(MAKE) $(MFLAGS) $@ )
distclean maintainer-clean: clean
-( cd doc && $(MAKE) $(MFLAGS) $@ )
-( cd examples && $(MAKE) $(MFLAGS) $@ )
$(RM) Makefile
$(RM) $(CREATED_CONFIGURE)
$(RM) $(CREATED_TAGS)
readline++.pc: config.status $(srcdir)/readline++.pc.in
$(SHELL) config.status
info dvi html pdf ps:
-( cd doc && $(MAKE) $(MFLAGS) $@ )
install-info:
install-dvi:
install-html:
install-pdf:
install-ps:
check:
installcheck:
dist: force
@echo Readline distributions are created using $(srcdir)/support/mkdist.
@echo Here is a sample of the necessary commands:
@echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME) $(RL_LIBRARY_VERSION)
@echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION)
@echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# Dependencies
include /dev/null $(wildcard *.d)