* config/{mh-ncr3000, mh-sysv4}: Change INSTALL to use
[deliverable/binutils-gdb.git] / readline / Makefile.in
CommitLineData
92bb90af
RP
1#
2# Makefile
3# Copyright (C) 1990, 1991 Cygnus Support
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#
bcb14db5 23
7da15eff 24srcdir = .
7187e60c 25
92bb90af
RP
26prefix = /usr/local
27
28bindir = $(prefix)/bin
29datadir = $(prefix)/lib
30libdir = $(prefix)/lib
31mandir = $(datadir)/man
32man1dir = $(mandir)/man1
33man2dir = $(mandir)/man2
34man3dir = $(mandir)/man3
35man4dir = $(mandir)/man4
36man5dir = $(mandir)/man5
37man6dir = $(mandir)/man6
38man7dir = $(mandir)/man7
39man8dir = $(mandir)/man8
40man9dir = $(mandir)/man9
41infodir = $(prefix)/info
42includedir = $(prefix)/include
43docdir = $(datadir)/doc
44
45SHELL = /bin/sh
46
47INSTALL = install -c
48INSTALL_PROGRAM = $(INSTALL)
49INSTALL_DATA = $(INSTALL)
7da15eff 50
92bb90af
RP
51AR = ar
52AR_FLAGS = qv
53BISON = bison
54MAKEINFO = makeinfo
55RANLIB = ranlib
56
57#### Host, target, and site specific Makefile fragments come in here.
58###
bd5635a1
RP
59
60# Define TYPES as -DVOID_SIGHANDLER if your operating system uses
61# a return type of "void" for signal handlers.
62TYPES = -DVOID_SIGHANDLER
63
bd5635a1
RP
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.
72READLINE_DEFINES = $(TYPES) -DVI_MODE
73
c21b1b26
SC
74MINUS_G=-g
75DEBUG_FLAGS = $(MINUS_G)
bd5635a1 76LDFLAGS = $(DEBUG_FLAGS)
92bb90af 77CFLAGS = $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES)
bd5635a1
RP
78
79# A good alternative is gcc -traditional.
80#CC = gcc -traditional
bd5635a1
RP
81RM = rm
82CP = cp
83
7da15eff 84LOCAL_INCLUDES = -I$(srcdir)/../
bd5635a1
RP
85
86CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
87 emacs_keymap.c vi_keymap.c
88
89HSOURCES = readline.h chardefs.h history.h keymaps.h
90SOURCES = $(CSOURCES) $(HSOURCES)
91
fff3e61f
RP
92DOCUMENTATION = readline.texi inc-read.texi \
93 history.texi inc-hist.texi
bd5635a1
RP
94
95SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
96
97THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
98
99##########################################################################
100
502ef32a 101STAGESTUFF = *.o
7da15eff 102
e92ee469
RP
103all: libreadline.a
104
92bb90af
RP
105info:
106 echo FIXME
107 echo FIXME
108 echo FIXME
109
110clean-info: force
111 -rm -f *.info*
fff3e61f
RP
112
113history.info: history.texi
c5bbc6ea 114 $(MAKEINFO) -o history.info $(srcdir)/history.texi
fff3e61f 115
c5bbc6ea
SG
116readline.info: readline.texi inc-read.texi
117 $(MAKEINFO) -o readline.info $(srcdir)/readline.texi
bd5635a1 118
02e20edf
JG
119libreadline.a: readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
120 $(RM) -f libreadline.a
121 $(AR) $(AR_FLAGS) libreadline.a readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
122 $(RANLIB) libreadline.a
bd5635a1
RP
123
124readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c
125history.o: history.c history.h
126funmap.o: readline.h
127keymaps.o: emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
02e20edf
JG
128
129tilde.o: $(srcdir)/../glob/tilde.c
130 $(CC) -c $(CFLAGS) $(srcdir)/../glob/tilde.c
bd5635a1
RP
131
132libtest: libreadline.a libtest.c
02e20edf 133 $(CC) -o libtest $(CFLAGS) $(CPPFLAGS) -L. libtest.c -lreadline -ltermcap
bd5635a1 134
494ea0b2 135readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h vi_mode.o
bd5635a1
RP
136 $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
137 $(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
494ea0b2 138 keymaps.o history.o vi_mode.o -L. -ltermcap
bd5635a1
RP
139
140readline.tar: $(THINGS_TO_TAR)
141 tar -cf readline.tar $(THINGS_TO_TAR)
142
143readline.tar.Z: readline.tar
144 compress -f readline.tar
145
92bb90af
RP
146install:
147 $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
148 $(RANLIB) $(libdir)/libreadline.a
149 [ -d $(includedir)/readline ] || mkdir $(includedir)/readline
150 $(INSTALL_DATA) readline.h $(includedir)/readline/readline.h
151 $(INSTALL_DATA) keymaps.h $(includedir)/readline/keymaps.h
152 $(INSTALL_DATA) chardefs.h $(includedir)/readline/chardefs.h
e92ee469 153
92bb90af 154install-info: info
fff3e61f 155 for i in *.info* ; do \
92bb90af 156 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
fff3e61f 157 done
bd5635a1
RP
158
159includes:
160 if [ ! -r $(INCDIR)/readline ]; then\
161 mkdir $(INCDIR)/readline;\
162 chmod a+r $(INCDIR)/readline;\
163 fi
bcb14db5
RP
164 $(INSTALL_FILE) $(srcdir)/readline.h $(INCDIR)/readline/
165 $(INSTALL_FILE) $(srcdir)/keymaps.h $(INCDIR)/readline/
166 $(INSTALL_FILE) $(srcdir)/chardefs.h $(INCDIR)/readline/
bd5635a1 167clean:
fff3e61f 168 rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
92bb90af 169 rm -f *.aux *.pg *.toc
bd5635a1
RP
170
171$(DESTDIR)/libreadline.a: libreadline.a
7da15eff
RP
172
173# Copy the object files from a particular stage into a subdirectory.
174stage1: force
175 -mkdir stage1
176 -mv $(STAGESTUFF) stage1
177
178stage2: force
179 -mkdir stage2
180 -mv $(STAGESTUFF) stage2
181
182stage3: force
183 -mkdir stage3
184 -mv $(STAGESTUFF) stage3
185
30ba1dfe
RP
186against=stage2
187
188comparison: force
189 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
190
7da15eff 191de-stage1: force
92bb90af
RP
192 -(cd stage1 ; mv -f * ..)
193 -rmdir stage1
7da15eff
RP
194
195de-stage2: force
92bb90af
RP
196 -(cd stage2 ; mv -f * ..)
197 -rmdir stage2
7da15eff
RP
198
199de-stage3: force
92bb90af
RP
200 -(cd stage3 ; mv -f * ..)
201 -rmdir stage3
7da15eff
RP
202
203force:
204
205# with the gnu make, this is done automatically.
206
c21b1b26 207Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
bcb14db5 208 $(SHELL) ./config.status
This page took 0.05315 seconds and 4 git commands to generate.