home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / termcap-1.3-src.tgz / termcap-1.3-src.tar / fsf / termcap / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  4KB  |  143 lines

  1. # Makefile for GNU termcap library.
  2. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  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.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. CC = @CC@
  24. AR = @AR@
  25. AR_FLAGS = rc
  26. RANLIB = @RANLIB@
  27.  
  28. INSTALL = @INSTALL@
  29. INSTALL_DATA = @INSTALL_DATA@
  30.  
  31. MAKEINFO = makeinfo
  32.  
  33. DEFS = @DEFS@ -DTERMCAP_FILE=\"$(termcapfile)\"
  34.  
  35. CFLAGS = @CFLAGS@
  36.  
  37. prefix = @prefix@
  38. exec_prefix = @exec_prefix@
  39.  
  40. # Directory in which to install libtermcap.a.
  41. libdir = $(exec_prefix)/lib
  42.  
  43. # Directory in which to install termcap.h.
  44. includedir = $(prefix)/include
  45.  
  46. # Directory in which to optionally also install termcap.h,
  47. # so compilers besides gcc can find it by default.
  48. # If it is empty or not defined, termcap.h will only be installed in
  49. # includedir. 
  50. oldincludedir =
  51.  
  52. # Directory in which to install the documentation info files.
  53. infodir = $(prefix)/info
  54.  
  55. # File to which `install-data' should install the data file
  56. # if --enable-install-termcap was given.
  57. termcapfile = @termcapfile@
  58.  
  59. #### End of system configuration section. ####
  60.  
  61. SHELL = /bin/sh
  62.  
  63. SRCS = termcap.c tparam.c version.c
  64. OBJS = termcap.o tparam.o version.o
  65. HDRS = termcap.h
  66. DISTFILES = $(SRCS) $(HDRS) ChangeLog COPYING README INSTALL NEWS \
  67. termcap.src termcap.texi termcap.info* \
  68. texinfo.tex Makefile.in configure configure.in mkinstalldirs install-sh
  69.  
  70. all:    libtermcap.a info
  71.  
  72. check:
  73.     cd tests && make all
  74.  
  75. .c.o:
  76.     $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
  77.  
  78. install: all installdirs @installdata@
  79.     $(INSTALL_DATA) libtermcap.a $(libdir)/libtermcap.a
  80.     -$(RANLIB) $(libdir)/libtermcap.a
  81.     cd $(srcdir); $(INSTALL_DATA) termcap.h $(includedir)/termcap.h
  82.     -cd $(srcdir); test -z "$(oldincludedir)" || \
  83.       $(INSTALL_DATA) termcap.h $(oldincludedir)/termcap.h
  84.     for f in termcap.info*; \
  85.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  86.  
  87. uninstall: @uninstalldata@
  88.     rm -f $(libdir)/libtermcap.a $(includedir)/termcap.h
  89.     test -z "$(oldincludedir)" || rm -f $(oldincludedir)/termcap.h
  90.     rm -f $(infodir)/termcap.info*
  91.  
  92. # These are separate targets to avoid trashing the user's existing
  93. # termcap file unexpectedly.
  94. install-data:
  95.     $(INSTALL_DATA) ${srcdir}/termcap.src ${termcapfile}
  96.  
  97. uninstall-data:
  98.     rm -f ${termcapfile}
  99.  
  100. installdirs:
  101.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) \
  102.     $(includedir) $(infodir)
  103.  
  104. Makefile: Makefile.in config.status
  105.     $(SHELL) config.status
  106. config.status: configure
  107.     $(SHELL) config.status --recheck
  108. configure: configure.in
  109.     cd $(srcdir) && autoconf
  110.  
  111. libtermcap.a: $(OBJS)
  112.     $(AR) $(AR_FLAGS) $@ $(OBJS)
  113.     $(RANLIB) $@
  114.  
  115. info: termcap.info
  116.  
  117. termcap.info: termcap.texi
  118.     $(MAKEINFO) -I$(srcdir) $(srcdir)/termcap.texi --output=$@
  119.  
  120. TAGS:    $(SRCS)
  121.     etags $(SRCS)
  122.  
  123. clean:
  124.     rm -f *.a *.o core
  125.  
  126. mostlyclean: clean
  127.  
  128. distclean: clean
  129.     rm -f Makefile config.status config.cache config.log
  130.  
  131. maintainer-clean: distclean
  132.     @echo "This command is intended for maintainers to use;"
  133.     @echo "rebuilding the deleted files requires makeinfo."
  134.     rm -f TAGS *.info*
  135.  
  136. dist: $(DISTFILES)
  137.     echo termcap-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
  138.     rm -rf `cat .fname`
  139.     mkdir `cat .fname`
  140.     ln $(DISTFILES) `cat .fname`
  141.     tar chzf `cat .fname`.tar.gz `cat .fname`
  142.     rm -rf `cat .fname` .fname
  143.