Import of readline 4.1
[deliverable/binutils-gdb.git] / readline / Makefile.in
CommitLineData
d60d9f65
SS
1## -*- text -*- ##
2# Master Makefile for the GNU readline library.
a44161c3 3# Copyright (C) 1994 Free Software Foundation, Inc.
d60d9f65
SS
4
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)
8# any later version.
9
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.
14
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
f9267e15 17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
d60d9f65
SS
18RL_LIBRARY_VERSION = @LIBVERSION@
19RL_LIBRARY_NAME = readline
20
21srcdir = @srcdir@
a44161c3 22VPATH = .:@srcdir@
d60d9f65
SS
23top_srcdir = @top_srcdir@
24BUILD_DIR = @BUILD_DIR@
25
26INSTALL = @INSTALL@
27INSTALL_PROGRAM = @INSTALL_PROGRAM@
28INSTALL_DATA = @INSTALL_DATA@
29
30CC = @CC@
d60d9f65 31RANLIB = @RANLIB@
c862e87b
JM
32AR = @AR@
33ARFLAGS = @ARFLAGS@
d60d9f65
SS
34RM = rm -f
35CP = cp
36MV = mv
37
c862e87b
JM
38SHELL = @MAKE_SHELL@
39
d60d9f65
SS
40prefix = @prefix@
41exec_prefix = @exec_prefix@
42
43bindir = @bindir@
44libdir = @libdir@
45mandir = @mandir@
46includedir = @includedir@
47
48infodir = @infodir@
49
50man3dir = $(mandir)/man3
51
d60d9f65
SS
52# Programs to make tags files.
53ETAGS = etags -tw
54CTAGS = ctags -tw
55
56CFLAGS = @CFLAGS@
57LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
58CPPFLAGS = @CPPFLAGS@
d60d9f65
SS
59
60DEFS = @DEFS@
61LOCAL_DEFS = @LOCAL_DEFS@
62
f9267e15
EZ
63TERMCAP_LIB = @TERMCAP_LIB@
64
d60d9f65
SS
65# For libraries which include headers from other libraries.
66INCLUDES = -I. -I$(srcdir) -I$(includedir)
67
68CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
69
d60d9f65 70.c.o:
c862e87b 71 ${RM} $@
d60d9f65
SS
72 $(CC) -c $(CCFLAGS) $<
73
d60d9f65
SS
74# The name of the main library target.
75LIBRARY_NAME = libreadline.a
76STATIC_LIBS = libreadline.a libhistory.a
77
d60d9f65
SS
78# The C code source files for this library.
79CSOURCES = $(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 \
c862e87b 88 $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c
d60d9f65
SS
89
90# The header files for this library.
91HSOURCES = 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 \
f9267e15 93 ansi_stdlib.h tcap.h rlstdc.h xmalloc.h rlprivate.h rlshell.h
d60d9f65 94
c862e87b 95HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o
d60d9f65
SS
96TILDEOBJ = tilde.o
97OBJECTS = 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)
101
d60d9f65
SS
102# The texinfo files which document this library.
103DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
104DOCOBJECT = doc/readline.dvi
105DOCSUPPORT = doc/Makefile
106DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
107
c862e87b 108CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
d60d9f65
SS
109CREATED_CONFIGURE = config.status config.h config.cache config.log \
110 stamp-config stamp-h
111CREATED_TAGS = TAGS tags
112
c862e87b
JM
113INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
114 rlstdc.h rlconf.h
d60d9f65
SS
115
116##########################################################################
117
118all: static
119
f9267e15
EZ
120everything: static shared examples
121
d60d9f65 122static: $(STATIC_LIBS)
d60d9f65
SS
123
124libreadline.a: $(OBJECTS)
125 $(RM) $@
c862e87b 126 $(AR) $(ARFLAGS) $@ $(OBJECTS)
d60d9f65
SS
127 -test -n "$(RANLIB)" && $(RANLIB) $@
128
129libhistory.a: $(HISTOBJ) xmalloc.o
130 $(RM) $@
c862e87b 131 $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
d60d9f65
SS
132 -test -n "$(RANLIB)" && $(RANLIB) $@
133
f9267e15
EZ
134readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
135 $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB}
d60d9f65
SS
136
137Makefile makefile: config.status $(srcdir)/Makefile.in
138 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
139
140Makefiles makefiles: config.status $(srcdir)/Makefile.in
141 @for mf in $(CREATED_MAKEFILES); do \
142 CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
143 done
144
145config.status: configure
146 $(SHELL) ./config.status --recheck
147
148config.h: stamp-h
149
150stamp-h: config.status $(srcdir)/config.h.in
151 CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
152 echo > $@
153
f9267e15
EZ
154#$(srcdir)/configure: $(srcdir)/configure.in ## Comment-me-out in distribution
155# cd $(srcdir) && autoconf ## Comment-me-out in distribution
a44161c3 156
d60d9f65 157
c862e87b
JM
158shared: force
159 -test -d shlib || mkdir shlib
160 -( cd shlib ; ${MAKE} ${MFLAGS} all )
161
d60d9f65
SS
162documentation: force
163 -test -d doc || mkdir doc
164 -( cd doc && $(MAKE) $(MFLAGS) )
165
166examples: force
167 -test -d examples || mkdir examples
168 -(cd examples && ${MAKE} ${MFLAGS} all )
169
170force:
171
f9267e15 172install-headers: installdirs ${INSTALLED_HEADERS}
a44161c3
EZ
173 for f in ${INSTALLED_HEADERS}; do \
174 $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
175 done
f9267e15
EZ
176
177uninstall-headers:
178 -test -n "$(includedir)" && cd $(includedir)/readline && \
179 ${RM} ${INSTALLED_HEADERS}
180
181maybe-uninstall-headers: uninstall-headers
182
183install: installdirs $(STATIC_LIBS) install-headers
a44161c3
EZ
184 -$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old
185 $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
186 -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
187 -$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old
188 $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
189 -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
190 -( if test -d doc ; then \
191 cd doc && \
192 ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
193 fi )
d60d9f65
SS
194
195installdirs: $(srcdir)/support/mkdirs
196 -$(SHELL) $(srcdir)/support/mkdirs $(includedir) \
197 $(includedir)/readline $(libdir) $(infodir) $(man3dir)
198
f9267e15 199uninstall: uninstall-headers
d60d9f65
SS
200 -test -n "$(libdir)" && cd $(libdir) && \
201 ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
202
f9267e15 203install-shared: installdirs install-headers shared
c862e87b 204 -( cd shlib ; ${MAKE} ${MFLAGS} install )
d60d9f65 205
f9267e15 206uninstall-shared: maybe-uninstall-headers
c862e87b 207 -( cd shlib; ${MAKE} ${MFLAGS} uninstall )
d60d9f65
SS
208
209TAGS: force
210 $(ETAGS) $(CSOURCES) $(HSOURCES)
211
212tags: force
213 $(CTAGS) $(CSOURCES) $(HSOURCES)
214
215clean: force
216 $(RM) $(OBJECTS) $(STATIC_LIBS)
f9267e15 217 $(RM) readline readline.exe
c862e87b 218 -( cd shlib && $(MAKE) $(MFLAGS) $@ )
d60d9f65
SS
219 -( cd doc && $(MAKE) $(MFLAGS) $@ )
220 -( cd examples && $(MAKE) $(MFLAGS) $@ )
221
222mostlyclean: clean
c862e87b 223 -( cd shlib && $(MAKE) $(MFLAGS) $@ )
d60d9f65
SS
224 -( cd doc && $(MAKE) $(MFLAGS) $@ )
225 -( cd examples && $(MAKE) $(MFLAGS) $@ )
226
227distclean maintainer-clean: clean
c862e87b 228 -( cd shlib && $(MAKE) $(MFLAGS) $@ )
d60d9f65
SS
229 -( cd doc && $(MAKE) $(MFLAGS) $@ )
230 -( cd examples && $(MAKE) $(MFLAGS) $@ )
231 $(RM) Makefile
232 $(RM) $(CREATED_CONFIGURE)
233 $(RM) $(CREATED_TAGS)
234
235info dvi:
236 -( cd doc && $(MAKE) $(MFLAGS) $@ )
237
238install-info:
239check:
240installcheck:
241
242dist: force
243 @echo Readline distributions are created using $(srcdir)/support/mkdist.
244 @echo Here is a sample of the necessary commands:
f9267e15 245 @echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME) $(RL_LIBRARY_VERSION)
d60d9f65
SS
246 @echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION)
247 @echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar
248
249# Tell versions [3.59,3.63) of GNU make not to export all variables.
250# Otherwise a system limit (for SysV at least) may be exceeded.
251.NOEXPORT:
252
253# Dependencies
254bind.o: ansi_stdlib.h posixstat.h
255bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
c862e87b 256bind.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
d60d9f65
SS
257bind.o: history.h
258callback.o: rlconf.h
259callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
c862e87b 260callback.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
d60d9f65
SS
261complete.o: ansi_stdlib.h posixdir.h posixstat.h
262complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
c862e87b 263complete.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
d60d9f65
SS
264display.o: ansi_stdlib.h posixstat.h
265display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
266display.o: tcap.h
267display.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 268display.o: history.h rlstdc.h
d60d9f65 269funmap.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 270funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
d60d9f65
SS
271funmap.o: ${BUILD_DIR}/config.h
272histexpand.o: ansi_stdlib.h
c862e87b 273histexpand.o: history.h histlib.h rlstdc.h
d60d9f65
SS
274histexpand.o: ${BUILD_DIR}/config.h
275histfile.o: ansi_stdlib.h
c862e87b 276histfile.o: history.h histlib.h rlstdc.h
d60d9f65
SS
277histfile.o: ${BUILD_DIR}/config.h
278history.o: ansi_stdlib.h
c862e87b 279history.o: history.h histlib.h rlstdc.h
d60d9f65
SS
280history.o: ${BUILD_DIR}/config.h
281histsearch.o: ansi_stdlib.h
c862e87b 282histsearch.o: history.h histlib.h rlstdc.h
d60d9f65
SS
283histsearch.o: ${BUILD_DIR}/config.h
284input.o: ansi_stdlib.h
285input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
c862e87b 286input.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
d60d9f65
SS
287isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
288isearch.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 289isearch.o: ansi_stdlib.h history.h rlstdc.h
d60d9f65
SS
290keymaps.o: emacs_keymap.c vi_keymap.c
291keymaps.o: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
292keymaps.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 293keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
d60d9f65
SS
294kill.o: ansi_stdlib.h
295kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
296kill.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 297kill.o: history.h rlstdc.h
d60d9f65
SS
298macro.o: ansi_stdlib.h
299macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
300macro.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 301macro.o: history.h rlstdc.h
d60d9f65
SS
302nls.o: ansi_stdlib.h
303nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
f9267e15
EZ
304nls.o: readline.h keymaps.h chardefs.h tilde.h
305nls.o: history.h rlstdc.h
d60d9f65
SS
306parens.o: rlconf.h
307parens.o: ${BUILD_DIR}/config.h
c862e87b 308parens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
d60d9f65
SS
309readline.o: readline.h keymaps.h chardefs.h tilde.h
310readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
c862e87b 311readline.o: history.h rlstdc.h
d60d9f65
SS
312readline.o: posixstat.h ansi_stdlib.h posixjmp.h
313rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
314rltty.o: rltty.h
c862e87b 315rltty.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
d60d9f65
SS
316search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
317search.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 318search.o: ansi_stdlib.h history.h rlstdc.h
d60d9f65
SS
319shell.o: ${BUILD_DIR}/config.h
320shell.o: ansi_stdlib.h
321signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
322signals.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 323signals.o: history.h rlstdc.h
d60d9f65
SS
324terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
325terminal.o: tcap.h
326terminal.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 327terminal.o: history.h rlstdc.h
d60d9f65
SS
328tilde.o: ansi_stdlib.h
329tilde.o: ${BUILD_DIR}/config.h
330tilde.o: tilde.h
331undo.o: ansi_stdlib.h
332undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
333undo.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 334undo.o: history.h rlstdc.h
d60d9f65
SS
335util.o: posixjmp.h ansi_stdlib.h
336util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
c862e87b 337util.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
d60d9f65
SS
338vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
339vi_mode.o: readline.h keymaps.h chardefs.h tilde.h
c862e87b 340vi_mode.o: history.h ansi_stdlib.h rlstdc.h
d60d9f65
SS
341xmalloc.o: ${BUILD_DIR}/config.h
342xmalloc.o: ansi_stdlib.h
343
f9267e15
EZ
344bind.o: rlshell.h
345histfile.o: rlshell.h
346nls.o: rlshell.h
347readline.o: rlshell.h
348shell.o: rlshell.h
349terminal.o: rlshell.h
350histexpand.o: rlshell.h
351
352bind.o: rlprivate.h
353callback.o: rlprivate.h
354complete.o: rlprivate.h
355display.o: rlprivate.h
356input.o: rlprivate.h
357isearch.o: rlprivate.h
358kill.o: rlprivate.h
359macro.o: rlprivate.h
360nls.o: rlprivate.h
361parens.o: rlprivate.h
362readline.o: rlprivate.h
363rltty.o: rlprivate.h
364search.o: rlprivate.h
365signals.o: rlprivate.h
366terminal.o: rlprivate.h
367undo.o: rlprivate.h
368util.o: rlprivate.h
369vi_mode.o: rlprivate.h
370
371bind.o: xmalloc.h
372complete.o: xmalloc.h
373display.o: xmalloc.h
374funmap.o: xmalloc.h
375histexpand.o: xmalloc.h
376histfile.o: xmalloc.h
377history.o: xmalloc.h
378input.o: xmalloc.h
379isearch.o: xmalloc.h
380keymaps.o: xmalloc.h
381kill.o: xmalloc.h
382macro.o: xmalloc.h
383readline.o: xmalloc.h
384savestring.o: xmalloc.h
385search.o: xmalloc.h
386shell.o: xmalloc.h
387tilde.o: xmalloc.h
388tilde.o: xmalloc.h
389util.o: xmalloc.h
390vi_mode.o: xmalloc.h
391
d60d9f65
SS
392readline.o: $(srcdir)/readline.c
393vi_mode.o: $(srcdir)/vi_mode.c
394funmap.o: $(srcdir)/funmap.c
395keymaps.o: $(srcdir)/keymaps.c
396parens.o: $(srcdir)/parens.c
397search.o: $(srcdir)/search.c
398rltty.o: $(srcdir)/rltty.c
399complete.o: $(srcdir)/complete.c
400bind.o: $(srcdir)/bind.c
401isearch.o: $(srcdir)/isearch.c
402display.o: $(srcdir)/display.c
403signals.o: $(srcdir)/signals.c
404util.o: $(srcdir)/util.c
405kill.o: $(srcdir)/kill.c
406undo.o: $(srcdir)/undo.c
407macro.o: $(srcdir)/macro.c
408input.o: $(srcdir)/input.c
409callback.o: $(srcdir)/callback.c
410terminal.o: $(srcdir)/terminal.c
411nls.o: $(srcdir)/nls.c
412xmalloc.o: $(srcdir)/xmalloc.c
413history.o: $(srcdir)/history.c
414histexpand.o: $(srcdir)/histexpand.c
415histfile.o: $(srcdir)/histfile.c
416histsearch.o: $(srcdir)/histsearch.c
c862e87b 417savestring.o: $(srcdir)/savestring.c
d60d9f65
SS
418shell.o: $(srcdir)/shell.c
419tilde.o: $(srcdir)/tilde.c
420
d60d9f65
SS
421readline.o: readline.c
422vi_mode.o: vi_mode.c
423funmap.o: funmap.c
424keymaps.o: keymaps.c
425parens.o: parens.c
426search.o: search.c
427rltty.o: rltty.c
428complete.o: complete.c
429bind.o: bind.c
430isearch.o: isearch.c
431display.o: display.c
432signals.o: signals.c
433util.o: util.c
434kill.o: kill.c
435undo.o: undo.c
436macro.o: macro.c
437input.o: input.c
438callback.o: callback.c
439terminal.o: terminal.c
440nls.o: nls.c
441xmalloc.o: xmalloc.c
442history.o: history.c
443histexpand.o: histexpand.c
444histfile.o: histfile.c
445histsearch.o: histsearch.c
c862e87b 446savestring.o: savestring.c
d60d9f65
SS
447shell.o: shell.c
448tilde.o: tilde.c
This page took 0.046195 seconds and 4 git commands to generate.