Makefile.in revision 47558
126497Sache## -*- text -*- ##
226497Sache# Master Makefile for the GNU readline library.
326497Sache# Copyright (C) 1994 Free Software Foundation, Inc.
421308Sache
526497Sache# This program is free software; you can redistribute it and/or modify
626497Sache# it under the terms of the GNU General Public License as published by
726497Sache# the Free Software Foundation; either version 2, or (at your option)
826497Sache# any later version.
926497Sache
1026497Sache# This program is distributed in the hope that it will be useful,
1126497Sache# but WITHOUT ANY WARRANTY; without even the implied warranty of
1226497Sache# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1326497Sache# GNU General Public License for more details.
1426497Sache
1526497Sache# You should have received a copy of the GNU General Public License
1626497Sache# along with this program; if not, write to the Free Software
1726497Sache# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1826497SacheRL_LIBRARY_VERSION = @LIBVERSION@
1926497SacheRL_LIBRARY_NAME = readline
2026497Sache
2121308Sachesrcdir = @srcdir@
2221308SacheVPATH = .:@srcdir@
2326497Sachetop_srcdir = @top_srcdir@
2435486SacheBUILD_DIR = @BUILD_DIR@
2521308Sache
2621308SacheINSTALL = @INSTALL@
2721308SacheINSTALL_PROGRAM = @INSTALL_PROGRAM@
2821308SacheINSTALL_DATA = @INSTALL_DATA@
2921308Sache
3021308SacheCC = @CC@
3121308SacheRANLIB = @RANLIB@
3247558SacheAR = @AR@
3347558SacheARFLAGS = @ARFLAGS@
3421308SacheRM = rm -f
3521308SacheCP = cp
3621308SacheMV = mv
3721308Sache
3847558SacheSHELL = @MAKE_SHELL@
3947558Sache
4026497Sacheprefix = @prefix@
4126497Sacheexec_prefix = @exec_prefix@
4221308Sache
4326497Sachebindir = @bindir@
4426497Sachelibdir = @libdir@
4526497Sachemandir = @mandir@
4626497Sacheincludedir = @includedir@
4726497Sache
4826497Sacheinfodir = @infodir@
4926497Sache
5026497Sacheman3dir = $(mandir)/man3
5126497Sache
5226497Sache# Programs to make tags files.
5326497SacheETAGS = etags -tw
5426497SacheCTAGS = ctags -tw
5526497Sache
5621308SacheCFLAGS = @CFLAGS@
5726497SacheLOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
5821308SacheCPPFLAGS = @CPPFLAGS@
5921308Sache
6021308SacheDEFS = @DEFS@
6126497SacheLOCAL_DEFS = @LOCAL_DEFS@
6221308Sache
6326497Sache# For libraries which include headers from other libraries.
6426497SacheINCLUDES = -I. -I$(srcdir) -I$(includedir)
6521308Sache
6626497SacheCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
6721308Sache
6821308Sache.c.o:
6947558Sache	${RM} $@
7021308Sache	$(CC) -c $(CCFLAGS) $<
7121308Sache
7221308Sache# The name of the main library target.
7321308SacheLIBRARY_NAME = libreadline.a
7435486SacheSTATIC_LIBS = libreadline.a libhistory.a
7535486Sache
7621308Sache# The C code source files for this library.
7721308SacheCSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
7821308Sache	   $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
7921308Sache	   $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \
8021308Sache	   $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
8121308Sache	   $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
8221308Sache	   $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
8321308Sache	   $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
8421308Sache	   $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
8526497Sache	   $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
8647558Sache	   $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c
8721308Sache
8821308Sache# The header files for this library.
8921308SacheHSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
9026497Sache	   posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
9147558Sache	   ansi_stdlib.h tcap.h rlstdc.h
9221308Sache
9347558SacheHISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o 
9426497SacheTILDEOBJ = tilde.o
9521308SacheOBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
9621308Sache	  rltty.o complete.o bind.o isearch.o display.o signals.o \
9721308Sache	  util.o kill.o undo.o macro.o input.o callback.o terminal.o \
9826497Sache	  nls.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
9921308Sache
10021308Sache# The texinfo files which document this library.
10121308SacheDOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
10221308SacheDOCOBJECT = doc/readline.dvi
10321308SacheDOCSUPPORT = doc/Makefile
10421308SacheDOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
10521308Sache
10647558SacheCREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
10735486SacheCREATED_CONFIGURE = config.status config.h config.cache config.log \
10835486Sache		    stamp-config stamp-h
10935486SacheCREATED_TAGS = TAGS tags
11021308Sache
11147558SacheINSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
11247558Sache		    rlstdc.h rlconf.h
11321308Sache
11421308Sache##########################################################################
11521308Sache
11635486Sacheall: static
11735486Sache
11835486Sachestatic: $(STATIC_LIBS)
11921308Sache
12021308Sachelibreadline.a: $(OBJECTS)
12126497Sache	$(RM) $@
12247558Sache	$(AR) $(ARFLAGS) $@ $(OBJECTS)
12321308Sache	-test -n "$(RANLIB)" && $(RANLIB) $@
12421308Sache
12521308Sachelibhistory.a: $(HISTOBJ) xmalloc.o
12626497Sache	$(RM) $@
12747558Sache	$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
12821308Sache	-test -n "$(RANLIB)" && $(RANLIB) $@
12921308Sache
13026497Sachereadline: $(OBJECTS) readline.h rldefs.h chardefs.h
13126497Sache	$(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a -ltermcap
13226497Sache
13326497SacheMakefile makefile: config.status $(srcdir)/Makefile.in
13426497Sache	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
13526497Sache
13626497SacheMakefiles makefiles: config.status $(srcdir)/Makefile.in
13726497Sache	@for mf in $(CREATED_MAKEFILES); do \
13826497Sache		CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
13926497Sache	done
14026497Sache
14126497Sacheconfig.status: configure
14226497Sache	$(SHELL) ./config.status --recheck
14326497Sache
14426497Sacheconfig.h:	stamp-h
14526497Sache
14626497Sachestamp-h: config.status $(srcdir)/config.h.in
14726497Sache	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
14826497Sache	echo > $@
14926497Sache
15026497Sache$(srcdir)/configure: $(srcdir)/configure.in	## Comment-me-out in distribution
15126497Sache	cd $(srcdir) && autoconf	## Comment-me-out in distribution
15226497Sache
15347558Sache
15447558Sacheshared:	force
15547558Sache	-test -d shlib || mkdir shlib
15647558Sache	-( cd shlib ; ${MAKE} ${MFLAGS} all )
15747558Sache
15821308Sachedocumentation: force
15926497Sache	-test -d doc || mkdir doc
16021308Sache	-( cd doc && $(MAKE) $(MFLAGS) )
16121308Sache
16235486Sacheexamples: force
16335486Sache	-test -d examples || mkdir examples
16435486Sache	-(cd examples && ${MAKE} ${MFLAGS} all )
16535486Sache
16621308Sacheforce:
16721308Sache
16847558Sacheinstall: installdirs $(STATIC_LIBS)
16926497Sache	for f in ${INSTALLED_HEADERS}; do \
17026497Sache		$(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
17121308Sache	done
17226497Sache	-$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old
17326497Sache	$(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
17435486Sache	-test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
17547558Sache	-$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old
17635486Sache	$(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
17735486Sache	-test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
17826497Sache	-( if test -d doc ; then \
17926497Sache		cd doc && \
18035486Sache		${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
18126497Sache	  fi )
18221308Sache
18326497Sacheinstalldirs: $(srcdir)/support/mkdirs
18426497Sache	-$(SHELL) $(srcdir)/support/mkdirs $(includedir) \
18521308Sache		$(includedir)/readline $(libdir) $(infodir) $(man3dir)
18621308Sache
18721308Sacheuninstall:
18826497Sache	-test -n "$(includedir)" && cd $(includedir)/readline && \
18926497Sache		${RM} ${INSTALLED_HEADERS}
19026497Sache	-test -n "$(libdir)" && cd $(libdir) && \
19135486Sache		${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
19221308Sache
19335486Sacheinstall-shared: installdirs shared
19447558Sache	-( cd shlib ; ${MAKE} ${MFLAGS} install )
19535486Sache
19635486Sacheuninstall-shared:
19747558Sache	-( cd shlib; ${MAKE} ${MFLAGS} uninstall )
19835486Sache
19921308SacheTAGS:	force
20026497Sache	$(ETAGS) $(CSOURCES) $(HSOURCES)
20121308Sache
20226497Sachetags:	force
20326497Sache	$(CTAGS) $(CSOURCES) $(HSOURCES)
20421308Sache
20521308Sacheclean:	force
20635486Sache	$(RM) $(OBJECTS) $(STATIC_LIBS)
20747558Sache	-( cd shlib && $(MAKE) $(MFLAGS) $@ )
20821308Sache	-( cd doc && $(MAKE) $(MFLAGS) $@ )
20935486Sache	-( cd examples && $(MAKE) $(MFLAGS) $@ )
21021308Sache
21126497Sachemostlyclean: clean
21247558Sache	-( cd shlib && $(MAKE) $(MFLAGS) $@ )
21321308Sache	-( cd doc && $(MAKE) $(MFLAGS) $@ )
21435486Sache	-( cd examples && $(MAKE) $(MFLAGS) $@ )
21526497Sache
21626497Sachedistclean maintainer-clean: clean
21747558Sache	-( cd shlib && $(MAKE) $(MFLAGS) $@ )
21826497Sache	-( cd doc && $(MAKE) $(MFLAGS) $@ )
21935486Sache	-( cd examples && $(MAKE) $(MFLAGS) $@ )
22021308Sache	$(RM) Makefile
22135486Sache	$(RM) $(CREATED_CONFIGURE)
22235486Sache	$(RM) $(CREATED_TAGS)
22321308Sache
22426497Sacheinfo dvi:
22521308Sache	-( cd doc && $(MAKE) $(MFLAGS) $@ )
22621308Sache
22726497Sacheinstall-info:
22826497Sachecheck:
22926497Sacheinstallcheck:
23026497Sache
23126497Sachedist:   force
23226497Sache	@echo Readline distributions are created using $(srcdir)/support/mkdist.
23326497Sache	@echo Here is a sample of the necessary commands:
23426497Sache	@echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION)
23526497Sache	@echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION)
23626497Sache	@echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar
23726497Sache
23826497Sache# Tell versions [3.59,3.63) of GNU make not to export all variables.
23926497Sache# Otherwise a system limit (for SysV at least) may be exceeded.
24026497Sache.NOEXPORT:
24126497Sache
24221308Sache# Dependencies
24326497Sachebind.o: ansi_stdlib.h posixstat.h
24426497Sachebind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
24547558Sachebind.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
24626497Sachebind.o: history.h
24726497Sachecallback.o: rlconf.h
24826497Sachecallback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
24947558Sachecallback.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
25026497Sachecomplete.o: ansi_stdlib.h posixdir.h posixstat.h
25126497Sachecomplete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
25247558Sachecomplete.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
25326497Sachedisplay.o: ansi_stdlib.h posixstat.h
25426497Sachedisplay.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
25526497Sachedisplay.o: tcap.h
25626497Sachedisplay.o: readline.h keymaps.h chardefs.h tilde.h
25747558Sachedisplay.o: history.h rlstdc.h
25826497Sachefunmap.o: readline.h keymaps.h chardefs.h tilde.h
25947558Sachefunmap.o: rlconf.h ansi_stdlib.h rlstdc.h
26026497Sachefunmap.o: ${BUILD_DIR}/config.h
26126497Sachehistexpand.o: ansi_stdlib.h
26247558Sachehistexpand.o: history.h histlib.h rlstdc.h
26326497Sachehistexpand.o: ${BUILD_DIR}/config.h
26426497Sachehistfile.o: ansi_stdlib.h
26547558Sachehistfile.o: history.h histlib.h rlstdc.h
26626497Sachehistfile.o: ${BUILD_DIR}/config.h
26726497Sachehistory.o: ansi_stdlib.h
26847558Sachehistory.o: history.h histlib.h rlstdc.h
26926497Sachehistory.o: ${BUILD_DIR}/config.h
27026497Sachehistsearch.o: ansi_stdlib.h
27147558Sachehistsearch.o: history.h histlib.h rlstdc.h
27226497Sachehistsearch.o: ${BUILD_DIR}/config.h
27326497Sacheinput.o: ansi_stdlib.h
27426497Sacheinput.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
27547558Sacheinput.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
27626497Sacheisearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
27726497Sacheisearch.o: readline.h keymaps.h chardefs.h tilde.h
27847558Sacheisearch.o: ansi_stdlib.h history.h rlstdc.h
27926497Sachekeymaps.o: emacs_keymap.c vi_keymap.c
28026497Sachekeymaps.o: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
28126497Sachekeymaps.o: readline.h keymaps.h chardefs.h tilde.h
28247558Sachekeymaps.o: ${BUILD_DIR}/config.h rlstdc.h
28326497Sachekill.o: ansi_stdlib.h
28426497Sachekill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
28526497Sachekill.o: readline.h keymaps.h chardefs.h tilde.h
28647558Sachekill.o: history.h rlstdc.h
28726497Sachemacro.o: ansi_stdlib.h
28826497Sachemacro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
28926497Sachemacro.o: readline.h keymaps.h chardefs.h tilde.h
29047558Sachemacro.o: history.h rlstdc.h
29126497Sachenls.o: ansi_stdlib.h
29226497Sachenls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
29326497Sacheparens.o: rlconf.h
29426497Sacheparens.o: ${BUILD_DIR}/config.h
29547558Sacheparens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
29626497Sachereadline.o: readline.h keymaps.h chardefs.h tilde.h
29726497Sachereadline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
29847558Sachereadline.o: history.h rlstdc.h
29926497Sachereadline.o: posixstat.h ansi_stdlib.h posixjmp.h
30026497Sacherltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
30126497Sacherltty.o: rltty.h
30247558Sacherltty.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
30326497Sachesearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
30426497Sachesearch.o: readline.h keymaps.h chardefs.h tilde.h
30547558Sachesearch.o: ansi_stdlib.h history.h rlstdc.h
30635486Sacheshell.o: ${BUILD_DIR}/config.h
30735486Sacheshell.o: ansi_stdlib.h
30826497Sachesignals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
30926497Sachesignals.o: readline.h keymaps.h chardefs.h tilde.h
31047558Sachesignals.o: history.h rlstdc.h
31126497Sacheterminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
31226497Sacheterminal.o: tcap.h
31326497Sacheterminal.o: readline.h keymaps.h chardefs.h tilde.h
31447558Sacheterminal.o: history.h rlstdc.h
31526497Sachetilde.o: ansi_stdlib.h
31626497Sachetilde.o: ${BUILD_DIR}/config.h
31726497Sachetilde.o: tilde.h
31826497Sacheundo.o: ansi_stdlib.h
31926497Sacheundo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
32026497Sacheundo.o: readline.h keymaps.h chardefs.h tilde.h
32147558Sacheundo.o: history.h rlstdc.h
32226497Sacheutil.o: posixjmp.h ansi_stdlib.h
32326497Sacheutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
32447558Sacheutil.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
32526497Sachevi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
32626497Sachevi_mode.o: readline.h keymaps.h chardefs.h tilde.h
32747558Sachevi_mode.o: history.h ansi_stdlib.h rlstdc.h
32826497Sachexmalloc.o: ${BUILD_DIR}/config.h
32926497Sachexmalloc.o: ansi_stdlib.h
33021308Sache
33135486Sachereadline.o: $(srcdir)/readline.c
33235486Sachevi_mode.o: $(srcdir)/vi_mode.c
33335486Sachefunmap.o: $(srcdir)/funmap.c
33435486Sachekeymaps.o: $(srcdir)/keymaps.c
33535486Sacheparens.o: $(srcdir)/parens.c
33635486Sachesearch.o: $(srcdir)/search.c
33735486Sacherltty.o: $(srcdir)/rltty.c
33835486Sachecomplete.o: $(srcdir)/complete.c
33935486Sachebind.o: $(srcdir)/bind.c
34035486Sacheisearch.o: $(srcdir)/isearch.c
34135486Sachedisplay.o: $(srcdir)/display.c
34235486Sachesignals.o: $(srcdir)/signals.c
34335486Sacheutil.o: $(srcdir)/util.c
34435486Sachekill.o: $(srcdir)/kill.c
34535486Sacheundo.o: $(srcdir)/undo.c
34635486Sachemacro.o: $(srcdir)/macro.c
34735486Sacheinput.o: $(srcdir)/input.c
34835486Sachecallback.o: $(srcdir)/callback.c
34935486Sacheterminal.o: $(srcdir)/terminal.c
35035486Sachenls.o: $(srcdir)/nls.c
35135486Sachexmalloc.o: $(srcdir)/xmalloc.c
35235486Sachehistory.o: $(srcdir)/history.c
35335486Sachehistexpand.o: $(srcdir)/histexpand.c
35435486Sachehistfile.o: $(srcdir)/histfile.c
35535486Sachehistsearch.o: $(srcdir)/histsearch.c
35647558Sachesavestring.o: $(srcdir)/savestring.c
35735486Sacheshell.o: $(srcdir)/shell.c
35835486Sachetilde.o: $(srcdir)/tilde.c
35935486Sache
36035486Sachereadline.o: readline.c
36135486Sachevi_mode.o: vi_mode.c
36235486Sachefunmap.o: funmap.c
36335486Sachekeymaps.o: keymaps.c
36435486Sacheparens.o: parens.c
36535486Sachesearch.o: search.c
36635486Sacherltty.o: rltty.c
36735486Sachecomplete.o: complete.c
36835486Sachebind.o: bind.c
36935486Sacheisearch.o: isearch.c
37035486Sachedisplay.o: display.c
37135486Sachesignals.o: signals.c
37235486Sacheutil.o: util.c
37335486Sachekill.o: kill.c
37435486Sacheundo.o: undo.c
37535486Sachemacro.o: macro.c
37635486Sacheinput.o: input.c
37735486Sachecallback.o: callback.c
37835486Sacheterminal.o: terminal.c
37935486Sachenls.o: nls.c
38035486Sachexmalloc.o: xmalloc.c
38135486Sachehistory.o: history.c
38235486Sachehistexpand.o: histexpand.c
38335486Sachehistfile.o: histfile.c
38435486Sachehistsearch.o: histsearch.c
38547558Sachesavestring.o: savestring.c
38635486Sacheshell.o: shell.c
38735486Sachetilde.o: tilde.c
388