1 ## -*- text -*- #############################################################
3 # Makefile for the Bash versions of the GNU Readline and History Libraries. #
5 #############################################################################
7 # Copyright (C) 1994 Free Software Foundation, Inc.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
23 PACKAGE = @PACKAGE_NAME@
24 VERSION = @PACKAGE_VERSION@
26 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
27 PACKAGE_NAME = @PACKAGE_NAME@
28 PACKAGE_STRING = @PACKAGE_STRING@
29 PACKAGE_VERSION = @PACKAGE_VERSION@
34 BUILD_DIR = @BUILD_DIR@
37 INSTALL_PROGRAM = @INSTALL_PROGRAM@
38 INSTALL_DATA = @INSTALL_DATA@
50 # Programs to make tags files.
55 LOCAL_CFLAGS = @LOCAL_CFLAGS@
60 LOCAL_DEFS = @LOCAL_DEFS@
62 INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib
64 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
68 $(CC) -c $(CCFLAGS) $<
70 # The name of the main library target.
71 LIBRARY_NAME = libreadline.a
73 # The C code source files for this library.
74 CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
75 $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
76 $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \
77 $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
78 $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
79 $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
80 $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
81 $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
82 $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
83 $(srcdir)/shell.c $(srcdir)/tilde.c $(srcdir)/savestring.c \
84 $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
87 # The header files for this library.
88 HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
89 posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
90 ansi_stdlib.h rlstdc.h tcap.h xmalloc.h rlprivate.h rlshell.h \
91 rltypedefs.h rlmbutil.h
93 HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o savestring.o \
96 OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
97 rltty.o complete.o bind.o isearch.o display.o signals.o \
98 util.o kill.o undo.o macro.o input.o callback.o terminal.o \
99 text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) xmalloc.o compat.o
101 # The texinfo files which document this library.
102 DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
103 DOCOBJECT = doc/readline.dvi
104 DOCSUPPORT = doc/Makefile
105 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
107 SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]*
109 SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
111 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
113 INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
114 rlstdc.h rlconf.h rltypedefs.h
116 ##########################################################################
118 all: libreadline.a libhistory.a
120 libreadline.a: $(OBJECTS)
122 $(AR) $(ARFLAGS) $@ $(OBJECTS)
123 -test -n "$(RANLIB)" && $(RANLIB) $@
125 libhistory.a: $(HISTOBJ) xmalloc.o
127 $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
128 -test -n "$(RANLIB)" && $(RANLIB) $@
131 test -d doc || mkdir doc
132 -( cd doc && $(MAKE) $(MFLAGS) )
134 # Since tilde.c is shared between readline and bash, make sure we compile
135 # it with the right flags when it's built as part of readline
138 $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
143 @echo "This version of the readline library should not be installed."
146 @echo "This version of the readline library should not be installed."
149 $(ETAGS) $(CSOURCES) $(HSOURCES)
152 $(CTAGS) $(CSOURCES) $(HSOURCES)
156 -( cd doc && $(MAKE) $(MFLAGS) $@ )
159 -( cd doc && $(MAKE) $(MFLAGS) $@ )
161 distclean maintainer-clean: clean
162 -( cd doc && $(MAKE) $(MFLAGS) $@ )
167 bind.o: ansi_stdlib.h posixstat.h
168 bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
169 bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
170 bind.o: history.h rlstdc.h
171 callback.o: rlconf.h ansi_stdlib.h
172 callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
173 callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
175 complete.o: ansi_stdlib.h posixdir.h posixstat.h
176 complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
177 complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
178 display.o: ansi_stdlib.h posixstat.h
179 display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
181 display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
182 display.o: history.h rlstdc.h
183 funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
184 funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
185 funmap.o: ${BUILD_DIR}/config.h
186 histexpand.o: ansi_stdlib.h
187 histexpand.o: history.h histlib.h rlstdc.h
188 histexpand.o: ${BUILD_DIR}/config.h
189 histfile.o: ansi_stdlib.h
190 histfile.o: history.h histlib.h rlstdc.h
191 histfile.o: ${BUILD_DIR}/config.h
192 history.o: ansi_stdlib.h
193 history.o: history.h histlib.h rlstdc.h
194 history.o: ${BUILD_DIR}/config.h
195 histsearch.o: ansi_stdlib.h
196 histsearch.o: history.h histlib.h rlstdc.h
197 histsearch.o: ${BUILD_DIR}/config.h
198 input.o: ansi_stdlib.h
199 input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
200 input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
201 isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
202 isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
203 isearch.o: ansi_stdlib.h history.h rlstdc.h
204 keymaps.o: emacs_keymap.c vi_keymap.c
205 keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h
206 keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
207 keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
208 kill.o: ansi_stdlib.h
209 kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
210 kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
211 kill.o: history.h rlstdc.h
212 macro.o: ansi_stdlib.h
213 macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
214 macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
215 macro.o: history.h rlstdc.h
216 mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rlmbutil.h
217 mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h
218 misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
219 misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
220 misc.o: history.h rlstdc.h ansi_stdlib.h
222 nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
223 nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
224 nls.o: history.h rlstdc.h
226 parens.o: ${BUILD_DIR}/config.h
227 parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
228 readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
229 readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
230 readline.o: history.h rlstdc.h
231 readline.o: posixstat.h ansi_stdlib.h posixjmp.h
232 rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
234 rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
235 search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
236 search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
237 search.o: ansi_stdlib.h history.h rlstdc.h
238 shell.o: ${BUILD_DIR}/config.h ansi_stdlib.h
239 signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
240 signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
241 signals.o: history.h rlstdc.h
242 terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
244 terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
245 terminal.o: history.h rlstdc.h
246 text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
247 text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
248 text.o: history.h rlstdc.h ansi_stdlib.h
249 rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
250 tilde.o: ansi_stdlib.h
251 tilde.o: ${BUILD_DIR}/config.h
253 undo.o: ansi_stdlib.h
254 undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
255 undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
256 undo.o: history.h rlstdc.h xmalloc.h
257 util.o: posixjmp.h ansi_stdlib.h
258 util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
259 util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
260 vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
261 vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
262 vi_mode.o: history.h ansi_stdlib.h rlstdc.h
263 xmalloc.o: ${BUILD_DIR}/config.h ansi_stdlib.h
266 histfile.o: rlshell.h
268 readline.o: rlshell.h
270 terminal.o: rlshell.h
271 histexpand.o: rlshell.h
274 callback.o: rlprivate.h
275 complete.o: rlprivate.h
276 display.o: rlprivate.h
278 isearch.o: rlprivate.h
281 mbutil.o: rlprivate.h
284 parens.o: rlprivate.h
285 readline.o: rlprivate.h
287 search.o: rlprivate.h
288 signals.o: rlprivate.h
289 terminal.o: rlprivate.h
293 vi_mode.o: rlprivate.h
296 complete.o: xmalloc.h
299 histexpand.o: xmalloc.h
300 histfile.o: xmalloc.h
309 readline.o: xmalloc.h
310 savestring.o: xmalloc.h
313 terminal.o: xmalloc.h
321 complete.o: rlmbutil.h
322 display.o: rlmbutil.h
323 histexpand.o: rlmbutil.h
325 isearch.o: rlmbutil.h
328 readline.o: rlmbutil.h
331 vi_mode.o: rlmbutil.h
333 # Rules for deficient makes, like SunOS and Solaris
335 callback.o: callback.c
337 complete.o: complete.c
342 keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c
349 readline.o: readline.c
351 savestring.o: savestring.c
355 terminal.o: terminal.c
363 histexpand.o: histexpand.c
364 histfile.o: histfile.c
366 histsearch.o: histsearch.c