1 ## -*- text -*- #############################################################
3 # Makefile for the Bush 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.
58 LOCAL_CFLAGS
= @LOCAL_CFLAGS@
${DEBUG}
63 LOCAL_DEFS
= @LOCAL_DEFS@
65 INCLUDES
= -I.
-I
$(BUILD_DIR
) -I
$(topdir
) -I
$(topdir
)/lib
67 CCFLAGS
= $(DEFS
) $(LOCAL_DEFS
) $(APP_CFLAGS
) $(CPPFLAGS
) ${INCLUDES} \
68 $(LOCAL_CFLAGS
) $(CFLAGS
) ${ADDON_CFLAGS}
72 $(CC
) -c
$(CCFLAGS
) $<
74 # The name of the main library target.
75 LIBRARY_NAME
= libreadline.a
77 # The C code source files for this library.
78 CSOURCES
= $(srcdir)/readline.c
$(srcdir)/funmap.c
$(srcdir)/keymaps.c \
79 $(srcdir)/vi_mode.c
$(srcdir)/parens.c
$(srcdir)/rltty.c \
80 $(srcdir)/complete.c
$(srcdir)/bind.c
$(srcdir)/isearch.c \
81 $(srcdir)/display.c
$(srcdir)/signals.c
$(srcdir)/emacs_keymap.c \
82 $(srcdir)/vi_keymap.c
$(srcdir)/util.c
$(srcdir)/kill.c \
83 $(srcdir)/undo.c
$(srcdir)/macro.c
$(srcdir)/input.c \
84 $(srcdir)/callback.c
$(srcdir)/terminal.c
$(srcdir)/xmalloc.c \
85 $(srcdir)/history.c
$(srcdir)/histsearch.c
$(srcdir)/histexpand.c \
86 $(srcdir)/histfile.c
$(srcdir)/nls.c
$(srcdir)/search.c \
87 $(srcdir)/shell.c
$(srcdir)/tilde.c
$(srcdir)/savestring.c \
88 $(srcdir)/text.c
$(srcdir)/misc.c
$(srcdir)/compat.c \
89 $(srcdir)/colors.c
$(srcdir)/parse-colors.c \
90 $(srcdir)/mbutil.c
$(srcdir)/xfree.c
92 # The header files for this library.
93 HSOURCES
= readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
94 posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
95 ansi_stdlib.h rlstdc.h tcap.h xmalloc.h rlprivate.h rlshell.h \
96 rltypedefs.h rlmbutil.h colors.h parse-colors.h
98 HISTOBJ
= history.o histexpand.o histfile.o histsearch.o
shell.o savestring.o \
101 COLORSOBJ
= colors.o parse-colors.o
102 OBJECTS
= readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
103 rltty.o complete.o bind.o isearch.o display.o signals.o \
104 util.o kill.o undo.o macro.o input.o callback.o terminal.o \
105 text.o nls.o misc.o
$(HISTOBJ
) $(TILDEOBJ
) $(COLORSOBJ
) \
106 xmalloc.o xfree.o compat.o
108 # The texinfo files which document this library.
109 DOCSOURCE
= doc
/rlman.texinfo doc
/rltech.texinfo doc
/rluser.texinfo
110 DOCOBJECT
= doc
/readline.
dvi
111 DOCSUPPORT
= doc
/Makefile
112 DOCUMENTATION
= $(DOCSOURCE
) $(DOCOBJECT
) $(DOCSUPPORT
)
114 SUPPORT
= Makefile ChangeLog
$(DOCSUPPORT
) examples
/[-a-z.
]*
116 SOURCES
= $(CSOURCES
) $(HSOURCES
) $(DOCSOURCE
)
118 THINGS_TO_TAR
= $(SOURCES
) $(SUPPORT
)
120 INSTALLED_HEADERS
= readline.h chardefs.h keymaps.h history.h tilde.h \
121 rlstdc.h rlconf.h rltypedefs.h
123 ##########################################################################
125 all: libreadline.a libhistory.a
127 libreadline.a
: $(OBJECTS
)
129 $(AR
) $(ARFLAGS
) $@
$(OBJECTS
)
130 -test -n
"$(RANLIB)" && $(RANLIB
) $@
132 libhistory.a
: $(HISTOBJ
) xmalloc.o xfree.o
134 $(AR
) $(ARFLAGS
) $@
$(HISTOBJ
) xmalloc.o xfree.o
135 -test -n
"$(RANLIB)" && $(RANLIB
) $@
138 test -d doc || mkdir doc
139 -( cd doc
&& $(MAKE
) $(MFLAGS
) )
141 # Since tilde.c is shared between readline and bush, make sure we compile
142 # it with the right flags when it's built as part of readline
145 $(CC
) $(CCFLAGS
) -DREADLINE_LIBRARY
-c
$(srcdir)/tilde.c
150 @echo
"This version of the readline library should not be installed."
153 @echo
"This version of the readline library should not be installed."
156 $(ETAGS
) $(CSOURCES
) $(HSOURCES
)
159 $(CTAGS
) $(CSOURCES
) $(HSOURCES
)
163 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
166 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
168 distclean maintainer-clean
: clean
169 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
174 bind.o
: ansi_stdlib.h posixstat.h
175 bind.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
176 bind.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
177 bind.o
: history.h rlstdc.h
178 callback.o
: rlconf.h ansi_stdlib.h
179 callback.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
180 callback.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
181 compat.o
: ${BUILD_DIR}/config.h
182 compat.o
: rlstdc.h rltypedefs.h
183 complete.o
: ansi_stdlib.h posixdir.h posixstat.h
184 complete.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
185 complete.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
187 display.o
: ansi_stdlib.h posixstat.h
188 display.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
190 display.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
191 display.o
: history.h rlstdc.h
192 funmap.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
193 funmap.o
: rlconf.h ansi_stdlib.h rlstdc.h
194 funmap.o
: ${BUILD_DIR}/config.h
195 histexpand.o
: ansi_stdlib.h
196 histexpand.o
: history.h histlib.h rlstdc.h
197 histexpand.o
: ${BUILD_DIR}/config.h
198 histfile.o
: ansi_stdlib.h
199 histfile.o
: history.h histlib.h rlstdc.h
200 histfile.o
: ${BUILD_DIR}/config.h
201 history.o
: ansi_stdlib.h
202 history.o
: history.h histlib.h rlstdc.h
203 history.o
: ${BUILD_DIR}/config.h
204 histsearch.o
: ansi_stdlib.h
205 histsearch.o
: history.h histlib.h rlstdc.h
206 histsearch.o
: ${BUILD_DIR}/config.h
207 input.o
: ansi_stdlib.h
208 input.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
209 input.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
210 isearch.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
211 isearch.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
212 isearch.o
: ansi_stdlib.h history.h rlstdc.h
213 keymaps.o
: emacs_keymap.c vi_keymap.c
214 keymaps.o
: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h
215 keymaps.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
216 keymaps.o
: ${BUILD_DIR}/config.h rlstdc.h
217 kill.o
: ansi_stdlib.h
218 kill.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
219 kill.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
220 kill.o
: history.h rlstdc.h
221 macro.o
: ansi_stdlib.h
222 macro.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
223 macro.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
224 macro.o
: history.h rlstdc.h
225 mbutil.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h rlmbutil.h
226 mbutil.o
: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h
227 misc.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
228 misc.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
229 misc.o
: history.h rlstdc.h ansi_stdlib.h
231 nls.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
232 nls.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
233 nls.o
: history.h rlstdc.h
235 parens.o
: ${BUILD_DIR}/config.h
236 parens.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
237 readline.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
238 readline.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
239 readline.o
: history.h rlstdc.h
240 readline.o
: posixstat.h ansi_stdlib.h posixjmp.h
241 rltty.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
243 rltty.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
244 savestring.o
: ${BUILD_DIR}/config.h
245 search.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
246 search.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
247 search.o
: ansi_stdlib.h history.h rlstdc.h
248 shell.o
: ${BUILD_DIR}/config.h ansi_stdlib.h
249 signals.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
250 signals.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
251 signals.o
: history.h rlstdc.h
252 terminal.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
254 terminal.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
255 terminal.o
: history.h rlstdc.h
256 text.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
257 text.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
258 text.o
: history.h rlstdc.h ansi_stdlib.h
259 rltty.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
260 tilde.o
: ansi_stdlib.h
261 tilde.o
: ${BUILD_DIR}/config.h
263 undo.o
: ansi_stdlib.h
264 undo.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
265 undo.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
266 undo.o
: history.h rlstdc.h xmalloc.h
267 util.o
: posixjmp.h ansi_stdlib.h
268 util.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
269 util.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
270 vi_mode.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
271 vi_mode.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
272 vi_mode.o
: history.h ansi_stdlib.h rlstdc.h
273 xmalloc.o
: ${BUILD_DIR}/config.h ansi_stdlib.h
274 xfree.o
: ${BUILD_DIR}/config.h ansi_stdlib.h
276 colors.o
: ${BUILD_DIR}/config.h colors.h
277 colors.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
279 colors.o
: ansi_stdlib.h posixstat.h
280 parse-colors.o
: ${BUILD_DIR}/config.h colors.h parse-colors.h
281 parse-colors.o
: rldefs.h rlconf.h
282 parse-colors.o
: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
285 histfile.o
: rlshell.h
287 readline.o
: rlshell.h
289 terminal.o
: rlshell.h
290 histexpand.o
: rlshell.h
293 callback.o
: rlprivate.h
294 complete.o
: rlprivate.h
295 display.o
: rlprivate.h
297 isearch.o
: rlprivate.h
300 mbutil.o
: rlprivate.h
303 parens.o
: rlprivate.h
304 readline.o
: rlprivate.h
306 search.o
: rlprivate.h
307 signals.o
: rlprivate.h
308 terminal.o
: rlprivate.h
312 vi_mode.o
: rlprivate.h
313 colors.o
: rlprivate.h
314 parse-colors.o
: rlprivate.h
317 complete.o
: xmalloc.h
320 histexpand.o
: xmalloc.h
321 histfile.o
: xmalloc.h
330 readline.o
: xmalloc.h
331 savestring.o
: xmalloc.h
334 terminal.o
: xmalloc.h
343 parse-colors.o
: xmalloc.h
345 complete.o
: rlmbutil.h
346 display.o
: rlmbutil.h
347 histexpand.o
: rlmbutil.h
349 isearch.o
: rlmbutil.h
352 readline.o
: rlmbutil.h
355 vi_mode.o
: rlmbutil.h
357 parse-colors.o
: rlmbutil.h
359 # Rules for deficient makes, like SunOS and Solaris
361 callback.o
: callback.c
363 complete.o
: complete.c
368 keymaps.o
: keymaps.c emacs_keymap.c vi_keymap.c
375 readline.o
: readline.c
377 savestring.o
: savestring.c
381 terminal.o
: terminal.c
391 parse-colors.o
: parse-colors.c
393 histexpand.o
: histexpand.c
394 histfile.o
: histfile.c
396 histsearch.o
: histsearch.c