2 # Master Makefile for the GNU readline library.
3 # Copyright (C) 1994, 1998 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 RL_LIBRARY_VERSION
= @LIBVERSION@
19 RL_LIBRARY_NAME
= readline
23 top_srcdir
= @top_srcdir@
24 BUILD_DIR
= @BUILD_DIR@
27 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
28 INSTALL_DATA
= @INSTALL_DATA@
41 exec_prefix = @
exec_prefix@
46 includedir = @
includedir@
50 man3dir = $(mandir)/man3
52 # Programs to make tags files.
57 LOCAL_CFLAGS
= @LOCAL_CFLAGS@
-DRL_LIBRARY_VERSION
='"$(RL_LIBRARY_VERSION)"'
61 LOCAL_DEFS
= @LOCAL_DEFS@
63 # For libraries which include headers from other libraries.
64 INCLUDES
= -I.
-I
$(srcdir) -I
$(includedir)
66 CCFLAGS
= $(DEFS
) $(LOCAL_DEFS
) $(CPPFLAGS
) $(INCLUDES
) $(LOCAL_CFLAGS
) $(CFLAGS
)
70 $(CC
) -c
$(CCFLAGS
) $<
72 # The name of the main library target.
73 LIBRARY_NAME
= libreadline.a
74 STATIC_LIBS
= libreadline.a libhistory.a
76 # The C code source files for this library.
77 CSOURCES
= $(srcdir)/readline.c
$(srcdir)/funmap.c
$(srcdir)/keymaps.c \
78 $(srcdir)/vi_mode.c
$(srcdir)/parens.c
$(srcdir)/rltty.c \
79 $(srcdir)/complete.c
$(srcdir)/bind.c
$(srcdir)/isearch.c \
80 $(srcdir)/display.c
$(srcdir)/signals.c
$(srcdir)/emacs_keymap.c \
81 $(srcdir)/vi_keymap.c
$(srcdir)/util.c
$(srcdir)/kill.c \
82 $(srcdir)/undo.c
$(srcdir)/macro.c
$(srcdir)/input.c \
83 $(srcdir)/callback.c
$(srcdir)/terminal.c
$(srcdir)/xmalloc.c \
84 $(srcdir)/history.c
$(srcdir)/histsearch.c
$(srcdir)/histexpand.c \
85 $(srcdir)/histfile.c
$(srcdir)/nls.c
$(srcdir)/search.c \
86 $(srcdir)/shell.c
$(srcdir)/savestring.c
$(srcdir)/tilde.c
88 # The header files for this library.
89 HSOURCES
= readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
90 posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
91 ansi_stdlib.h tcap.h rlstdc.h
93 HISTOBJ
= history.o histexpand.o histfile.o histsearch.o
shell.o
95 OBJECTS
= readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
96 rltty.o complete.o bind.o isearch.o display.o signals.o \
97 util.o kill.o undo.o macro.o input.o callback.o terminal.o \
98 nls.o xmalloc.o
$(HISTOBJ
) $(TILDEOBJ
)
100 # The texinfo files which document this library.
101 DOCSOURCE
= doc
/rlman.texinfo doc
/rltech.texinfo doc
/rluser.texinfo
102 DOCOBJECT
= doc
/readline.
dvi
103 DOCSUPPORT
= doc
/Makefile
104 DOCUMENTATION
= $(DOCSOURCE
) $(DOCOBJECT
) $(DOCSUPPORT
)
106 CREATED_MAKEFILES
= Makefile doc
/Makefile examples
/Makefile shlib
/Makefile
107 CREATED_CONFIGURE
= config.status config.h config.cache config.log \
109 CREATED_TAGS
= TAGS
tags
111 INSTALLED_HEADERS
= readline.h chardefs.h keymaps.h history.h tilde.h \
114 ##########################################################################
118 static
: $(STATIC_LIBS
)
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
) $@
130 readline
: $(OBJECTS
) readline.h rldefs.h chardefs.h
131 $(CC
) $(CCFLAGS
) -o
$@ .
/examples
/rl.c .
/libreadline.a
-ltermcap
133 Makefile makefile
: config.status
$(srcdir)/Makefile.in
134 CONFIG_FILES
=Makefile CONFIG_HEADERS
= $(SHELL
) .
/config.status
136 Makefiles makefiles
: config.status
$(srcdir)/Makefile.in
137 @for mf in
$(CREATED_MAKEFILES
); do \
138 CONFIG_FILES
=$$mf CONFIG_HEADERS
= $(SHELL
) .
/config.status
; \
141 config.status
: configure
142 $(SHELL
) .
/config.status
--recheck
146 stamp-h
: config.status
$(srcdir)/config.h.in
147 CONFIG_FILES
= CONFIG_HEADERS
=config.h .
/config.status
150 # CYGNUS LOCAL: Never run autoconf.
151 #$(srcdir)/configure: $(srcdir)/configure.in Comment-me-out in distribution
152 # cd $(srcdir) && autoconf Comment-me-out in distribution
155 -test -d shlib || mkdir shlib
156 -( cd shlib
; ${MAKE} ${MFLAGS} all )
159 -test -d doc || mkdir doc
160 -( cd doc
&& $(MAKE
) $(MFLAGS
) )
163 -test -d examples || mkdir examples
164 -(cd examples
&& ${MAKE} ${MFLAGS} all )
169 ## Don't mess with people's installed readline's.
170 ## This tries to install this version of readline over whatever
171 ## version is already installed on the system (which could be a
172 ## newer version). There is no real reason for us to install
173 ## readline along with GDB. GDB links statically against readline,
174 ## so it doesn't depend on us installing it on the system.
178 #install: installdirs $(STATIC_LIBS)
179 # for f in ${INSTALLED_HEADERS}; do \
180 # $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
182 # -( if test -f $(libdir)/libreadline.a ; then $(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old; fi )
183 # $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
184 # -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
185 # -( if test -f $(libdir)/libhistory.a; then $(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old; fi )
186 # $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
187 # -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
188 # -( if test -d doc ; then \
190 # ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
193 installdirs: $(srcdir)/support
/mkdirs
194 -$(SHELL
) $(srcdir)/support
/mkdirs
$(includedir) \
195 $(includedir)/readline
$(libdir) $(infodir) $(man3dir)
198 -test -n
"$(includedir)" && cd
$(includedir)/readline
&& \
199 ${RM} ${INSTALLED_HEADERS}
200 -test -n
"$(libdir)" && cd
$(libdir) && \
201 ${RM} libreadline.a libreadline.old libhistory.a libhistory.old
$(SHARED_LIBS
)
203 install-shared
: installdirs shared
204 -( cd shlib
; ${MAKE} ${MFLAGS} install )
207 -( cd shlib
; ${MAKE} ${MFLAGS} uninstall )
210 $(ETAGS
) $(CSOURCES
) $(HSOURCES
)
213 $(CTAGS
) $(CSOURCES
) $(HSOURCES
)
216 $(RM
) $(OBJECTS
) $(STATIC_LIBS
)
217 -( cd shlib
&& $(MAKE
) $(MFLAGS
) $@
)
218 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
219 -( cd examples
&& $(MAKE
) $(MFLAGS
) $@
)
222 -( cd shlib
&& $(MAKE
) $(MFLAGS
) $@
)
223 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
224 -( cd examples
&& $(MAKE
) $(MFLAGS
) $@
)
226 distclean maintainer-clean
: clean
227 -( cd shlib
&& $(MAKE
) $(MFLAGS
) $@
)
228 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
229 -( cd examples
&& $(MAKE
) $(MFLAGS
) $@
)
231 $(RM
) $(CREATED_CONFIGURE
)
232 $(RM
) $(CREATED_TAGS
)
235 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
242 @echo Readline distributions are created using
$(srcdir)/support
/mkdist.
243 @echo Here is a sample of the necessary commands
:
244 @echo bash
$(srcdir)/support
/mkdist
-m
$(srcdir)/MANIFEST
-s
$(srcdir) -r
$(RL_LIBRARY_NAME
)-$(RL_LIBRARY_VERSION
)
245 @echo
tar cf
$(RL_LIBRARY_NAME
)-${RL_LIBRARY_VERSION}.
tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION
)
246 @echo gzip
$(RL_LIBRARY_NAME
)-$(RL_LIBRARY_VERSION
).
tar
248 # Tell versions [3.59,3.63) of GNU make not to export all variables.
249 # Otherwise a system limit (for SysV at least) may be exceeded.
253 bind.o
: ansi_stdlib.h posixstat.h
254 bind.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
255 bind.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
258 callback.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
259 callback.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
260 complete.o
: ansi_stdlib.h posixdir.h posixstat.h
261 complete.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
262 complete.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
263 display.o
: ansi_stdlib.h posixstat.h
264 display.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
266 display.o
: readline.h keymaps.h chardefs.h tilde.h
267 display.o
: history.h rlstdc.h
268 funmap.o
: readline.h keymaps.h chardefs.h tilde.h
269 funmap.o
: rlconf.h ansi_stdlib.h rlstdc.h
270 funmap.o
: ${BUILD_DIR}/config.h
271 histexpand.o
: ansi_stdlib.h
272 histexpand.o
: history.h histlib.h rlstdc.h
273 histexpand.o
: ${BUILD_DIR}/config.h
274 histfile.o
: ansi_stdlib.h
275 histfile.o
: history.h histlib.h rlstdc.h
276 histfile.o
: ${BUILD_DIR}/config.h
277 history.o
: ansi_stdlib.h
278 history.o
: history.h histlib.h rlstdc.h
279 history.o
: ${BUILD_DIR}/config.h
280 histsearch.o
: ansi_stdlib.h
281 histsearch.o
: history.h histlib.h rlstdc.h
282 histsearch.o
: ${BUILD_DIR}/config.h
283 input.o
: ansi_stdlib.h
284 input.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
285 input.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
286 isearch.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
287 isearch.o
: readline.h keymaps.h chardefs.h tilde.h
288 isearch.o
: ansi_stdlib.h history.h rlstdc.h
289 keymaps.o
: emacs_keymap.c vi_keymap.c
290 keymaps.o
: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
291 keymaps.o
: readline.h keymaps.h chardefs.h tilde.h
292 keymaps.o
: ${BUILD_DIR}/config.h rlstdc.h
293 kill.o
: ansi_stdlib.h
294 kill.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
295 kill.o
: readline.h keymaps.h chardefs.h tilde.h
296 kill.o
: history.h rlstdc.h
297 macro.o
: ansi_stdlib.h
298 macro.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
299 macro.o
: readline.h keymaps.h chardefs.h tilde.h
300 macro.o
: history.h rlstdc.h
302 nls.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
304 parens.o
: ${BUILD_DIR}/config.h
305 parens.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
306 readline.o
: readline.h keymaps.h chardefs.h tilde.h
307 readline.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
308 readline.o
: history.h rlstdc.h
309 readline.o
: posixstat.h ansi_stdlib.h posixjmp.h
310 rltty.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
312 rltty.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
313 search.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
314 search.o
: readline.h keymaps.h chardefs.h tilde.h
315 search.o
: ansi_stdlib.h history.h rlstdc.h
316 shell.o
: ${BUILD_DIR}/config.h
317 shell.o
: ansi_stdlib.h
318 signals.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
319 signals.o
: readline.h keymaps.h chardefs.h tilde.h
320 signals.o
: history.h rlstdc.h
321 terminal.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
323 terminal.o
: readline.h keymaps.h chardefs.h tilde.h
324 terminal.o
: history.h rlstdc.h
325 tilde.o
: ansi_stdlib.h
326 tilde.o
: ${BUILD_DIR}/config.h
328 undo.o
: ansi_stdlib.h
329 undo.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
330 undo.o
: readline.h keymaps.h chardefs.h tilde.h
331 undo.o
: history.h rlstdc.h
332 util.o
: posixjmp.h ansi_stdlib.h
333 util.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
334 util.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
335 vi_mode.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
336 vi_mode.o
: readline.h keymaps.h chardefs.h tilde.h
337 vi_mode.o
: history.h ansi_stdlib.h rlstdc.h
338 xmalloc.o
: ${BUILD_DIR}/config.h
339 xmalloc.o
: ansi_stdlib.h
341 readline.o
: $(srcdir)/readline.c
342 vi_mode.o
: $(srcdir)/vi_mode.c
343 funmap.o
: $(srcdir)/funmap.c
344 keymaps.o
: $(srcdir)/keymaps.c
345 parens.o
: $(srcdir)/parens.c
346 search.o
: $(srcdir)/search.c
347 rltty.o
: $(srcdir)/rltty.c
348 complete.o
: $(srcdir)/complete.c
349 bind.o
: $(srcdir)/bind.c
350 isearch.o
: $(srcdir)/isearch.c
351 display.o
: $(srcdir)/display.c
352 signals.o
: $(srcdir)/signals.c
353 util.o
: $(srcdir)/util.c
354 kill.o
: $(srcdir)/kill.c
355 undo.o
: $(srcdir)/undo.c
356 macro.o
: $(srcdir)/macro.c
357 input.o
: $(srcdir)/input.c
358 callback.o
: $(srcdir)/callback.c
359 terminal.o
: $(srcdir)/terminal.c
360 nls.o
: $(srcdir)/nls.c
361 xmalloc.o
: $(srcdir)/xmalloc.c
362 history.o
: $(srcdir)/history.c
363 histexpand.o
: $(srcdir)/histexpand.c
364 histfile.o
: $(srcdir)/histfile.c
365 histsearch.o
: $(srcdir)/histsearch.c
366 savestring.o
: $(srcdir)/savestring.c
367 shell.o
: $(srcdir)/shell.c
368 tilde.o
: $(srcdir)/tilde.c
370 readline.o
: readline.c
377 complete.o
: complete.c
387 callback.o
: callback.c
388 terminal.o
: terminal.c
392 histexpand.o
: histexpand.c
393 histfile.o
: histfile.c
394 histsearch.o
: histsearch.c
395 savestring.o
: savestring.c