home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / GDB / GDB-4.13 / GDB-4 / gdb-4.13 / readline / Makefile.in < prev    next >
Encoding:
Makefile  |  1994-04-16  |  7.0 KB  |  251 lines

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