source: trunk/third/readline/Makefile.in @ 17012

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