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

Revision 15436, 13.2 KB checked in by ghudson, 24 years ago (diff)
No -I$(includedir), especially if it is not defined.
Line 
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
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
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
38SHELL = @MAKE_SHELL@
39
40prefix = @prefix@
41exec_prefix = @exec_prefix@
42
43bindir = @bindir@
44libdir = @libdir@
45mandir = @mandir@
46includedir = @includedir@
47
48infodir = @infodir@
49
50man3dir = $(mandir)/man3
51
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@
59
60DEFS = @DEFS@
61LOCAL_DEFS = @LOCAL_DEFS@
62
63TERMCAP_LIB = @TERMCAP_LIB@
64
65# For libraries which include headers from other libraries.
66INCLUDES = -I. -I$(srcdir)
67
68CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
69
70.c.o:
71        ${RM} $@
72        $(CC) -c $(CCFLAGS) $<
73
74# The name of the main library target.
75LIBRARY_NAME = libreadline.a
76STATIC_LIBS = libreadline.a libhistory.a
77
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 \
88           $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c
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 \
93           ansi_stdlib.h tcap.h rlstdc.h xmalloc.h rlprivate.h rlshell.h
94
95HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o
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
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
108CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
109CREATED_CONFIGURE = config.status config.h config.cache config.log \
110                    stamp-config stamp-h
111CREATED_TAGS = TAGS tags
112
113INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
114                    rlstdc.h rlconf.h
115
116##########################################################################
117
118all: static
119
120everything: static shared examples
121
122static: $(STATIC_LIBS)
123
124libreadline.a: $(OBJECTS)
125        $(RM) $@
126        $(AR) $(ARFLAGS) $@ $(OBJECTS)
127        -test -n "$(RANLIB)" && $(RANLIB) $@
128
129libhistory.a: $(HISTOBJ) xmalloc.o
130        $(RM) $@
131        $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
132        -test -n "$(RANLIB)" && $(RANLIB) $@
133
134readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
135        $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB}
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
154#$(srcdir)/configure: $(srcdir)/configure.in    ## Comment-me-out in distribution
155#       cd $(srcdir) && autoconf        ## Comment-me-out in distribution
156
157
158shared: force
159        -test -d shlib || mkdir shlib
160        -( cd shlib ; ${MAKE} ${MFLAGS} all )
161
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
172install-headers: installdirs ${INSTALLED_HEADERS}
173        for f in ${INSTALLED_HEADERS}; do \
174                $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/readline ; \
175        done
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
184        $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
185        -test -n "$(RANLIB)" && $(RANLIB) -t $(DESTDIR)$(libdir)/libreadline.a
186        $(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
187        -test -n "$(RANLIB)" && $(RANLIB) -t $(DESTDIR)$(libdir)/libhistory.a
188        -( if test -d doc ; then \
189                cd doc && \
190                ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
191          fi )
192
193installdirs: $(srcdir)/support/mkdirs
194        -$(SHELL) $(srcdir)/support/mkdirs $(DESTDIR)$(includedir) \
195                $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir)
196
197uninstall: uninstall-headers
198        -test -n "$(libdir)" && cd $(libdir) && \
199                ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
200
201install-shared: installdirs install-headers shared
202        -( cd shlib ; ${MAKE} ${MFLAGS} install )
203
204uninstall-shared: maybe-uninstall-headers
205        -( cd shlib; ${MAKE} ${MFLAGS} uninstall )
206
207TAGS:   force
208        $(ETAGS) $(CSOURCES) $(HSOURCES)
209
210tags:   force
211        $(CTAGS) $(CSOURCES) $(HSOURCES)
212
213clean:  force
214        $(RM) $(OBJECTS) $(STATIC_LIBS)
215        $(RM) readline readline.exe
216        -( cd shlib && $(MAKE) $(MFLAGS) $@ )
217        -( cd doc && $(MAKE) $(MFLAGS) $@ )
218        -( cd examples && $(MAKE) $(MFLAGS) $@ )
219
220mostlyclean: clean
221        -( cd shlib && $(MAKE) $(MFLAGS) $@ )
222        -( cd doc && $(MAKE) $(MFLAGS) $@ )
223        -( cd examples && $(MAKE) $(MFLAGS) $@ )
224
225distclean maintainer-clean: clean
226        -( cd shlib && $(MAKE) $(MFLAGS) $@ )
227        -( cd doc && $(MAKE) $(MFLAGS) $@ )
228        -( cd examples && $(MAKE) $(MFLAGS) $@ )
229        $(RM) Makefile
230        $(RM) $(CREATED_CONFIGURE)
231        $(RM) $(CREATED_TAGS)
232
233info dvi:
234        -( cd doc && $(MAKE) $(MFLAGS) $@ )
235
236install-info:
237check:
238installcheck:
239
240dist:   force
241        @echo Readline distributions are created using $(srcdir)/support/mkdist.
242        @echo Here is a sample of the necessary commands:
243        @echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME) $(RL_LIBRARY_VERSION)
244        @echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION)
245        @echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar
246
247# Tell versions [3.59,3.63) of GNU make not to export all variables.
248# Otherwise a system limit (for SysV at least) may be exceeded.
249.NOEXPORT:
250
251# Dependencies
252bind.o: ansi_stdlib.h posixstat.h
253bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
254bind.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
255bind.o: history.h
256callback.o: rlconf.h
257callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
258callback.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
259complete.o: ansi_stdlib.h posixdir.h posixstat.h
260complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
261complete.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
262display.o: ansi_stdlib.h posixstat.h
263display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
264display.o: tcap.h
265display.o: readline.h keymaps.h chardefs.h tilde.h
266display.o: history.h rlstdc.h
267funmap.o: readline.h keymaps.h chardefs.h tilde.h
268funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
269funmap.o: ${BUILD_DIR}/config.h
270histexpand.o: ansi_stdlib.h
271histexpand.o: history.h histlib.h rlstdc.h
272histexpand.o: ${BUILD_DIR}/config.h
273histfile.o: ansi_stdlib.h
274histfile.o: history.h histlib.h rlstdc.h
275histfile.o: ${BUILD_DIR}/config.h
276history.o: ansi_stdlib.h
277history.o: history.h histlib.h rlstdc.h
278history.o: ${BUILD_DIR}/config.h
279histsearch.o: ansi_stdlib.h
280histsearch.o: history.h histlib.h rlstdc.h
281histsearch.o: ${BUILD_DIR}/config.h
282input.o: ansi_stdlib.h
283input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
284input.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
285isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
286isearch.o: readline.h keymaps.h chardefs.h tilde.h
287isearch.o: ansi_stdlib.h history.h rlstdc.h
288keymaps.o: emacs_keymap.c vi_keymap.c
289keymaps.o: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
290keymaps.o: readline.h keymaps.h chardefs.h tilde.h
291keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
292kill.o: ansi_stdlib.h
293kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
294kill.o: readline.h keymaps.h chardefs.h tilde.h
295kill.o: history.h rlstdc.h
296macro.o: ansi_stdlib.h
297macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
298macro.o: readline.h keymaps.h chardefs.h tilde.h
299macro.o: history.h rlstdc.h
300nls.o: ansi_stdlib.h
301nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
302nls.o: readline.h keymaps.h chardefs.h tilde.h 
303nls.o: history.h rlstdc.h 
304parens.o: rlconf.h
305parens.o: ${BUILD_DIR}/config.h
306parens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
307readline.o: readline.h keymaps.h chardefs.h tilde.h
308readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
309readline.o: history.h rlstdc.h
310readline.o: posixstat.h ansi_stdlib.h posixjmp.h
311rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
312rltty.o: rltty.h
313rltty.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
314search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
315search.o: readline.h keymaps.h chardefs.h tilde.h
316search.o: ansi_stdlib.h history.h rlstdc.h
317shell.o: ${BUILD_DIR}/config.h
318shell.o: ansi_stdlib.h
319signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
320signals.o: readline.h keymaps.h chardefs.h tilde.h
321signals.o: history.h rlstdc.h
322terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
323terminal.o: tcap.h
324terminal.o: readline.h keymaps.h chardefs.h tilde.h
325terminal.o: history.h rlstdc.h
326tilde.o: ansi_stdlib.h
327tilde.o: ${BUILD_DIR}/config.h
328tilde.o: tilde.h
329undo.o: ansi_stdlib.h
330undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
331undo.o: readline.h keymaps.h chardefs.h tilde.h
332undo.o: history.h rlstdc.h
333util.o: posixjmp.h ansi_stdlib.h
334util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
335util.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
336vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
337vi_mode.o: readline.h keymaps.h chardefs.h tilde.h
338vi_mode.o: history.h ansi_stdlib.h rlstdc.h
339xmalloc.o: ${BUILD_DIR}/config.h
340xmalloc.o: ansi_stdlib.h
341
342bind.o: rlshell.h
343histfile.o: rlshell.h
344nls.o: rlshell.h
345readline.o: rlshell.h
346shell.o: rlshell.h
347terminal.o: rlshell.h
348histexpand.o: rlshell.h
349
350bind.o: rlprivate.h
351callback.o: rlprivate.h
352complete.o: rlprivate.h
353display.o: rlprivate.h
354input.o: rlprivate.h
355isearch.o: rlprivate.h
356kill.o: rlprivate.h
357macro.o: rlprivate.h
358nls.o: rlprivate.h   
359parens.o: rlprivate.h
360readline.o: rlprivate.h
361rltty.o: rlprivate.h
362search.o: rlprivate.h
363signals.o: rlprivate.h
364terminal.o: rlprivate.h
365undo.o: rlprivate.h
366util.o: rlprivate.h
367vi_mode.o: rlprivate.h
368
369bind.o: xmalloc.h
370complete.o: xmalloc.h
371display.o: xmalloc.h
372funmap.o: xmalloc.h
373histexpand.o: xmalloc.h
374histfile.o: xmalloc.h
375history.o: xmalloc.h
376input.o: xmalloc.h
377isearch.o: xmalloc.h
378keymaps.o: xmalloc.h
379kill.o: xmalloc.h
380macro.o: xmalloc.h
381readline.o: xmalloc.h
382savestring.o: xmalloc.h
383search.o: xmalloc.h
384shell.o: xmalloc.h
385tilde.o: xmalloc.h
386tilde.o: xmalloc.h
387util.o: xmalloc.h
388vi_mode.o: xmalloc.h
389
390readline.o: $(srcdir)/readline.c
391vi_mode.o: $(srcdir)/vi_mode.c
392funmap.o: $(srcdir)/funmap.c
393keymaps.o: $(srcdir)/keymaps.c
394parens.o: $(srcdir)/parens.c
395search.o: $(srcdir)/search.c
396rltty.o: $(srcdir)/rltty.c
397complete.o: $(srcdir)/complete.c
398bind.o: $(srcdir)/bind.c
399isearch.o: $(srcdir)/isearch.c
400display.o: $(srcdir)/display.c
401signals.o: $(srcdir)/signals.c
402util.o: $(srcdir)/util.c
403kill.o: $(srcdir)/kill.c
404undo.o: $(srcdir)/undo.c
405macro.o: $(srcdir)/macro.c
406input.o: $(srcdir)/input.c
407callback.o: $(srcdir)/callback.c
408terminal.o: $(srcdir)/terminal.c
409nls.o: $(srcdir)/nls.c
410xmalloc.o: $(srcdir)/xmalloc.c
411history.o: $(srcdir)/history.c
412histexpand.o: $(srcdir)/histexpand.c
413histfile.o: $(srcdir)/histfile.c
414histsearch.o: $(srcdir)/histsearch.c
415savestring.o: $(srcdir)/savestring.c
416shell.o: $(srcdir)/shell.c
417tilde.o: $(srcdir)/tilde.c
418
419readline.o: readline.c
420vi_mode.o: vi_mode.c
421funmap.o: funmap.c
422keymaps.o: keymaps.c
423parens.o: parens.c
424search.o: search.c
425rltty.o: rltty.c
426complete.o: complete.c
427bind.o: bind.c
428isearch.o: isearch.c
429display.o: display.c
430signals.o: signals.c
431util.o: util.c
432kill.o: kill.c
433undo.o: undo.c
434macro.o: macro.c
435input.o: input.c
436callback.o: callback.c
437terminal.o: terminal.c
438nls.o: nls.c
439xmalloc.o: xmalloc.c
440history.o: history.c
441histexpand.o: histexpand.c
442histfile.o: histfile.c
443histsearch.o: histsearch.c
444savestring.o: savestring.c
445shell.o: shell.c
446tilde.o: tilde.c
Note: See TracBrowser for help on using the repository browser.