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