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