home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / texinfo-3.7-src.tgz / tar.out / fsf / texinfo / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  6KB  |  212 lines

  1. # Makefile for Texinfo distribution.    -*- Indented-Text -*-
  2. # Copyright (C) 1993 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH  = $(srcdir):$(common)
  22.  
  23. common = $(srcdir)/libtxi
  24.  
  25. CC = @CC@
  26.  
  27. INSTALL = @INSTALL@
  28. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  29. INSTALL_DATA = @INSTALL_DATA@
  30.  
  31. LN    = ln
  32. RM    = rm -f
  33. TAR    = tar
  34. MKDIR    = mkdir
  35.  
  36. DEFS = @DEFS@
  37. LIBS = @LIBS@
  38. LOADLIBES = $(LIBS)
  39.  
  40. ALLOCA = @ALLOCA@
  41.  
  42. SHELL = /bin/sh
  43.  
  44. CFLAGS = @CFLAGS@
  45. LDFLAGS = @LDFLAGS@
  46.  
  47. prefix = @prefix@
  48. exec_prefix = @exec_prefix@
  49. bindir = $(exec_prefix)/bin
  50. # Prefix for each installed program, normally empty or `g'.
  51. binprefix = 
  52. libdir = $(prefix)/lib
  53. # Prefix for each installed man page, normally empty or `g'.
  54. manprefix = 
  55. mandir = $(prefix)/man/man1
  56. manext = 1
  57. infodir = $(prefix)/info
  58. guidedir = $(prefix)/guide
  59.  
  60. # For info program. 
  61. DEFAULT_INFOPATH = $(infodir):.
  62.  
  63. #### End of system configuration section. ####
  64.  
  65. VERSION = 3.7
  66. DISTNAME = texinfo-$(VERSION)
  67.  
  68. # Subdirectories that have makefiles
  69. SUBDIRS = libtxi makeinfo info util emacs
  70.  
  71. # All subdirectories that go into a distribution
  72. ALL_SUBDIRS = $(SUBDIRS) makeinfo/macros
  73.  
  74. MDEFINES = bindir='$(bindir)' mandir='$(mandir)' manext='$(manext)' \
  75.     prefix='$(prefix)' binprefix='$(binprefix)' \
  76.     manprefix='$(manprefix)' infodir='$(infodir)' CFLAGS='$(CFLAGS)' \
  77.     CC='$(CC)' ALLOCA='$(ALLOCA)' LDFLAGS='$(LDFLAGS)' \
  78.     DEFAULT_INFOPATH='$(DEFAULT_INFOPATH)'
  79.  
  80. all: sub-all texinfo
  81.  
  82. install: all installdirs
  83.     for dir in $(SUBDIRS); do \
  84.        echo making $@ in $$dir; \
  85.        (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
  86.     done
  87.     d=$(srcdir); test -f ./texinfo.info && d=.; \
  88.     (cd $$d; \
  89.       for f in texinfo.info* ; do \
  90.         $(INSTALL_DATA) $$f $(infodir)/$$f; \
  91.       done)
  92.     d=$(srcdir); test -f ./texinfo.guide && d=.; \
  93.     (cd $$d; \
  94.       for f in texinfo.guide ; do \
  95.         $(INSTALL_DATA) $$f $(guidedir)/$$f; \
  96.       done)      
  97.  
  98. installdirs:
  99.     -sh $(srcdir)/util/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(guidedir) $(mandir)
  100.  
  101. uninstall:
  102.     for dir in $(SUBDIRS); do \
  103.       echo making $@ in $$dir; \
  104.       (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
  105.     done
  106.     $(RM) $(infodir)/texinfo.info* $(guidedir)/texinfo.guide
  107.  
  108. Makefile: Makefile.in config.status
  109.     sh ./config.status
  110.  
  111. config.status: configure
  112.     sh ./config.status --recheck
  113.  
  114. configure: configure.in
  115.     cd $(srcdir); autoconf
  116.  
  117. sub-all TAGS:
  118.     for dir in $(SUBDIRS); do \
  119.       echo making $@ in $$dir; \
  120.       (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
  121.     done
  122.  
  123. clean mostlyclean:
  124.     for dir in $(SUBDIRS); do \
  125.       echo making $@ in $$dir; \
  126.       (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
  127.     done
  128.  
  129. distclean: clean texclean
  130.     for dir in $(SUBDIRS); do \
  131.       echo making $@ in $$dir; \
  132.       (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
  133.     done
  134.     $(RM) Makefile *.status *.cache *.log texinfo texinfo-?    texinfo-?? *.guide
  135.  
  136. texclean:
  137.     $(RM) *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
  138.     $(RM) *.toc *.tp *.tps *.vr *.vrs
  139.  
  140. realclean: distclean
  141.  
  142. texinfo: sub-all
  143.     ./makeinfo/makeinfo -I$(srcdir) $(srcdir)/texinfo.texi -o texinfo.info
  144.     ./makeinfo/makeinfo --amiga-39 -I$(srcdir) $(srcdir)/texinfo.texi -o texinfo.guide
  145.  
  146. texinfo.dvi:
  147.     PATH="$(srcdir)/util:$${PATH}" TEXINPUTS="$(srcdir):$(common):$${TEXINPUTS}" texi2dvi $(srcdir)/texinfo.texi
  148.  
  149. dist: DISTFILES
  150.     $(RM) -rf $(DISTNAME)
  151.     $(MKDIR) $(DISTNAME)
  152.     for d in `find . -type d ! -name RCS -print`; do \
  153.       d=`echo $$d | grep -v '='`; \
  154.       if [ "$$d" != "" ]; then \
  155.         if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
  156.           mkdir $(DISTNAME)/$$d; \
  157.         fi; \
  158.       fi; \
  159.     done
  160.     for f in `cat DISTFILES`; do \
  161.        $(LN) $(srcdir)/$$f $(DISTNAME)/$$f || \
  162.         { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
  163.     done
  164.     (cd $(DISTNAME); $(MAKE) $(MFLAGS) distclean)
  165.     $(TAR) chvf - $(DISTNAME) | gzip >$(DISTNAME).tar.gz
  166.     $(RM) -rf $(DISTNAME)
  167.  
  168. # Gets rid of most of the unwanted files.  Verify manually (if necessary)
  169. # that this produces a list of all the files desired in the distribution. 
  170. DISTFILES: force
  171.     (cd $(srcdir); find . ! -type d -print) \
  172.     | sed  '/\/RCS\//d; \
  173.            /\/EMACS-BACKUPS\//d; \
  174.            /\.tar.*/d; \
  175.            /~$$/d; /\.o$$/d; \
  176.            /\.orig$$/d; \
  177.            /\#$$/d; \
  178.            /\/info\/info$$/d; \
  179.            /\.info$$/d; \
  180.            /\.elc/d; \
  181.            /\/makeinfo\/makeinfo$$/d; \
  182.            /\/$(DISTNAME)\/.*$$/d; \
  183.            /\/util\/texindex$$/d; \
  184.            /texinfo$$/d; \
  185.            /texinfo-[0-9]+$$/d; \
  186.            /\/.*\.BAK$$/d; \
  187.            /\/.*\.a$$/d; \
  188.            /\/core$$/d; \
  189.            /\/*\.core$$/d; \
  190.            /\/core\..*$$/d; \
  191.            /\/a.out$$/d; \
  192.            /\/=/d; \
  193.            /\/conftest\.c$$/d; \
  194.            /\/DISTFILES$$/d; \
  195.            /\/foo$$/d; \
  196.            /\/bar$$/d; \
  197.            /\.toc$$/d; \
  198.            /\.aux$$/d; /\.log$$/d; \
  199.            /\.cps$$/d; /\.cp$$/d; \
  200.            /\.fns$$/d; /\.fn$$/d; \
  201.            /\.tps$$/d; /\.tp$$/d; \
  202.            /\.vrs$$/d; /\.vr$$/d; \
  203.            /\.pgs$$/d; /\.pg$$/d; \
  204.            /\.kys$$/d; /\.ky$$/d; \
  205.            s/^.\///; /^\.$$/d;' \
  206.     | sort | uniq > DISTFILES
  207.  
  208. force:
  209.  
  210. # Prevent GNU make v3 from overflowing arg limit on SysV.
  211. .NOEXPORT:
  212.