2011-10-11 Sterling Augustine <saugustine@google.com>
[deliverable/binutils-gdb.git] / readline / Makefile.in
index 0ff0c313bb9647d3a8738773c92400020e23acbf..f4ed8110a29eafd0a30de937845e829b697ece9b 100644 (file)
@@ -1,25 +1,33 @@
 ## -*- text -*- ##
 # Master Makefile for the GNU readline library.
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Copyright (C) 1994-2009 Free Software Foundation, Inc.
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+#   This program is free software: you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation, either version 3 of the License, or
+#   (at your option) any later version.
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+
+#   You should have received a copy of the GNU General Public License
+#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
 RL_LIBRARY_VERSION = @LIBVERSION@
 RL_LIBRARY_NAME = readline
 
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
 srcdir = @srcdir@
-VPATH = .:@srcdir@
+VPATH = @srcdir@
 top_srcdir = @top_srcdir@
 BUILD_DIR = @BUILD_DIR@
 
@@ -35,16 +43,22 @@ RM = rm -f
 CP = cp
 MV = mv
 
+PURIFY = @PURIFY@
+
 @SET_MAKE@
 SHELL = @MAKE_SHELL@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
+datarootdir = @datarootdir@
+
 bindir = @bindir@
 libdir = @libdir@
 mandir = @mandir@
 includedir = @includedir@
+datadir = @datadir@
+localedir = @localedir@
 
 infodir = @infodir@
 
@@ -54,14 +68,14 @@ man3dir = $(mandir)/man3
 DESTDIR =
 
 # Programs to make tags files.
-ETAGS = etags -tw
+ETAGS = etags
 CTAGS = ctags -tw
 
 CFLAGS = @CFLAGS@
 LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
 CPPFLAGS = @CPPFLAGS@
 
-DEFS = @DEFS@
+DEFS = @DEFS@ @CROSS_COMPILE@
 LOCAL_DEFS = @LOCAL_DEFS@
 
 TERMCAP_LIB = @TERMCAP_LIB@
@@ -93,7 +107,7 @@ CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
           $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
           $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
           $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
-          $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
+          $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c $(srcdir)/xfree.c \
           $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
           $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
           $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \
@@ -101,17 +115,20 @@ CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
           $(srcdir)/mbutil.c
 
 # The header files for this library.
-HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
-          posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
-          ansi_stdlib.h tcap.h rlstdc.h xmalloc.h rlprivate.h rlshell.h \
-          rltypedefs.h rlmbutil.h
+HSOURCES = $(srcdir)/readline.h $(srcdir)/rldefs.h $(srcdir)/chardefs.h \
+          $(srcdir)/keymaps.h $(srcdir)/history.h $(srcdir)/histlib.h \
+          $(srcdir)/posixstat.h $(srcdir)/posixdir.h $(srcdir)/posixjmp.h \
+          $(srcdir)/tilde.h $(srcdir)/rlconf.h $(srcdir)/rltty.h \
+          $(srcdir)/ansi_stdlib.h $(srcdir)/tcap.h $(srcdir)/rlstdc.h \
+          $(srcdir)/xmalloc.h $(srcdir)/rlprivate.h $(srcdir)/rlshell.h \
+          $(srcdir)/rltypedefs.h $(srcdir)/rlmbutil.h
 
 HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o
 TILDEOBJ = tilde.o
 OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
          rltty.o complete.o bind.o isearch.o display.o signals.o \
          util.o kill.o undo.o macro.o input.o callback.o terminal.o \
-         text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
+         text.o nls.o misc.o compat.o xfree.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
 
 # The texinfo files which document this library.
 DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
@@ -142,9 +159,9 @@ libreadline.a: $(OBJECTS)
        $(AR) $(ARFLAGS) $@ $(OBJECTS)
        -test -n "$(RANLIB)" && $(RANLIB) $@
 
-libhistory.a: $(HISTOBJ) xmalloc.o
+libhistory.a: $(HISTOBJ) xmalloc.o xfree.o
        $(RM) $@
-       $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
+       $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o
        -test -n "$(RANLIB)" && $(RANLIB) $@
 
 # Since tilde.c is shared between readline and bash, make sure we compile
@@ -154,7 +171,7 @@ tilde.o:    tilde.c
        $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
 
 readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
-       $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB}
+       $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -o $@ $(top_srcdir)/examples/rl.c ./libreadline.a ${TERMCAP_LIB}
 
 lint:  force
        $(MAKE) $(MFLAGS) CCFLAGS='$(GCC_LINT_CFLAGS)' static
@@ -194,6 +211,18 @@ examples: force
 
 force:
 
+## GDB LOCAL
+## Don't mess with people's installed readline's.
+## This tries to install this version of readline over whatever
+## version is already installed on the system (which could be a
+## newer version). There is no real reason for us to install
+## readline along with GDB. GDB links statically against readline,
+## so it doesn't depend on us installing it on the system.
+
+install:
+
+#install:      $(INSTALL_TARGETS)
+
 install-headers: installdirs ${INSTALLED_HEADERS}
        for f in ${INSTALLED_HEADERS}; do \
                $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/readline ; \
@@ -205,45 +234,53 @@ uninstall-headers:
 
 maybe-uninstall-headers: uninstall-headers
 
-install:       $(INSTALL_TARGETS)
-
-install-static: installdirs $(STATIC_LIBS) install-headers
+install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples
        -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
        $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
        -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
        -$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old
        $(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
        -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a
-       -( if test -d doc ; then \
-               cd doc && \
-               ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
-         fi )
 
-installdirs: $(srcdir)/support/mkdirs
-       -$(SHELL) $(srcdir)/support/mkdirs $(DESTDIR)$(includedir) \
+installdirs: $(srcdir)/support/mkinstalldirs
+       -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \
                $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \
                $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir)
 
-uninstall: uninstall-headers
+uninstall: uninstall-headers uninstall-doc uninstall-examples
        -test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \
                ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
-       -( if test -d doc ; then \
-               cd doc && \
-               ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} $@; \
-         fi )
        -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
-install-shared: installdirs install-headers shared
+install-shared: installdirs install-headers shared install-doc
        -( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
-
+       
 uninstall-shared: maybe-uninstall-headers
        -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
+install-examples: installdirs install-headers shared
+       -( cd examples ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
+       
+uninstall-examples: maybe-uninstall-headers
+       -( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
+
+install-doc:   installdirs
+       -( if test -d doc ; then \
+               cd doc && \
+               ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
+         fi )
+
+uninstall-doc:
+       -( if test -d doc ; then \
+               cd doc && \
+               ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} uninstall; \
+         fi )
+
 TAGS:  force
-       $(ETAGS) $(CSOURCES) $(HSOURCES)
+       -( cd $(srcdir) && $(ETAGS) $(CSOURCES) $(HSOURCES) )
 
 tags:  force
-       $(CTAGS) $(CSOURCES) $(HSOURCES)
+       -( cd $(srcdir) && $(CTAGS) $(CSOURCES) $(HSOURCES) )
 
 clean: force
        $(RM) $(OBJECTS) $(STATIC_LIBS)
@@ -265,10 +302,14 @@ distclean maintainer-clean: clean
        $(RM) $(CREATED_CONFIGURE)
        $(RM) $(CREATED_TAGS)
 
-info dvi:
+info dvi html pdf ps:
        -( cd doc && $(MAKE) $(MFLAGS) $@ )
 
 install-info:
+install-dvi:
+install-html:
+install-pdf:
+install-ps:
 check:
 installcheck:
 
@@ -380,6 +421,8 @@ util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
 vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
 vi_mode.o: history.h ansi_stdlib.h rlstdc.h
+xfree.o: ${BUILD_DIR}/config.h
+xfree.o: ansi_stdlib.h readline.h
 xmalloc.o: ${BUILD_DIR}/config.h
 xmalloc.o: ansi_stdlib.h
 
@@ -414,6 +457,7 @@ util.o: rlprivate.h
 vi_mode.o: rlprivate.h
 
 bind.o: xmalloc.h
+callback.o: xmalloc.h
 complete.o: xmalloc.h
 display.o: xmalloc.h
 funmap.o: xmalloc.h
@@ -437,6 +481,7 @@ tilde.o: xmalloc.h
 undo.o: xmalloc.h
 util.o: xmalloc.h
 vi_mode.o: xmalloc.h
+xfree.o: xmalloc.h
 xmalloc.o: xmalloc.h
 
 complete.o: rlmbutil.h
@@ -478,6 +523,7 @@ tilde.o: $(srcdir)/tilde.c
 undo.o: $(srcdir)/undo.c
 util.o: $(srcdir)/util.c
 vi_mode.o: $(srcdir)/vi_mode.c
+xfree.o: $(srcdir)/xfree.c
 xmalloc.o: $(srcdir)/xmalloc.c
 
 histexpand.o: $(srcdir)/histexpand.c
@@ -512,6 +558,7 @@ tilde.o: tilde.c
 undo.o: undo.c
 util.o: util.c
 vi_mode.o: vi_mode.c
+xfree.o: xfree.c
 xmalloc.o: xmalloc.c
 
 histexpand.o: histexpand.c
This page took 0.039699 seconds and 4 git commands to generate.