* Makefile.in (clean mostlyclean distclean realclean): Recurse
[deliverable/binutils-gdb.git] / readline / Makefile.in
1 #
2 # Makefile
3 # Copyright (C) 1990, 1991, 1992 Free Software Foundation
4 #
5 # This file 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 of the License, or
8 # (at your option) 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. */
18 #
19
20 #
21 # Makefile for readline and history libraries.
22 #
23
24 srcdir = .
25
26 prefix = /usr/local
27
28 exec_prefix = $(prefix)
29 bindir = $(exec_prefix)/bin
30 libdir = $(exec_prefix)/lib
31
32 datadir = $(prefix)/lib
33 mandir = $(prefix)/man
34 man1dir = $(mandir)/man1
35 man2dir = $(mandir)/man2
36 man3dir = $(mandir)/man3
37 man4dir = $(mandir)/man4
38 man5dir = $(mandir)/man5
39 man6dir = $(mandir)/man6
40 man7dir = $(mandir)/man7
41 man8dir = $(mandir)/man8
42 man9dir = $(mandir)/man9
43 infodir = $(prefix)/info
44 includedir = $(prefix)/include
45 docdir = $(datadir)/doc
46
47 SHELL = /bin/sh
48
49 INSTALL = install -c
50 INSTALL_PROGRAM = $(INSTALL)
51 INSTALL_DATA = $(INSTALL)
52
53 AR = ar
54 AR_FLAGS = qv
55 CFLAGS = -g
56 BISON = bison
57 MAKEINFO = makeinfo
58 RANLIB = ranlib
59
60 # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
61 # a return type of "void" for signal handlers.
62 TYPES = -DVOID_SIGHANDLER
63
64 # HP-UX compilation requires the BSD library.
65 #LOCAL_LIBS = -lBSD
66
67 # Xenix compilation requires -ldir -lx
68 #LOCAL_LIBS = -ldir -lx
69
70 # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
71 # the vi line editing mode and features.
72 READLINE_DEFINES = $(TYPES) -DVI_MODE
73
74 DEBUG_FLAGS = $(MINUS_G)
75 LDFLAGS = $(DEBUG_FLAGS)
76
77 # A good alternative is gcc -traditional.
78 #CC = gcc -traditional
79 RM = rm
80 CP = cp
81
82 LOCAL_INCLUDES = -I$(srcdir)/../
83
84 # The name of the main library target.
85 LIBRARY_NAME = libreadline.a
86
87 # The C code source files for this library.
88 CSOURCES = readline.c funmap.c keymaps.c vi_mode.c parens.c \
89 rltty.c complete.c bind.c isearch.c display.c signals.c \
90 emacs_keymap.c vi_keymap.c history.c tilde.c xmalloc.c
91
92 # The header files for this library.
93 HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h \
94 posixstat.h tilde.h
95
96 OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
97 rltty.o complete.o bind.o isearch.o display.o signals.o \
98 history.o tilde.o xmalloc.o
99
100 SOURCES = $(CSOURCES) $(HSOURCES)
101
102 DOCUMENTATION = readline.texi inc-read.texi \
103 history.texi inc-hist.texi
104
105 SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
106
107 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
108
109 FLAGS_TO_PASS = \
110 "prefix=$(prefix)" \
111 "exec_prefix=$(exec_prefix)" \
112 "against=$(against)" \
113 "MAKEINFO=$(MAKEINFO)" \
114 "INSTALL=$(INSTALL)" \
115 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
116 "INSTALL_DATA=$(INSTALL_DATA)"
117
118 SUBDIRS = doc
119
120 #### Host, target, and site specific Makefile fragments come in here.
121 ###
122
123 .c.o:
124 $(CC) -c $(CFLAGS) $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) $<
125
126 STAGESTUFF = *.o
127
128 all: libreadline.a
129
130 check:
131 installcheck:
132
133 info dvi install-info clean-info clean-dvi: force
134 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
135
136 subdir_do: force
137 @for i in $(DODIRS); do \
138 if [ -f ./$$i/Makefile ] ; then \
139 if (cd ./$$i; \
140 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
141 else exit 1 ; fi ; \
142 else true ; fi ; \
143 done
144
145 history.info: $(srcdir)/history.texi
146 $(MAKEINFO) -o history.info $(srcdir)/history.texi
147
148 readline.info: $(srcdir)/readline.texi $(srcdir)/inc-read.texi
149 $(MAKEINFO) -o readline.info $(srcdir)/readline.texi
150
151 libreadline.a: $(OBJECTS)
152 $(RM) -f libreadline.a
153 $(AR) $(AR_FLAGS) libreadline.a $(OBJECTS)
154 $(RANLIB) libreadline.a
155
156 readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c
157 history.o: history.c history.h
158 funmap.o: readline.h
159 keymaps.o: emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
160
161 tilde.o: $(srcdir)/../glob/tilde.c
162 $(CC) -c $(CFLAGS) $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) $(srcdir)/../glob/tilde.c
163
164 libtest: libreadline.a libtest.c
165 $(CC) -o libtest $(CFLAGS) $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) -L. libtest.c -lreadline -ltermcap
166
167 readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h vi_mode.o
168 $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
169 $(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
170 keymaps.o history.o vi_mode.o -L. -ltermcap
171
172 readline.tar: $(THINGS_TO_TAR)
173 tar -cf readline.tar $(THINGS_TO_TAR)
174
175 readline.tar.Z: readline.tar
176 compress -f readline.tar
177
178 install:
179 $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
180 $(RANLIB) $(libdir)/libreadline.a
181 $(INSTALL_DATA) $(srcdir)/readline.h $(includedir)/readline/readline.h
182 $(INSTALL_DATA) $(srcdir)/keymaps.h $(includedir)/readline/keymaps.h
183 $(INSTALL_DATA) $(srcdir)/chardefs.h $(includedir)/readline/chardefs.h
184
185 includes:
186 $(INSTALL_FILE) $(srcdir)/readline.h $(includedir)/readline/readline.h
187 $(INSTALL_FILE) $(srcdir)/keymaps.h $(includedir)/readline/keymaps.h
188 $(INSTALL_FILE) $(srcdir)/chardefs.h $(includedir)/readline/chardefs.h
189
190 local-clean:
191 rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
192 rm -f *.aux *.pg *.toc
193
194 local-distclean: local-clean
195 rm -f Makefile config.status sysdep.h
196
197 mostlyclean: local-clean
198 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
199
200 clean: local-clean
201 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
202
203 distclean: local-distclean
204 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
205
206 realclean: local-distclean
207 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
208
209 $(DESTDIR)/libreadline.a: libreadline.a
210
211 # Copy the object files from a particular stage into a subdirectory.
212 stage1: force
213 -mkdir stage1
214 -mv $(STAGESTUFF) stage1
215
216 stage2: force
217 -mkdir stage2
218 -mv $(STAGESTUFF) stage2
219
220 stage3: force
221 -mkdir stage3
222 -mv $(STAGESTUFF) stage3
223
224 against=stage2
225
226 comparison: force
227 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
228
229 de-stage1: force
230 -(cd stage1 ; mv -f * ..)
231 -rmdir stage1
232
233 de-stage2: force
234 -(cd stage2 ; mv -f * ..)
235 -rmdir stage2
236
237 de-stage3: force
238 -(cd stage3 ; mv -f * ..)
239 -rmdir stage3
240
241 force:
242
243 # with the gnu make, this is done automatically.
244
245 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
246 $(SHELL) ./config.status
This page took 0.043046 seconds and 5 git commands to generate.