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

Revision 13015, 11.9 KB checked in by ghudson, 25 years ago (diff)
Add more DESTDIR support. Nuke some mv commands we don't want.
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., 675 Mass Ave, Cambridge, MA 02139, 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
63# For libraries which include headers from other libraries.
64INCLUDES = -I. -I$(srcdir) -I$(includedir)
65
66CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
67
68.c.o:
69        ${RM} $@
70        $(CC) -c $(CCFLAGS) $<
71
72# The name of the main library target.
73LIBRARY_NAME = libreadline.a
74STATIC_LIBS = libreadline.a libhistory.a
75
76# The C code source files for this library.
77CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
78           $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
79           $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \
80           $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
81           $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
82           $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
83           $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
84           $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
85           $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
86           $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c
87
88# The header files for this library.
89HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
90           posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
91           ansi_stdlib.h tcap.h rlstdc.h
92
93HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o
94TILDEOBJ = tilde.o
95OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
96          rltty.o complete.o bind.o isearch.o display.o signals.o \
97          util.o kill.o undo.o macro.o input.o callback.o terminal.o \
98          nls.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
99
100# The texinfo files which document this library.
101DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
102DOCOBJECT = doc/readline.dvi
103DOCSUPPORT = doc/Makefile
104DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
105
106CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
107CREATED_CONFIGURE = config.status config.h config.cache config.log \
108                    stamp-config stamp-h
109CREATED_TAGS = TAGS tags
110
111INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
112                    rlstdc.h rlconf.h
113
114##########################################################################
115
116all: static
117
118static: $(STATIC_LIBS)
119
120libreadline.a: $(OBJECTS)
121        $(RM) $@
122        $(AR) $(ARFLAGS) $@ $(OBJECTS)
123        -test -n "$(RANLIB)" && $(RANLIB) $@
124
125libhistory.a: $(HISTOBJ) xmalloc.o
126        $(RM) $@
127        $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
128        -test -n "$(RANLIB)" && $(RANLIB) $@
129
130readline: $(OBJECTS) readline.h rldefs.h chardefs.h
131        $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a -ltermcap
132
133Makefile makefile: config.status $(srcdir)/Makefile.in
134        CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
135
136Makefiles makefiles: config.status $(srcdir)/Makefile.in
137        @for mf in $(CREATED_MAKEFILES); do \
138                CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
139        done
140
141config.status: configure
142        $(SHELL) ./config.status --recheck
143
144config.h:       stamp-h
145
146stamp-h: config.status $(srcdir)/config.h.in
147        CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
148        echo > $@
149
150$(srcdir)/configure: $(srcdir)/configure.in     ## Comment-me-out in distribution
151        cd $(srcdir) && autoconf        ## Comment-me-out in distribution
152
153
154shared: force
155        -test -d shlib || mkdir shlib
156        -( cd shlib ; ${MAKE} ${MFLAGS} all )
157
158documentation: force
159        -test -d doc || mkdir doc
160        -( cd doc && $(MAKE) $(MFLAGS) )
161
162examples: force
163        -test -d examples || mkdir examples
164        -(cd examples && ${MAKE} ${MFLAGS} all )
165
166force:
167
168install: installdirs $(STATIC_LIBS)
169        for f in ${INSTALLED_HEADERS}; do \
170                $(INSTALL_DATA) $(srcdir)/$$f ${DESTDIR}$(includedir)/readline ; \
171        done
172        $(INSTALL_DATA) libreadline.a ${DESTDIR}$(libdir)/libreadline.a
173        -test -n "$(RANLIB)" && $(RANLIB) -t ${DESTDIR}$(libdir)/libreadline.a
174        $(INSTALL_DATA) libhistory.a ${DESTDIR}$(libdir)/libhistory.a
175        -test -n "$(RANLIB)" && $(RANLIB) -t ${DESTDIR}$(libdir)/libhistory.a
176        -( if test -d doc ; then \
177                cd doc && \
178                ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
179          fi )
180
181installdirs: $(srcdir)/support/mkdirs
182        -$(SHELL) $(srcdir)/support/mkdirs ${DESTDIR}$(includedir) \
183                ${DESTDIR}$(includedir)/readline ${DESTDIR}$(libdir) ${DESTDIR}$(infodir) ${DESTDIR}$(man3dir)
184
185uninstall:
186        -test -n "$(includedir)" && cd $(includedir)/readline && \
187                ${RM} ${INSTALLED_HEADERS}
188        -test -n "$(libdir)" && cd $(libdir) && \
189                ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
190
191install-shared: installdirs shared
192        -( cd shlib ; ${MAKE} ${MFLAGS} install )
193
194uninstall-shared:
195        -( cd shlib; ${MAKE} ${MFLAGS} uninstall )
196
197TAGS:   force
198        $(ETAGS) $(CSOURCES) $(HSOURCES)
199
200tags:   force
201        $(CTAGS) $(CSOURCES) $(HSOURCES)
202
203clean:  force
204        $(RM) $(OBJECTS) $(STATIC_LIBS)
205        -( cd shlib && $(MAKE) $(MFLAGS) $@ )
206        -( cd doc && $(MAKE) $(MFLAGS) $@ )
207        -( cd examples && $(MAKE) $(MFLAGS) $@ )
208
209mostlyclean: clean
210        -( cd shlib && $(MAKE) $(MFLAGS) $@ )
211        -( cd doc && $(MAKE) $(MFLAGS) $@ )
212        -( cd examples && $(MAKE) $(MFLAGS) $@ )
213
214distclean maintainer-clean: clean
215        -( cd shlib && $(MAKE) $(MFLAGS) $@ )
216        -( cd doc && $(MAKE) $(MFLAGS) $@ )
217        -( cd examples && $(MAKE) $(MFLAGS) $@ )
218        $(RM) Makefile
219        $(RM) $(CREATED_CONFIGURE)
220        $(RM) $(CREATED_TAGS)
221
222info dvi:
223        -( cd doc && $(MAKE) $(MFLAGS) $@ )
224
225install-info:
226check:
227installcheck:
228
229dist:   force
230        @echo Readline distributions are created using $(srcdir)/support/mkdist.
231        @echo Here is a sample of the necessary commands:
232        @echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION)
233        @echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION)
234        @echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar
235
236# Tell versions [3.59,3.63) of GNU make not to export all variables.
237# Otherwise a system limit (for SysV at least) may be exceeded.
238.NOEXPORT:
239
240# Dependencies
241bind.o: ansi_stdlib.h posixstat.h
242bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
243bind.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
244bind.o: history.h
245callback.o: rlconf.h
246callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
247callback.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
248complete.o: ansi_stdlib.h posixdir.h posixstat.h
249complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
250complete.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
251display.o: ansi_stdlib.h posixstat.h
252display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
253display.o: tcap.h
254display.o: readline.h keymaps.h chardefs.h tilde.h
255display.o: history.h rlstdc.h
256funmap.o: readline.h keymaps.h chardefs.h tilde.h
257funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
258funmap.o: ${BUILD_DIR}/config.h
259histexpand.o: ansi_stdlib.h
260histexpand.o: history.h histlib.h rlstdc.h
261histexpand.o: ${BUILD_DIR}/config.h
262histfile.o: ansi_stdlib.h
263histfile.o: history.h histlib.h rlstdc.h
264histfile.o: ${BUILD_DIR}/config.h
265history.o: ansi_stdlib.h
266history.o: history.h histlib.h rlstdc.h
267history.o: ${BUILD_DIR}/config.h
268histsearch.o: ansi_stdlib.h
269histsearch.o: history.h histlib.h rlstdc.h
270histsearch.o: ${BUILD_DIR}/config.h
271input.o: ansi_stdlib.h
272input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
273input.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
274isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
275isearch.o: readline.h keymaps.h chardefs.h tilde.h
276isearch.o: ansi_stdlib.h history.h rlstdc.h
277keymaps.o: emacs_keymap.c vi_keymap.c
278keymaps.o: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
279keymaps.o: readline.h keymaps.h chardefs.h tilde.h
280keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
281kill.o: ansi_stdlib.h
282kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
283kill.o: readline.h keymaps.h chardefs.h tilde.h
284kill.o: history.h rlstdc.h
285macro.o: ansi_stdlib.h
286macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
287macro.o: readline.h keymaps.h chardefs.h tilde.h
288macro.o: history.h rlstdc.h
289nls.o: ansi_stdlib.h
290nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
291parens.o: rlconf.h
292parens.o: ${BUILD_DIR}/config.h
293parens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
294readline.o: readline.h keymaps.h chardefs.h tilde.h
295readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
296readline.o: history.h rlstdc.h
297readline.o: posixstat.h ansi_stdlib.h posixjmp.h
298rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
299rltty.o: rltty.h
300rltty.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
301search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
302search.o: readline.h keymaps.h chardefs.h tilde.h
303search.o: ansi_stdlib.h history.h rlstdc.h
304shell.o: ${BUILD_DIR}/config.h
305shell.o: ansi_stdlib.h
306signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
307signals.o: readline.h keymaps.h chardefs.h tilde.h
308signals.o: history.h rlstdc.h
309terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
310terminal.o: tcap.h
311terminal.o: readline.h keymaps.h chardefs.h tilde.h
312terminal.o: history.h rlstdc.h
313tilde.o: ansi_stdlib.h
314tilde.o: ${BUILD_DIR}/config.h
315tilde.o: tilde.h
316undo.o: ansi_stdlib.h
317undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
318undo.o: readline.h keymaps.h chardefs.h tilde.h
319undo.o: history.h rlstdc.h
320util.o: posixjmp.h ansi_stdlib.h
321util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
322util.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
323vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
324vi_mode.o: readline.h keymaps.h chardefs.h tilde.h
325vi_mode.o: history.h ansi_stdlib.h rlstdc.h
326xmalloc.o: ${BUILD_DIR}/config.h
327xmalloc.o: ansi_stdlib.h
328
329readline.o: $(srcdir)/readline.c
330vi_mode.o: $(srcdir)/vi_mode.c
331funmap.o: $(srcdir)/funmap.c
332keymaps.o: $(srcdir)/keymaps.c
333parens.o: $(srcdir)/parens.c
334search.o: $(srcdir)/search.c
335rltty.o: $(srcdir)/rltty.c
336complete.o: $(srcdir)/complete.c
337bind.o: $(srcdir)/bind.c
338isearch.o: $(srcdir)/isearch.c
339display.o: $(srcdir)/display.c
340signals.o: $(srcdir)/signals.c
341util.o: $(srcdir)/util.c
342kill.o: $(srcdir)/kill.c
343undo.o: $(srcdir)/undo.c
344macro.o: $(srcdir)/macro.c
345input.o: $(srcdir)/input.c
346callback.o: $(srcdir)/callback.c
347terminal.o: $(srcdir)/terminal.c
348nls.o: $(srcdir)/nls.c
349xmalloc.o: $(srcdir)/xmalloc.c
350history.o: $(srcdir)/history.c
351histexpand.o: $(srcdir)/histexpand.c
352histfile.o: $(srcdir)/histfile.c
353histsearch.o: $(srcdir)/histsearch.c
354savestring.o: $(srcdir)/savestring.c
355shell.o: $(srcdir)/shell.c
356tilde.o: $(srcdir)/tilde.c
357
358readline.o: readline.c
359vi_mode.o: vi_mode.c
360funmap.o: funmap.c
361keymaps.o: keymaps.c
362parens.o: parens.c
363search.o: search.c
364rltty.o: rltty.c
365complete.o: complete.c
366bind.o: bind.c
367isearch.o: isearch.c
368display.o: display.c
369signals.o: signals.c
370util.o: util.c
371kill.o: kill.c
372undo.o: undo.c
373macro.o: macro.c
374input.o: input.c
375callback.o: callback.c
376terminal.o: terminal.c
377nls.o: nls.c
378xmalloc.o: xmalloc.c
379history.o: history.c
380histexpand.o: histexpand.c
381histfile.o: histfile.c
382histsearch.o: histsearch.c
383savestring.o: savestring.c
384shell.o: shell.c
385tilde.o: tilde.c
Note: See TracBrowser for help on using the repository browser.