home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / autoconf-2.10-src.tgz / tar.out / fsf / autoconf / Makefile.in < prev    next >
Makefile  |  1996-09-24  |  9KB  |  285 lines

  1. # Makefile for Autoconf.
  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. INSTALL = @INSTALL@
  24. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  25. INSTALL_DATA = @INSTALL_DATA@
  26. MAKEINFO = makeinfo
  27. TEXI2DVI = texi2dvi
  28. DVIPS = dvips
  29. M4 = @M4@
  30. AWK = @AWK@
  31. PERL = @PERL@
  32.  
  33. # Programs that are ALWAYS installed (and are created in the build dir).
  34. ASCRIPTS = autoconf autoheader autoreconf autoupdate ifnames 
  35. # All programs, including those only installed if you have perl.
  36. SCRIPTS = $(ASCRIPTS) @SCRIPTS@
  37.  
  38. transform=@program_transform_name@
  39.  
  40. prefix = @prefix@
  41. exec_prefix = @exec_prefix@
  42.  
  43. # Directory in which to install scripts.
  44. bindir = @bindir@
  45.  
  46. # Directory in which to install library files.
  47. datadir = @datadir@
  48. acdatadir = $(datadir)/autoconf
  49.  
  50. # Directory in which to install documentation info files.
  51. infodir = @infodir@
  52.  
  53. # Directory in which to install documentation guide files.
  54. guidedir = @guidedir@
  55.  
  56. # Directory in which to install documentation dvi files.
  57. dvidir = $(prefix)/dvi
  58.  
  59. # Directory in which to install documentation postscript files.
  60. psdir = $(prefix)/ps
  61.  
  62. #### End of system configuration section. ####
  63.  
  64. SHELL = /bin/sh
  65.  
  66. SUBDIRS = testsuite
  67.  
  68. M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoheader.m4
  69.  
  70. # Files that can be generated, but should be up to date for a distribution.
  71. DISTDEP = info guide Makefile
  72. # Files to distribute.
  73. DISTFILES = COPYING ChangeLog ChangeLog.1 INSTALL \
  74.     Makefile.in NEWS README TODO $(M4FILES) \
  75.     acconfig.h acfunctions acheaders acidentifiers \
  76.     acmakevars acprograms autoconf.info* autoconf.guide\
  77.     autoconf.sh autoconf.texi install.texi \
  78.     autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
  79.     config.guess config.sub configure configure.in \
  80.     install-sh mkinstalldirs texinfo.tex \
  81.     testsuite/Makefile.in testsuite/config/*.exp \
  82.     testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \
  83.     standards.texi make-stds.texi standards.info* standards.guide \
  84.     autoconf.dvi autoconf.ps standards.dvi standards.ps
  85.  
  86. editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e \
  87.     's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g'
  88. editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
  89.  
  90. all: ${SCRIPTS} info guide dvi ps
  91.  
  92. .SUFFIXES:
  93. .SUFFIXES: .sh .pl
  94.  
  95. .sh:
  96.     rm -f $@ $@.tmp
  97.     $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
  98.  
  99. .pl:
  100.     rm -f $@ $@.tmp
  101.     $(editpl) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
  102.  
  103. info: autoconf.info @standards_info@ INSTALL
  104.  
  105. # Use --no-split to avoid creating filenames > 14 chars.
  106. autoconf.info: autoconf.texi install.texi
  107.     $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
  108.  
  109. INSTALL: install.texi
  110.     $(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
  111.     --no-headers --no-validate
  112.  
  113. standards.info: standards.texi make-stds.texi
  114.     $(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --no-split --output=$@
  115.  
  116. dvi: autoconf.dvi @standards_dvi@
  117.  
  118. autoconf.dvi: autoconf.texi
  119.     $(TEXI2DVI) $(srcdir)/autoconf.texi
  120.  
  121. standards.dvi: standards.texi make-stds.texi
  122.     $(TEXI2DVI) $(srcdir)/standards.texi
  123.  
  124. guide: autoconf.guide standards.guide
  125.  
  126. autoconf.guide: autoconf.texi install.texi
  127.     $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@ --amiga
  128.  
  129. standards.guide: standards.texi make-stds.texi
  130.     $(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --no-split --output=$@ --amiga
  131.  
  132. ps: autoconf.ps standards.ps
  133.  
  134. autoconf.ps: autoconf.dvi
  135.     $(DVIPS) -o $@ $?
  136.  
  137. standards.ps: standards.dvi
  138.     $(DVIPS) -o $@ $?
  139.  
  140. check: all
  141.     rootme=`pwd`; srcrootme=`cd $(srcdir); pwd`; \
  142.     test -r install-sh || cp $(srcdir)/install-sh .; \
  143.     cd testsuite && ${MAKE} $@ AUTOCONF=$$rootme/autoconf \
  144.     AUTOCONFFLAGS="-m $$srcrootme"
  145.  
  146. installcheck: all install
  147.     cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
  148.  
  149. installdirs:
  150.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(guidedir) $(dvidir) $(psdir) $(acdatadir)
  151.  
  152. install: all $(M4FILES) acconfig.h installdirs install-info install-guide install-dvi install-ps
  153.     @case `$(M4) --help < /dev/null 2>&1` in \
  154.     *reload-state*) echo installing frozen m4 files; \
  155.       $(M4) -F $(acdatadir)/autoconf.m4f -I${srcdir} ${srcdir}/autoconf.m4 ; \
  156.       $(M4) -F $(acdatadir)/autoheader.m4f -I${srcdir} ${srcdir}/autoheader.m4 ;; \
  157.     *traditional*) ;; \
  158.     *) echo Error: Autoconf requires GNU m4 1.1 or later; exit 1 ;; \
  159.     esac
  160.     for p in $(ASCRIPTS); do \
  161.       $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
  162.     done
  163.     for i in $(M4FILES) acconfig.h; do \
  164.     $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
  165.     done
  166.     -if test -f autoscan; then \
  167.     $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
  168.     for i in acfunctions acheaders acidentifiers acprograms \
  169.       acmakevars; do \
  170.     $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
  171.     done; \
  172.     else :; fi
  173.  
  174. # Don't cd, to avoid breaking install-sh references.
  175. install-info: info installdirs
  176.     if test -f autoconf.info; then \
  177.       for i in *.info*; do \
  178.         $(INSTALL_DATA) $$i $(infodir)/$$i; \
  179.       done; \
  180.     else \
  181.       for i in $(srcdir)/*.info*; do \
  182.         $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
  183.       done; \
  184.     fi
  185.  
  186. install-guide: guide installdirs
  187.     if test -f autoconf.guide; then \
  188.       for i in *.guide; do \
  189.         $(INSTALL_DATA) $$i $(guidedir)/$$i; \
  190.       done; \
  191.     else \
  192.       for i in $(srcdir)/*.guide; do \
  193.         $(INSTALL_DATA) $$i $(guidedir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
  194.       done; \
  195.     fi
  196.  
  197. install-dvi: dvi installdirs
  198.     if test -f autoconf.dvi; then \
  199.       for i in *.dvi; do \
  200.         $(INSTALL_DATA) $$i $(dvidir)/$$i; \
  201.       done; \
  202.     else \
  203.       for i in $(srcdir)/*.dvi; do \
  204.         $(INSTALL_DATA) $$i $(dvidir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
  205.       done; \
  206.     fi
  207.  
  208. install-ps: ps installdirs
  209.     if test -f autoconf.ps; then \
  210.       for i in *.ps; do \
  211.         $(INSTALL_DATA) $$i $(psdir)/$$i; \
  212.       done; \
  213.     else \
  214.       for i in $(srcdir)/*.ps; do \
  215.         $(INSTALL_DATA) $$i $(psdir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
  216.       done; \
  217.     fi
  218.  
  219. uninstall:
  220.     for p in $(SCRIPTS); do \
  221.       rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
  222.     done
  223.     rm -fr $(acdatadir)
  224.     cd $(infodir) && rm -f autoconf.info*
  225.     if test -f standards.info || test -f $(srcdir)/standards.info; \
  226.     then cd $(infodir) && rm -f standards.info*; fi
  227.     cd $(guidedir) && rm -f autoconf.guide
  228.     if test -f standards.guide || test -f $(srcdir)/standards.guide; \
  229.     then cd $(guidedir) && rm -f standards.guide; fi
  230.     cd $(dvidir) && rm -f autoconf.dvi
  231.     if test -f standards.dvi || test -f $(srcdir)/standards.dvi; \
  232.     then cd $(psdir) && rm -f standards.ps; fi
  233.     cd $(psdir) && rm -f autoconf.ps
  234.     if test -f standards.ps || test -f $(srcdir)/standards.ps; \
  235.     then cd $(psdir) && rm -f standards.ps; fi
  236.  
  237. ${srcdir}/configure: configure.in $(M4FILES)
  238.     cd $(srcdir) && \
  239.     rm -f configure configure.tmp && \
  240.     $(M4) autoconf.m4 configure.in > configure.tmp && \
  241.     chmod +x configure.tmp && mv configure.tmp configure
  242. Makefile: Makefile.in config.status
  243.     ./config.status
  244. config.status: configure
  245.     ./config.status --recheck
  246.  
  247. maintainer-clean::
  248.     @echo "This command is intended for maintainers to use;"
  249.     @echo "rebuilding the deleted files requires makeinfo."
  250.     rm -f TAGS *.info* INSTALL *.guide *.dvi *.ps
  251.  
  252. clean mostlyclean distclean maintainer-clean::
  253.     for dir in $(SUBDIRS); do \
  254.       echo making $@ in $$dir ; \
  255.       (cd $$dir && $(MAKE) $@) ; \
  256.     done
  257.  
  258. clean mostlyclean distclean maintainer-clean::
  259.     rm -f $(SCRIPTS) *.tmp 
  260.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  261.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  262.     rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
  263.  
  264. distclean maintainer-clean::
  265.     rm -f Makefile config.status config.cache config.log
  266.  
  267. TAGS:
  268.     etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi
  269.  
  270. # Don't depend on DISTFILES because there's no rule for "standards.info*".
  271. dist: $(DISTDEP)
  272.     distname=`sed -e '/define(AC_ACVERSION,/!d' \
  273.     -e 's/[^0-9.]*\([0-9.]*\).*/autoconf-\1/' -e q acgeneral.m4`; \
  274.     rm -fr $$distname; \
  275.     mkdir $$distname $$distname/testsuite $$distname/testsuite/config \
  276.     $$distname/testsuite/lib $$distname/testsuite/autoconf.g \
  277.     $$distname/testsuite/autoconf.s; \
  278.     for file in $(DISTFILES); do \
  279.       ln $$file $$distname/$$file \
  280.       || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
  281.     done; \
  282.     chmod -R a+rX $$distname; \
  283.     tar -chz -f $$distname.tar.gz $$distname; \
  284.     rm -fr $$distname
  285.