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.
26 BUILD_DIR = @BUILD_DIR@
29 INSTALL_PROGRAM = @INSTALL_PROGRAM@
30 INSTALL_DATA = @INSTALL_DATA@
42 # Programs to make tags files.
47 LOCAL_CFLAGS = @LOCAL_CFLAGS@
52 LOCAL_DEFS = @LOCAL_DEFS@
54 INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib
56 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
60 $(CC) -c $(CCFLAGS) $<
62 # The name of the main library target.
63 LIBRARY_NAME = libreadline.a
65 # The C code source files for this library.
66 CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
67 $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
68 $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \
69 $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
70 $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
71 $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
72 $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
73 $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
74 $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
75 $(srcdir)/shell.c $(srcdir)/tilde.c $(srcdir)/savestring.c \
76 $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
79 # The header files for this library.
80 HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
81 posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
82 ansi_stdlib.h rlstdc.h tcap.h xmalloc.h rlprivate.h rlshell.h \
83 rltypedefs.h rlmbutil.h
85 HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o savestring.o \
88 OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
89 rltty.o complete.o bind.o isearch.o display.o signals.o \
90 util.o kill.o undo.o macro.o input.o callback.o terminal.o \
91 text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) xmalloc.o compat.o
93 # The texinfo files which document this library.
94 DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
95 DOCOBJECT = doc/readline.dvi
96 DOCSUPPORT = doc/Makefile
97 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
99 SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]*
101 SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
103 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
105 INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
106 rlstdc.h rlconf.h rltypedefs.h
108 ##########################################################################
110 all: libreadline.a libhistory.a
112 libreadline.a: $(OBJECTS)
114 $(AR) $(ARFLAGS) $@ $(OBJECTS)
115 -test -n "$(RANLIB)" && $(RANLIB) $@
117 libhistory.a: $(HISTOBJ) xmalloc.o
119 $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
120 -test -n "$(RANLIB)" && $(RANLIB) $@
123 test -d doc || mkdir doc
124 -( cd doc && $(MAKE) $(MFLAGS) )
126 # Since tilde.c is shared between readline and bash, make sure we compile
127 # it with the right flags when it's built as part of readline
130 $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
135 @echo "This version of the readline library should not be installed."
138 @echo "This version of the readline library should not be installed."
141 $(ETAGS) $(CSOURCES) $(HSOURCES)
144 $(CTAGS) $(CSOURCES) $(HSOURCES)
148 -( cd doc && $(MAKE) $(MFLAGS) $@ )
151 -( cd doc && $(MAKE) $(MFLAGS) $@ )
153 distclean maintainer-clean: clean
154 -( cd doc && $(MAKE) $(MFLAGS) $@ )
159 bind.o: ansi_stdlib.h posixstat.h
160 bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
161 bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
162 bind.o: history.h rlstdc.h
163 callback.o: rlconf.h ansi_stdlib.h
164 callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
165 callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
167 complete.o: ansi_stdlib.h posixdir.h posixstat.h
168 complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
169 complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
170 display.o: ansi_stdlib.h posixstat.h
171 display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
173 display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
174 display.o: history.h rlstdc.h
175 funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
176 funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
177 funmap.o: ${BUILD_DIR}/config.h
178 histexpand.o: ansi_stdlib.h
179 histexpand.o: history.h histlib.h rlstdc.h
180 histexpand.o: ${BUILD_DIR}/config.h
181 histfile.o: ansi_stdlib.h
182 histfile.o: history.h histlib.h rlstdc.h
183 histfile.o: ${BUILD_DIR}/config.h
184 history.o: ansi_stdlib.h
185 history.o: history.h histlib.h rlstdc.h
186 history.o: ${BUILD_DIR}/config.h
187 histsearch.o: ansi_stdlib.h
188 histsearch.o: history.h histlib.h rlstdc.h
189 histsearch.o: ${BUILD_DIR}/config.h
190 input.o: ansi_stdlib.h
191 input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
192 input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
193 isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
194 isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
195 isearch.o: ansi_stdlib.h history.h rlstdc.h
196 keymaps.o: emacs_keymap.c vi_keymap.c
197 keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h
198 keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
199 keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
200 kill.o: ansi_stdlib.h
201 kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
202 kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
203 kill.o: history.h rlstdc.h
204 macro.o: ansi_stdlib.h
205 macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
206 macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
207 macro.o: history.h rlstdc.h
208 mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rlmbutil.h
209 mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h
210 misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
211 misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
212 misc.o: history.h rlstdc.h ansi_stdlib.h
214 nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
215 nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
216 nls.o: history.h rlstdc.h
218 parens.o: ${BUILD_DIR}/config.h
219 parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
220 readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
221 readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
222 readline.o: history.h rlstdc.h
223 readline.o: posixstat.h ansi_stdlib.h posixjmp.h
224 rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
226 rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
227 search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
228 search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
229 search.o: ansi_stdlib.h history.h rlstdc.h
230 shell.o: ${BUILD_DIR}/config.h ansi_stdlib.h
231 signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
232 signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
233 signals.o: history.h rlstdc.h
234 terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
236 terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
237 terminal.o: history.h rlstdc.h
238 text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
239 text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
240 text.o: history.h rlstdc.h ansi_stdlib.h
241 rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
242 tilde.o: ansi_stdlib.h
243 tilde.o: ${BUILD_DIR}/config.h
245 undo.o: ansi_stdlib.h
246 undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
247 undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
248 undo.o: history.h rlstdc.h xmalloc.h
249 util.o: posixjmp.h ansi_stdlib.h
250 util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
251 util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
252 vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
253 vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
254 vi_mode.o: history.h ansi_stdlib.h rlstdc.h
255 xmalloc.o: ${BUILD_DIR}/config.h ansi_stdlib.h
258 histfile.o: rlshell.h
260 readline.o: rlshell.h
262 terminal.o: rlshell.h
263 histexpand.o: rlshell.h
266 callback.o: rlprivate.h
267 complete.o: rlprivate.h
268 display.o: rlprivate.h
270 isearch.o: rlprivate.h
273 mbutil.o: rlprivate.h
276 parens.o: rlprivate.h
277 readline.o: rlprivate.h
279 search.o: rlprivate.h
280 signals.o: rlprivate.h
281 terminal.o: rlprivate.h
285 vi_mode.o: rlprivate.h
288 complete.o: xmalloc.h
291 histexpand.o: xmalloc.h
292 histfile.o: xmalloc.h
301 readline.o: xmalloc.h
302 savestring.o: xmalloc.h
305 terminal.o: xmalloc.h
313 complete.o: rlmbutil.h
314 display.o: rlmbutil.h
315 histexpand.o: rlmbutil.h
317 isearch.o: rlmbutil.h
320 readline.o: rlmbutil.h
323 vi_mode.o: rlmbutil.h
325 # Rules for deficient makes, like SunOS and Solaris
327 callback.o: callback.c
329 complete.o: complete.c
334 keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c
341 readline.o: readline.c
343 savestring.o: savestring.c
347 terminal.o: terminal.c
355 histexpand.o: histexpand.c
356 histfile.o: histfile.c
358 histsearch.o: histsearch.c