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., 59 Temple Place, Suite 330, Boston, MA 02111 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 TERMCAP_LIB
= @TERMCAP_LIB@
65 # For libraries which include headers from other libraries.
66 INCLUDES
= -I.
-I
$(srcdir) -I
$(includedir)
68 CCFLAGS
= $(DEFS
) $(LOCAL_DEFS
) $(CPPFLAGS
) $(INCLUDES
) $(LOCAL_CFLAGS
) $(CFLAGS
)
72 $(CC
) -c
$(CCFLAGS
) $<
74 # The name of the main library target.
75 LIBRARY_NAME
= libreadline.a
76 STATIC_LIBS
= libreadline.a libhistory.a
78 # The C code source files for this library.
79 CSOURCES
= $(srcdir)/readline.c
$(srcdir)/funmap.c
$(srcdir)/keymaps.c \
80 $(srcdir)/vi_mode.c
$(srcdir)/parens.c
$(srcdir)/rltty.c \
81 $(srcdir)/complete.c
$(srcdir)/bind.c
$(srcdir)/isearch.c \
82 $(srcdir)/display.c
$(srcdir)/signals.c
$(srcdir)/emacs_keymap.c \
83 $(srcdir)/vi_keymap.c
$(srcdir)/util.c
$(srcdir)/kill.c \
84 $(srcdir)/undo.c
$(srcdir)/macro.c
$(srcdir)/input.c \
85 $(srcdir)/callback.c
$(srcdir)/terminal.c
$(srcdir)/xmalloc.c \
86 $(srcdir)/history.c
$(srcdir)/histsearch.c
$(srcdir)/histexpand.c \
87 $(srcdir)/histfile.c
$(srcdir)/nls.c
$(srcdir)/search.c \
88 $(srcdir)/shell.c
$(srcdir)/savestring.c
$(srcdir)/tilde.c
90 # The header files for this library.
91 HSOURCES
= readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
92 posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
93 ansi_stdlib.h tcap.h rlstdc.h xmalloc.h rlprivate.h rlshell.h
95 HISTOBJ
= history.o histexpand.o histfile.o histsearch.o
shell.o
97 OBJECTS
= readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
98 rltty.o complete.o bind.o isearch.o display.o signals.o \
99 util.o kill.o undo.o macro.o input.o callback.o terminal.o \
100 nls.o xmalloc.o
$(HISTOBJ
) $(TILDEOBJ
)
102 # The texinfo files which document this library.
103 DOCSOURCE
= doc
/rlman.texinfo doc
/rltech.texinfo doc
/rluser.texinfo
104 DOCOBJECT
= doc
/readline.
dvi
105 DOCSUPPORT
= doc
/Makefile
106 DOCUMENTATION
= $(DOCSOURCE
) $(DOCOBJECT
) $(DOCSUPPORT
)
108 CREATED_MAKEFILES
= Makefile doc
/Makefile examples
/Makefile shlib
/Makefile
109 CREATED_CONFIGURE
= config.status config.h config.cache config.log \
111 CREATED_TAGS
= TAGS
tags
113 INSTALLED_HEADERS
= readline.h chardefs.h keymaps.h history.h tilde.h \
116 ##########################################################################
120 everything
: static shared examples
122 static
: $(STATIC_LIBS
)
124 libreadline.a
: $(OBJECTS
)
126 $(AR
) $(ARFLAGS
) $@
$(OBJECTS
)
127 -test -n
"$(RANLIB)" && $(RANLIB
) $@
129 libhistory.a
: $(HISTOBJ
) xmalloc.o
131 $(AR
) $(ARFLAGS
) $@
$(HISTOBJ
) xmalloc.o
132 -test -n
"$(RANLIB)" && $(RANLIB
) $@
134 readline
: $(OBJECTS
) readline.h rldefs.h chardefs.h .
/libreadline.a
135 $(CC
) $(CCFLAGS
) -o
$@ .
/examples
/rl.c .
/libreadline.a
${TERMCAP_LIB}
137 Makefile makefile
: config.status
$(srcdir)/Makefile.in
138 CONFIG_FILES
=Makefile CONFIG_HEADERS
= $(SHELL
) .
/config.status
140 Makefiles makefiles
: config.status
$(srcdir)/Makefile.in
141 @for mf in
$(CREATED_MAKEFILES
); do \
142 CONFIG_FILES
=$$mf CONFIG_HEADERS
= $(SHELL
) .
/config.status
; \
145 config.status
: configure
146 $(SHELL
) .
/config.status
--recheck
150 stamp-h
: config.status
$(srcdir)/config.h.in
151 CONFIG_FILES
= CONFIG_HEADERS
=config.h .
/config.status
154 #$(srcdir)/configure: $(srcdir)/configure.in ## Comment-me-out in distribution
155 # cd $(srcdir) && autoconf ## Comment-me-out in distribution
158 -test -d shlib || mkdir shlib
159 -( cd shlib
; ${MAKE} ${MFLAGS} all )
162 -test -d doc || mkdir doc
163 -( cd doc
&& $(MAKE
) $(MFLAGS
) )
166 -test -d examples || mkdir examples
167 -(cd examples
&& ${MAKE} ${MFLAGS} all )
171 install-headers
: installdirs ${INSTALLED_HEADERS}
172 for f in
${INSTALLED_HEADERS}; do \
173 $(INSTALL_DATA
) $(srcdir)/$$f $(includedir)/readline
; \
177 -test -n
"$(includedir)" && cd
$(includedir)/readline
&& \
178 ${RM} ${INSTALLED_HEADERS}
180 maybe-uninstall-headers
: uninstall-headers
183 ## Don't mess with people's installed readline's.
184 ## This tries to install this version of readline over whatever
185 ## version is already installed on the system (which could be a
186 ## newer version). There is no real reason for us to install
187 ## readline along with GDB. GDB links statically against readline,
188 ## so it doesn't depend on us installing it on the system.
192 #install: installdirs $(STATIC_LIBS) install-headers
193 # -$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old
194 # $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
195 # -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
196 # -$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old
197 # $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
198 # -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
199 # -( if test -d doc ; then \
201 # ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
204 installdirs: $(srcdir)/support
/mkdirs
205 -$(SHELL
) $(srcdir)/support
/mkdirs
$(includedir) \
206 $(includedir)/readline
$(libdir) $(infodir) $(man3dir)
208 uninstall: uninstall-headers
209 -test -n
"$(libdir)" && cd
$(libdir) && \
210 ${RM} libreadline.a libreadline.old libhistory.a libhistory.old
$(SHARED_LIBS
)
212 install-shared
: installdirs install-headers shared
213 -( cd shlib
; ${MAKE} ${MFLAGS} install )
215 uninstall-shared
: maybe-uninstall-headers
216 -( cd shlib
; ${MAKE} ${MFLAGS} uninstall )
219 $(ETAGS
) $(CSOURCES
) $(HSOURCES
)
222 $(CTAGS
) $(CSOURCES
) $(HSOURCES
)
225 $(RM
) $(OBJECTS
) $(STATIC_LIBS
)
226 $(RM
) readline readline.exe
227 -( cd shlib
&& $(MAKE
) $(MFLAGS
) $@
)
228 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
229 -( cd examples
&& $(MAKE
) $(MFLAGS
) $@
)
232 -( cd shlib
&& $(MAKE
) $(MFLAGS
) $@
)
233 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
234 -( cd examples
&& $(MAKE
) $(MFLAGS
) $@
)
236 distclean maintainer-clean
: clean
237 -( cd shlib
&& $(MAKE
) $(MFLAGS
) $@
)
238 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
239 -( cd examples
&& $(MAKE
) $(MFLAGS
) $@
)
241 $(RM
) $(CREATED_CONFIGURE
)
242 $(RM
) $(CREATED_TAGS
)
245 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
252 @echo Readline distributions are created using
$(srcdir)/support
/mkdist.
253 @echo Here is a sample of the necessary commands
:
254 @echo bash
$(srcdir)/support
/mkdist
-m
$(srcdir)/MANIFEST
-s
$(srcdir) -r
$(RL_LIBRARY_NAME
) $(RL_LIBRARY_VERSION
)
255 @echo
tar cf
$(RL_LIBRARY_NAME
)-${RL_LIBRARY_VERSION}.
tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION
)
256 @echo gzip
$(RL_LIBRARY_NAME
)-$(RL_LIBRARY_VERSION
).
tar
258 # Tell versions [3.59,3.63) of GNU make not to export all variables.
259 # Otherwise a system limit (for SysV at least) may be exceeded.
263 bind.o
: ansi_stdlib.h posixstat.h
264 bind.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
265 bind.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
268 callback.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
269 callback.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
270 complete.o
: ansi_stdlib.h posixdir.h posixstat.h
271 complete.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
272 complete.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
273 display.o
: ansi_stdlib.h posixstat.h
274 display.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
276 display.o
: readline.h keymaps.h chardefs.h tilde.h
277 display.o
: history.h rlstdc.h
278 funmap.o
: readline.h keymaps.h chardefs.h tilde.h
279 funmap.o
: rlconf.h ansi_stdlib.h rlstdc.h
280 funmap.o
: ${BUILD_DIR}/config.h
281 histexpand.o
: ansi_stdlib.h
282 histexpand.o
: history.h histlib.h rlstdc.h
283 histexpand.o
: ${BUILD_DIR}/config.h
284 histfile.o
: ansi_stdlib.h
285 histfile.o
: history.h histlib.h rlstdc.h
286 histfile.o
: ${BUILD_DIR}/config.h
287 history.o
: ansi_stdlib.h
288 history.o
: history.h histlib.h rlstdc.h
289 history.o
: ${BUILD_DIR}/config.h
290 histsearch.o
: ansi_stdlib.h
291 histsearch.o
: history.h histlib.h rlstdc.h
292 histsearch.o
: ${BUILD_DIR}/config.h
293 input.o
: ansi_stdlib.h
294 input.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
295 input.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
296 isearch.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
297 isearch.o
: readline.h keymaps.h chardefs.h tilde.h
298 isearch.o
: ansi_stdlib.h history.h rlstdc.h
299 keymaps.o
: emacs_keymap.c vi_keymap.c
300 keymaps.o
: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
301 keymaps.o
: readline.h keymaps.h chardefs.h tilde.h
302 keymaps.o
: ${BUILD_DIR}/config.h rlstdc.h
303 kill.o
: ansi_stdlib.h
304 kill.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
305 kill.o
: readline.h keymaps.h chardefs.h tilde.h
306 kill.o
: history.h rlstdc.h
307 macro.o
: ansi_stdlib.h
308 macro.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
309 macro.o
: readline.h keymaps.h chardefs.h tilde.h
310 macro.o
: history.h rlstdc.h
312 nls.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
313 nls.o
: readline.h keymaps.h chardefs.h tilde.h
314 nls.o
: history.h rlstdc.h
316 parens.o
: ${BUILD_DIR}/config.h
317 parens.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
318 readline.o
: readline.h keymaps.h chardefs.h tilde.h
319 readline.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
320 readline.o
: history.h rlstdc.h
321 readline.o
: posixstat.h ansi_stdlib.h posixjmp.h
322 rltty.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
324 rltty.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
325 search.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
326 search.o
: readline.h keymaps.h chardefs.h tilde.h
327 search.o
: ansi_stdlib.h history.h rlstdc.h
328 shell.o
: ${BUILD_DIR}/config.h
329 shell.o
: ansi_stdlib.h
330 signals.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
331 signals.o
: readline.h keymaps.h chardefs.h tilde.h
332 signals.o
: history.h rlstdc.h
333 terminal.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
335 terminal.o
: readline.h keymaps.h chardefs.h tilde.h
336 terminal.o
: history.h rlstdc.h
337 tilde.o
: ansi_stdlib.h
338 tilde.o
: ${BUILD_DIR}/config.h
340 undo.o
: ansi_stdlib.h
341 undo.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
342 undo.o
: readline.h keymaps.h chardefs.h tilde.h
343 undo.o
: history.h rlstdc.h
344 util.o
: posixjmp.h ansi_stdlib.h
345 util.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
346 util.o
: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
347 vi_mode.o
: rldefs.h
${BUILD_DIR}/config.h rlconf.h
348 vi_mode.o
: readline.h keymaps.h chardefs.h tilde.h
349 vi_mode.o
: history.h ansi_stdlib.h rlstdc.h
350 xmalloc.o
: ${BUILD_DIR}/config.h
351 xmalloc.o
: ansi_stdlib.h
354 histfile.o
: rlshell.h
356 readline.o
: rlshell.h
358 terminal.o
: rlshell.h
359 histexpand.o
: rlshell.h
362 callback.o
: rlprivate.h
363 complete.o
: rlprivate.h
364 display.o
: rlprivate.h
366 isearch.o
: rlprivate.h
370 parens.o
: rlprivate.h
371 readline.o
: rlprivate.h
373 search.o
: rlprivate.h
374 signals.o
: rlprivate.h
375 terminal.o
: rlprivate.h
378 vi_mode.o
: rlprivate.h
381 complete.o
: xmalloc.h
384 histexpand.o
: xmalloc.h
385 histfile.o
: xmalloc.h
392 readline.o
: xmalloc.h
393 savestring.o
: xmalloc.h
401 readline.o
: $(srcdir)/readline.c
402 vi_mode.o
: $(srcdir)/vi_mode.c
403 funmap.o
: $(srcdir)/funmap.c
404 keymaps.o
: $(srcdir)/keymaps.c
405 parens.o
: $(srcdir)/parens.c
406 search.o
: $(srcdir)/search.c
407 rltty.o
: $(srcdir)/rltty.c
408 complete.o
: $(srcdir)/complete.c
409 bind.o
: $(srcdir)/bind.c
410 isearch.o
: $(srcdir)/isearch.c
411 display.o
: $(srcdir)/display.c
412 signals.o
: $(srcdir)/signals.c
413 util.o
: $(srcdir)/util.c
414 kill.o
: $(srcdir)/kill.c
415 undo.o
: $(srcdir)/undo.c
416 macro.o
: $(srcdir)/macro.c
417 input.o
: $(srcdir)/input.c
418 callback.o
: $(srcdir)/callback.c
419 terminal.o
: $(srcdir)/terminal.c
420 nls.o
: $(srcdir)/nls.c
421 xmalloc.o
: $(srcdir)/xmalloc.c
422 history.o
: $(srcdir)/history.c
423 histexpand.o
: $(srcdir)/histexpand.c
424 histfile.o
: $(srcdir)/histfile.c
425 histsearch.o
: $(srcdir)/histsearch.c
426 savestring.o
: $(srcdir)/savestring.c
427 shell.o
: $(srcdir)/shell.c
428 tilde.o
: $(srcdir)/tilde.c
430 readline.o
: readline.c
437 complete.o
: complete.c
447 callback.o
: callback.c
448 terminal.o
: terminal.c
452 histexpand.o
: histexpand.c
453 histfile.o
: histfile.c
454 histsearch.o
: histsearch.c
455 savestring.o
: savestring.c