("" < 3.4) always evaluates to true, which unconditionally
[dragonfly.git] / contrib / libreadline / Makefile.in
blob023496d57bbd62b21fbc9a320bdf41f61ac70367
1 ## -*- text -*- ##
2 # Master Makefile for the GNU readline library.
3 # Copyright (C) 1994 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)
8 # any later version.
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
21 srcdir = @srcdir@
22 VPATH = .:@srcdir@
23 top_srcdir = @top_srcdir@
24 BUILD_DIR = @BUILD_DIR@
26 INSTALL = @INSTALL@
27 INSTALL_PROGRAM = @INSTALL_PROGRAM@
28 INSTALL_DATA = @INSTALL_DATA@
30 CC = @CC@
31 RANLIB = @RANLIB@
32 AR = @AR@
33 ARFLAGS = @ARFLAGS@
34 RM = rm -f
35 CP = cp
36 MV = mv
38 SHELL = @MAKE_SHELL@
40 prefix = @prefix@
41 exec_prefix = @exec_prefix@
43 bindir = @bindir@
44 libdir = @libdir@
45 mandir = @mandir@
46 includedir = @includedir@
48 infodir = @infodir@
50 man3dir = $(mandir)/man3
52 # Programs to make tags files.
53 ETAGS = etags -tw
54 CTAGS = ctags -tw
56 CFLAGS = @CFLAGS@
57 LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
58 CPPFLAGS = @CPPFLAGS@
60 DEFS = @DEFS@
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)
70 .c.o:
71 ${RM} $@
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
96 TILDEOBJ = tilde.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 \
110 stamp-config stamp-h
111 CREATED_TAGS = TAGS tags
113 INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
114 rlstdc.h rlconf.h
116 ##########################################################################
118 all: static
120 everything: static shared examples
122 static: $(STATIC_LIBS)
124 libreadline.a: $(OBJECTS)
125 $(RM) $@
126 $(AR) $(ARFLAGS) $@ $(OBJECTS)
127 -test -n "$(RANLIB)" && $(RANLIB) $@
129 libhistory.a: $(HISTOBJ) xmalloc.o
130 $(RM) $@
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 ; \
143 done
145 config.status: configure
146 $(SHELL) ./config.status --recheck
148 config.h: stamp-h
150 stamp-h: config.status $(srcdir)/config.h.in
151 CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
152 echo > $@
154 #$(srcdir)/configure: $(srcdir)/configure.in ## Comment-me-out in distribution
155 # cd $(srcdir) && autoconf ## Comment-me-out in distribution
158 shared: force
159 -test -d shlib || mkdir shlib
160 -( cd shlib ; ${MAKE} ${MFLAGS} all )
162 documentation: force
163 -test -d doc || mkdir doc
164 -( cd doc && $(MAKE) $(MFLAGS) )
166 examples: force
167 -test -d examples || mkdir examples
168 -(cd examples && ${MAKE} ${MFLAGS} all )
170 force:
172 install-headers: installdirs ${INSTALLED_HEADERS}
173 for f in ${INSTALLED_HEADERS}; do \
174 $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
175 done
177 uninstall-headers:
178 -test -n "$(includedir)" && cd $(includedir)/readline && \
179 ${RM} ${INSTALLED_HEADERS}
181 maybe-uninstall-headers: uninstall-headers
183 install: installdirs $(STATIC_LIBS) install-headers
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 )
195 installdirs: $(srcdir)/support/mkdirs
196 -$(SHELL) $(srcdir)/support/mkdirs $(includedir) \
197 $(includedir)/readline $(libdir) $(infodir) $(man3dir)
199 uninstall: uninstall-headers
200 -test -n "$(libdir)" && cd $(libdir) && \
201 ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
203 install-shared: installdirs install-headers shared
204 -( cd shlib ; ${MAKE} ${MFLAGS} install )
206 uninstall-shared: maybe-uninstall-headers
207 -( cd shlib; ${MAKE} ${MFLAGS} uninstall )
209 TAGS: force
210 $(ETAGS) $(CSOURCES) $(HSOURCES)
212 tags: force
213 $(CTAGS) $(CSOURCES) $(HSOURCES)
215 clean: force
216 $(RM) $(OBJECTS) $(STATIC_LIBS)
217 $(RM) readline readline.exe
218 -( cd shlib && $(MAKE) $(MFLAGS) $@ )
219 -( cd doc && $(MAKE) $(MFLAGS) $@ )
220 -( cd examples && $(MAKE) $(MFLAGS) $@ )
222 mostlyclean: clean
223 -( cd shlib && $(MAKE) $(MFLAGS) $@ )
224 -( cd doc && $(MAKE) $(MFLAGS) $@ )
225 -( cd examples && $(MAKE) $(MFLAGS) $@ )
227 distclean maintainer-clean: clean
228 -( cd shlib && $(MAKE) $(MFLAGS) $@ )
229 -( cd doc && $(MAKE) $(MFLAGS) $@ )
230 -( cd examples && $(MAKE) $(MFLAGS) $@ )
231 $(RM) Makefile
232 $(RM) $(CREATED_CONFIGURE)
233 $(RM) $(CREATED_TAGS)
235 info dvi:
236 -( cd doc && $(MAKE) $(MFLAGS) $@ )
238 install-info:
239 check:
240 installcheck:
242 dist: force
243 @echo Readline distributions are created using $(srcdir)/support/mkdist.
244 @echo Here is a sample of the necessary commands:
245 @echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME) $(RL_LIBRARY_VERSION)
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
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:
253 # Dependencies
254 bind.o: ansi_stdlib.h posixstat.h
255 bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
256 bind.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
257 bind.o: history.h
258 callback.o: rlconf.h
259 callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
260 callback.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
261 complete.o: ansi_stdlib.h posixdir.h posixstat.h
262 complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
263 complete.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
264 display.o: ansi_stdlib.h posixstat.h
265 display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
266 display.o: tcap.h
267 display.o: readline.h keymaps.h chardefs.h tilde.h
268 display.o: history.h rlstdc.h
269 funmap.o: readline.h keymaps.h chardefs.h tilde.h
270 funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
271 funmap.o: ${BUILD_DIR}/config.h
272 histexpand.o: ansi_stdlib.h
273 histexpand.o: history.h histlib.h rlstdc.h
274 histexpand.o: ${BUILD_DIR}/config.h
275 histfile.o: ansi_stdlib.h
276 histfile.o: history.h histlib.h rlstdc.h
277 histfile.o: ${BUILD_DIR}/config.h
278 history.o: ansi_stdlib.h
279 history.o: history.h histlib.h rlstdc.h
280 history.o: ${BUILD_DIR}/config.h
281 histsearch.o: ansi_stdlib.h
282 histsearch.o: history.h histlib.h rlstdc.h
283 histsearch.o: ${BUILD_DIR}/config.h
284 input.o: ansi_stdlib.h
285 input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
286 input.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
287 isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
288 isearch.o: readline.h keymaps.h chardefs.h tilde.h
289 isearch.o: ansi_stdlib.h history.h rlstdc.h
290 keymaps.o: emacs_keymap.c vi_keymap.c
291 keymaps.o: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
292 keymaps.o: readline.h keymaps.h chardefs.h tilde.h
293 keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
294 kill.o: ansi_stdlib.h
295 kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
296 kill.o: readline.h keymaps.h chardefs.h tilde.h
297 kill.o: history.h rlstdc.h
298 macro.o: ansi_stdlib.h
299 macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
300 macro.o: readline.h keymaps.h chardefs.h tilde.h
301 macro.o: history.h rlstdc.h
302 nls.o: ansi_stdlib.h
303 nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
304 nls.o: readline.h keymaps.h chardefs.h tilde.h
305 nls.o: history.h rlstdc.h
306 parens.o: rlconf.h
307 parens.o: ${BUILD_DIR}/config.h
308 parens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
309 readline.o: readline.h keymaps.h chardefs.h tilde.h
310 readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
311 readline.o: history.h rlstdc.h
312 readline.o: posixstat.h ansi_stdlib.h posixjmp.h
313 rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
314 rltty.o: rltty.h
315 rltty.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
316 search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
317 search.o: readline.h keymaps.h chardefs.h tilde.h
318 search.o: ansi_stdlib.h history.h rlstdc.h
319 shell.o: ${BUILD_DIR}/config.h
320 shell.o: ansi_stdlib.h
321 signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
322 signals.o: readline.h keymaps.h chardefs.h tilde.h
323 signals.o: history.h rlstdc.h
324 terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
325 terminal.o: tcap.h
326 terminal.o: readline.h keymaps.h chardefs.h tilde.h
327 terminal.o: history.h rlstdc.h
328 tilde.o: ansi_stdlib.h
329 tilde.o: ${BUILD_DIR}/config.h
330 tilde.o: tilde.h
331 undo.o: ansi_stdlib.h
332 undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
333 undo.o: readline.h keymaps.h chardefs.h tilde.h
334 undo.o: history.h rlstdc.h
335 util.o: posixjmp.h ansi_stdlib.h
336 util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
337 util.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
338 vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
339 vi_mode.o: readline.h keymaps.h chardefs.h tilde.h
340 vi_mode.o: history.h ansi_stdlib.h rlstdc.h
341 xmalloc.o: ${BUILD_DIR}/config.h
342 xmalloc.o: ansi_stdlib.h
344 bind.o: rlshell.h
345 histfile.o: rlshell.h
346 nls.o: rlshell.h
347 readline.o: rlshell.h
348 shell.o: rlshell.h
349 terminal.o: rlshell.h
350 histexpand.o: rlshell.h
352 bind.o: rlprivate.h
353 callback.o: rlprivate.h
354 complete.o: rlprivate.h
355 display.o: rlprivate.h
356 input.o: rlprivate.h
357 isearch.o: rlprivate.h
358 kill.o: rlprivate.h
359 macro.o: rlprivate.h
360 nls.o: rlprivate.h
361 parens.o: rlprivate.h
362 readline.o: rlprivate.h
363 rltty.o: rlprivate.h
364 search.o: rlprivate.h
365 signals.o: rlprivate.h
366 terminal.o: rlprivate.h
367 undo.o: rlprivate.h
368 util.o: rlprivate.h
369 vi_mode.o: rlprivate.h
371 bind.o: xmalloc.h
372 complete.o: xmalloc.h
373 display.o: xmalloc.h
374 funmap.o: xmalloc.h
375 histexpand.o: xmalloc.h
376 histfile.o: xmalloc.h
377 history.o: xmalloc.h
378 input.o: xmalloc.h
379 isearch.o: xmalloc.h
380 keymaps.o: xmalloc.h
381 kill.o: xmalloc.h
382 macro.o: xmalloc.h
383 readline.o: xmalloc.h
384 savestring.o: xmalloc.h
385 search.o: xmalloc.h
386 shell.o: xmalloc.h
387 tilde.o: xmalloc.h
388 tilde.o: xmalloc.h
389 util.o: xmalloc.h
390 vi_mode.o: xmalloc.h
392 readline.o: $(srcdir)/readline.c
393 vi_mode.o: $(srcdir)/vi_mode.c
394 funmap.o: $(srcdir)/funmap.c
395 keymaps.o: $(srcdir)/keymaps.c
396 parens.o: $(srcdir)/parens.c
397 search.o: $(srcdir)/search.c
398 rltty.o: $(srcdir)/rltty.c
399 complete.o: $(srcdir)/complete.c
400 bind.o: $(srcdir)/bind.c
401 isearch.o: $(srcdir)/isearch.c
402 display.o: $(srcdir)/display.c
403 signals.o: $(srcdir)/signals.c
404 util.o: $(srcdir)/util.c
405 kill.o: $(srcdir)/kill.c
406 undo.o: $(srcdir)/undo.c
407 macro.o: $(srcdir)/macro.c
408 input.o: $(srcdir)/input.c
409 callback.o: $(srcdir)/callback.c
410 terminal.o: $(srcdir)/terminal.c
411 nls.o: $(srcdir)/nls.c
412 xmalloc.o: $(srcdir)/xmalloc.c
413 history.o: $(srcdir)/history.c
414 histexpand.o: $(srcdir)/histexpand.c
415 histfile.o: $(srcdir)/histfile.c
416 histsearch.o: $(srcdir)/histsearch.c
417 savestring.o: $(srcdir)/savestring.c
418 shell.o: $(srcdir)/shell.c
419 tilde.o: $(srcdir)/tilde.c
421 readline.o: readline.c
422 vi_mode.o: vi_mode.c
423 funmap.o: funmap.c
424 keymaps.o: keymaps.c
425 parens.o: parens.c
426 search.o: search.c
427 rltty.o: rltty.c
428 complete.o: complete.c
429 bind.o: bind.c
430 isearch.o: isearch.c
431 display.o: display.c
432 signals.o: signals.c
433 util.o: util.c
434 kill.o: kill.c
435 undo.o: undo.c
436 macro.o: macro.c
437 input.o: input.c
438 callback.o: callback.c
439 terminal.o: terminal.c
440 nls.o: nls.c
441 xmalloc.o: xmalloc.c
442 history.o: history.c
443 histexpand.o: histexpand.c
444 histfile.o: histfile.c
445 histsearch.o: histsearch.c
446 savestring.o: savestring.c
447 shell.o: shell.c
448 tilde.o: tilde.c