1 ## -*- text -*- #############################################################
3 # Makefile for the Bash versions of the GNU Readline and History Libraries. #
5 #############################################################################
7 # Copyright (C) 1994-2012 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 3 of the License, or
12 # (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
22 PACKAGE
= @PACKAGE_NAME@
23 VERSION
= @PACKAGE_VERSION@
25 PACKAGE_BUGREPORT
= @PACKAGE_BUGREPORT@
26 PACKAGE_NAME
= @PACKAGE_NAME@
27 PACKAGE_STRING
= @PACKAGE_STRING@
28 PACKAGE_VERSION
= @PACKAGE_VERSION@
33 BUILD_DIR
= @BUILD_DIR@
35 datarootdir
= @datarootdir@
38 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
39 INSTALL_DATA
= @INSTALL_DATA@
51 # Programs to make tags files.
56 LOCAL_CFLAGS
= @LOCAL_CFLAGS@
61 LOCAL_DEFS
= @LOCAL_DEFS@
63 INCLUDES
= -I.
-I
$(BUILD_DIR
) -I
$(topdir
) -I
$(topdir
)/lib
65 CCFLAGS
= $(DEFS
) $(LOCAL_DEFS
) $(APP_CFLAGS
) $(CPPFLAGS
) ${INCLUDES} $(LOCAL_CFLAGS
) $(CFLAGS
)
69 $(CC
) -c
$(CCFLAGS
) $<
71 # The name of the main library target.
72 LIBRARY_NAME
= libreadline.a
74 # The C code source files for this library.
75 CSOURCES
= $(srcdir)/readline.c
$(srcdir)/funmap.c
$(srcdir)/keymaps.c \
76 $(srcdir)/vi_mode.c
$(srcdir)/parens.c
$(srcdir)/rltty.c \
77 $(srcdir)/complete.c
$(srcdir)/bind.c
$(srcdir)/isearch.c \
78 $(srcdir)/display.c
$(srcdir)/signals.c
$(srcdir)/emacs_keymap.c \
79 $(srcdir)/vi_keymap.c
$(srcdir)/util.c
$(srcdir)/kill.c \
80 $(srcdir)/undo.c
$(srcdir)/macro.c
$(srcdir)/input.c \
81 $(srcdir)/callback.c
$(srcdir)/terminal.c
$(srcdir)/xmalloc.c \
82 $(srcdir)/history.c
$(srcdir)/histsearch.c
$(srcdir)/histexpand.c \
83 $(srcdir)/histfile.c
$(srcdir)/nls.c
$(srcdir)/search.c \
84 $(srcdir)/shell.c
$(srcdir)/tilde.c
$(srcdir)/savestring.c \
85 $(srcdir)/text.c
$(srcdir)/misc.c
$(srcdir)/compat.c \
86 $(srcdir)/colors.c
$(srcdir)/parse-colors.c \
87 $(srcdir)/mbutil.c
$(srcdir)/xfree.c
89 # The header files for this library.
90 HSOURCES
= readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
91 posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
92 ansi_stdlib.h rlstdc.h tcap.h xmalloc.h rlprivate.h rlshell.h \
93 rltypedefs.h rlmbutil.h colors.h parse-colors.h
95 HISTOBJ
= history.o histexpand.o histfile.o histsearch.o
shell.o savestring.o \
98 COLORSOBJ
= colors.o parse-colors.o
99 OBJECTS
= readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
100 rltty.o complete.o bind.o isearch.o display.o signals.o \
101 util.o kill.o undo.o macro.o input.o callback.o terminal.o \
102 text.o nls.o misc.o
$(HISTOBJ
) $(TILDEOBJ
) $(COLORSOBJ
) \
103 xmalloc.o xfree.o compat.o
105 # The texinfo files which document this library.
106 DOCSOURCE
= doc
/rlman.texinfo doc
/rltech.texinfo doc
/rluser.texinfo
107 DOCOBJECT
= doc
/readline.
dvi
108 DOCSUPPORT
= doc
/Makefile
109 DOCUMENTATION
= $(DOCSOURCE
) $(DOCOBJECT
) $(DOCSUPPORT
)
111 SUPPORT
= Makefile ChangeLog
$(DOCSUPPORT
) examples
/[-a-z.
]*
113 SOURCES
= $(CSOURCES
) $(HSOURCES
) $(DOCSOURCE
)
115 THINGS_TO_TAR
= $(SOURCES
) $(SUPPORT
)
117 INSTALLED_HEADERS
= readline.h chardefs.h keymaps.h history.h tilde.h \
118 rlstdc.h rlconf.h rltypedefs.h
120 ##########################################################################
122 all: libreadline.a libhistory.a
124 libreadline.a
: $(OBJECTS
)
126 $(AR
) $(ARFLAGS
) $@
$(OBJECTS
)
127 -test -n
"$(RANLIB)" && $(RANLIB
) $@
129 libhistory.a
: $(HISTOBJ
) xmalloc.o xfree.o
131 $(AR
) $(ARFLAGS
) $@
$(HISTOBJ
) xmalloc.o xfree.o
132 -test -n
"$(RANLIB)" && $(RANLIB
) $@
135 test -d doc || mkdir doc
136 -( cd doc
&& $(MAKE
) $(MFLAGS
) )
138 # Since tilde.c is shared between readline and bash, make sure we compile
139 # it with the right flags when it's built as part of readline
142 $(CC
) $(CCFLAGS
) -DREADLINE_LIBRARY
-c
$(srcdir)/tilde.c
147 @echo
"This version of the readline library should not be installed."
150 @echo
"This version of the readline library should not be installed."
153 $(ETAGS
) $(CSOURCES
) $(HSOURCES
)
156 $(CTAGS
) $(CSOURCES
) $(HSOURCES
)
160 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
163 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
165 distclean maintainer-clean
: clean
166 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
171 bind.o
: ansi_stdlib.h posixstat.h
172 bind.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
173 bind.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
174 bind.o
: history.h rlstdc.h
175 callback.o
: rlconf.h ansi_stdlib.h
176 callback.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
177 callback.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
179 complete.o
: ansi_stdlib.h posixdir.h posixstat.h
180 complete.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
181 complete.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
183 display.o
: ansi_stdlib.h posixstat.h
184 display.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
186 display.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
187 display.o
: history.h rlstdc.h
188 funmap.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
189 funmap.o
: rlconf.h ansi_stdlib.h rlstdc.h
190 funmap.o
: ${BUILD_DIR}/config.h
191 histexpand.o
: ansi_stdlib.h
192 histexpand.o
: history.h histlib.h rlstdc.h
193 histexpand.o
: ${BUILD_DIR}/config.h
194 histfile.o
: ansi_stdlib.h
195 histfile.o
: history.h histlib.h rlstdc.h
196 histfile.o
: ${BUILD_DIR}/config.h
197 history.o
: ansi_stdlib.h
198 history.o
: history.h histlib.h rlstdc.h
199 history.o
: ${BUILD_DIR}/config.h
200 histsearch.o
: ansi_stdlib.h
201 histsearch.o
: history.h histlib.h rlstdc.h
202 histsearch.o
: ${BUILD_DIR}/config.h
203 input.o
: ansi_stdlib.h
204 input.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
205 input.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
206 isearch.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
207 isearch.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
208 isearch.o
: ansi_stdlib.h history.h rlstdc.h
209 keymaps.o
: emacs_keymap.c vi_keymap.c
210 keymaps.o
: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h
211 keymaps.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
212 keymaps.o
: ${BUILD_DIR}/config.h rlstdc.h
213 kill.o
: ansi_stdlib.h
214 kill.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
215 kill.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
216 kill.o
: history.h rlstdc.h
217 macro.o
: ansi_stdlib.h
218 macro.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
219 macro.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
220 macro.o
: history.h rlstdc.h
221 mbutil.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h rlmbutil.h
222 mbutil.o
: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h
223 misc.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
224 misc.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
225 misc.o
: history.h rlstdc.h ansi_stdlib.h
227 nls.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
228 nls.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
229 nls.o
: history.h rlstdc.h
231 parens.o
: ${BUILD_DIR}/config.h
232 parens.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
233 readline.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
234 readline.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
235 readline.o
: history.h rlstdc.h
236 readline.o
: posixstat.h ansi_stdlib.h posixjmp.h
237 rltty.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
239 rltty.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
240 search.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
241 search.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
242 search.o
: ansi_stdlib.h history.h rlstdc.h
243 shell.o
: ${BUILD_DIR}/config.h ansi_stdlib.h
244 signals.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
245 signals.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
246 signals.o
: history.h rlstdc.h
247 terminal.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
249 terminal.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
250 terminal.o
: history.h rlstdc.h
251 text.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
252 text.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
253 text.o
: history.h rlstdc.h ansi_stdlib.h
254 rltty.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
255 tilde.o
: ansi_stdlib.h
256 tilde.o
: ${BUILD_DIR}/config.h
258 undo.o
: ansi_stdlib.h
259 undo.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
260 undo.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
261 undo.o
: history.h rlstdc.h xmalloc.h
262 util.o
: posixjmp.h ansi_stdlib.h
263 util.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
264 util.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
265 vi_mode.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
266 vi_mode.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
267 vi_mode.o
: history.h ansi_stdlib.h rlstdc.h
268 xmalloc.o
: ${BUILD_DIR}/config.h ansi_stdlib.h
269 xfree.o
: ${BUILD_DIR}/config.h ansi_stdlib.h
271 colors.o
: ${BUILD_DIR}/config.h colors.h
272 colors.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
274 colors.o
: ansi_stdlib.h posixstat.h
275 parse-colors.o
: ${BUILD_DIR}/config.h colors.h parse-colors.h
276 parse-colors.o
: rldefs.h rlconf.h
277 parse-colors.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
280 histfile.o
: rlshell.h
282 readline.o
: rlshell.h
284 terminal.o
: rlshell.h
285 histexpand.o
: rlshell.h
288 callback.o
: rlprivate.h
289 complete.o
: rlprivate.h
290 display.o
: rlprivate.h
292 isearch.o
: rlprivate.h
295 mbutil.o
: rlprivate.h
298 parens.o
: rlprivate.h
299 readline.o
: rlprivate.h
301 search.o
: rlprivate.h
302 signals.o
: rlprivate.h
303 terminal.o
: rlprivate.h
307 vi_mode.o
: rlprivate.h
308 colors.o
: rlprivate.h
309 parse-colors.o
: rlprivate.h
312 complete.o
: xmalloc.h
315 histexpand.o
: xmalloc.h
316 histfile.o
: xmalloc.h
325 readline.o
: xmalloc.h
326 savestring.o
: xmalloc.h
329 terminal.o
: xmalloc.h
338 parse-colors.o
: xmalloc.h
340 complete.o
: rlmbutil.h
341 display.o
: rlmbutil.h
342 histexpand.o
: rlmbutil.h
344 isearch.o
: rlmbutil.h
347 readline.o
: rlmbutil.h
350 vi_mode.o
: rlmbutil.h
352 parse-colors.o
: rlmbutil.h
354 # Rules for deficient makes, like SunOS and Solaris
356 callback.o
: callback.c
358 complete.o
: complete.c
363 keymaps.o
: keymaps.c emacs_keymap.c vi_keymap.c
370 readline.o
: readline.c
372 savestring.o
: savestring.c
376 terminal.o
: terminal.c
386 parse-colors.o
: parse-colors.c
388 histexpand.o
: histexpand.c
389 histfile.o
: histfile.c
391 histsearch.o
: histsearch.c