📄 autobook_25.html
字号:
<HTML><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><!-- Created on September, 12 2004 by texi2html 1.64 --><!-- Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) Karl Berry <karl@freefriends.org> Olaf Bachmann <obachman@mathematik.uni-kl.de> and many others.Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> --><HEAD><TITLE>Autoconf, Automake, and Libtool: Generated Output Files</TITLE><META NAME="description" CONTENT="Autoconf, Automake, and Libtool: Generated Output Files"><META NAME="keywords" CONTENT="Autoconf, Automake, and Libtool: Generated Output Files"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META NAME="Generator" CONTENT="texi2html 1.64"><script language="Javascript"><!-- // Check the browser version. function checkVersion() { if (navigator.appVersion.charAt(0)>=3) return true; if (navigator.appVersion.charAt(0)>=4) return true; else return false; } if (checkVersion()) { homeon = new Image(); homeon.src = "homeon.png"; homeoff = new Image(); homeoff.src = "home.png"; tocon = new Image(); tocon.src = "tocon.png"; tocoff = new Image(); tocoff.src = "toc.png"; indexon = new Image(); indexon.src = "indexon.png"; indexoff = new Image(); indexoff.src = "index.png"; helpon = new Image(); helpon.src = "helpon.png"; helpoff = new Image(); helpoff.src = "help.png"; backon = new Image(); backon.src = "backon.png"; backoff = new Image(); backoff.src = "back.png"; forwardon = new Image(); forwardon.src = "forwardon.png"; forwardoff = new Image(); forwardoff.src = "forward.png"; prevon = new Image(); prevon.src = "prevon.png"; prevoff = new Image(); prevoff.src = "prev.png"; nexton = new Image(); nexton.src = "nexton.png"; nextoff = new Image(); nextoff.src = "next.png"; upon = new Image(); upon.src = "upon.png"; upoff = new Image(); upoff.src = "up.png"; } function img_act(imgName) { if (checkVersion()) { imgOn = eval(imgName + "on.src"); document [imgName].src = imgOn; } } function img_inact(imgName) { if (checkVersion()) { imgOff = eval(imgName + "off.src"); document [imgName].src = imgOff; } }// --></SCRIPT></HEAD><BODY LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#6688AA" VLINK="#336688" ALINK="#808080"><A NAME="SEC25"></A><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=10><TR VALIGN="TOP"><TD ALIGN="MIDDLE" WIDTH=50 BGCOLOR="#e6e6e6"><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_24.html#SEC24" onMouseover="img_act('prev')" onMouseout="img_inact('prev')"><IMG SRC="prev.png" BORDER="0" ALT="Back: User-Provided Input Files" ALIGN="MIDDLE" NAME="prev"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_26.html#SEC26" onMouseover="img_act('next')" onMouseout="img_inact('next')"><IMG SRC="next.png" BORDER="0" ALT="Forward: Maintaining Input Files" ALIGN="MIDDLE" NAME="next"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_26.html#SEC26" onMouseover="img_act('back')" onMouseout="img_inact('back')"><IMG SRC="back.png" BORDER="0" ALT="FastBack: Maintaining Input Files" ALIGN="MIDDLE" NAME="back"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_23.html#SEC23" onMouseover="img_act('up')" onMouseout="img_inact('up')"><IMG SRC="up.png" BORDER="0" ALT="Up: A Minimal GNU Autotools Project" ALIGN="MIDDLE" NAME="up"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_29.html#SEC29" onMouseover="img_act('forward')" onMouseout="img_inact('forward')"><IMG SRC="forward.png" BORDER="0" ALT="FastForward: Writing configure.in" ALIGN="MIDDLE" NAME="forward"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook.html#SEC_Top" onMouseover="img_act('home')" onMouseout="img_inact('home')"><IMG SRC="home.png" BORDER="0" ALT="Top: Autoconf, Automake, and Libtool" ALIGN="MIDDLE" NAME="home"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_toc.html#SEC_Contents" onMouseover="img_act('toc')" onMouseout="img_inact('toc')"><IMG SRC="toc.png" BORDER="0" ALT="Contents: Table of Contents" ALIGN="MIDDLE" NAME="toc"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_285.html#SEC285" onMouseover="img_act('index')" onMouseout="img_inact('index')"><IMG SRC="index.png" BORDER="0" ALT="Index: Index" ALIGN="MIDDLE" NAME="index"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_abt.html#SEC_About" onMouseover="img_act('help')" onMouseout="img_inact('help')"><IMG SRC="help.png" BORDER="0" ALT="About: About this document" ALIGN="MIDDLE" NAME="help"></A></TD></TR></TABLE></TD><TD ALIGN="LEFT"><H2> 5.2 Generated Output Files </H2><!--docid::SEC25::--><P>By studying the diagram in <A HREF="autobook_276.html#SEC276">C. Generated File Dependencies</A>, it shouldbe possible to see which commands must be run to generate the requiredoutput files from the input files shown in the last section.</P><P>First, we generate <TT>`configure'</TT>:</P><P><TABLE width=100%><tr><td> </td><td class=example bgcolor=#6688aa><br><pre>$ aclocal$ autoconf</pre></td></tr></table></P><P>Because <TT>`configure.in'</TT> contains macro invocations which are notknown to autoconf itself--<CODE>AM_INIT_AUTOMAKE</CODE> being a case inpoint, it is necessary to collect all of the macro definitions forautoconf to use when generating <TT>`configure'</TT>. This is done usingthe <CODE>aclocal</CODE> program, so called because it generates<TT>`aclocal.m4'</TT> (see section <A HREF="autobook_276.html#SEC276">C. Generated File Dependencies</A>). If you were toexamine the contents of <TT>`aclocal.m4'</TT>, you would find the definitionof the <CODE>AM_INIT_AUTOMAKE</CODE> macro contained within.</P><P>After running <CODE>autoconf</CODE>, you will find a <TT>`configure'</TT>script in the current directory. It is important to run <CODE>aclocal</CODE>first because <CODE>automake</CODE> relies on the contents of<TT>`configure.in'</TT> and <TT>`aclocal.m4'</TT>. On to <CODE>automake</CODE>:</P><P><TABLE width=100%><tr><td> </td><td class=example bgcolor=#6688aa><br><pre>$ automake --add-missingautomake: configure.in: installing ./install-shautomake: configure.in: installing ./mkinstalldirsautomake: configure.in: installing ./missingautomake: Makefile.am: installing ./INSTALLautomake: Makefile.am: required file ./NEWS not foundautomake: Makefile.am: required file ./README not foundautomake: Makefile.am: installing ./COPYINGautomake: Makefile.am: required file ./AUTHORS not foundautomake: Makefile.am: required file ./ChangeLog not found</pre></td></tr></table></P><P>The <SAMP>`--add-missing'</SAMP> option copies some boilerplate files fromyour Automake installation into the current directory. Files such as<TT>`COPYING'</TT>, which contain the GNU General Public License changeinfrequently, and so can be generated without user intervention. Anumber of utility scripts are also installed--these are used by thegenerated <TT>`Makefile'</TT>s, particularly by the <CODE>install</CODE> target.Notice that some required files are still missing. These are:</P><P><DL COMPACT><DT><TT>`NEWS'</TT><DD>A record of user-visible changes to a package. The format is notstrict, but the changes to the most recent version should appear at thetop of the file.<P><DT><TT>`README'</TT><DD>The first place a user will look to get an overview for the purpose of apackage, and perhaps special installation instructions.<P><DT><TT>`AUTHORS'</TT><DD>Lists the names, and usually mail addresses, of individuals who workedon the package.<P><DT><TT>`ChangeLog'</TT><DD>The ChangeLog is an important file--it records the changes that are madeto a package. The format of this file is quite strict(see section <A HREF="autobook_28.html#SEC28">5.5 Documentation and ChangeLogs</A>).</DL><P>For now, we'll do enough to placate Automake:</P><P><TABLE width=100%><tr><td> </td><td class=example bgcolor=#6688aa><br><pre>$ touch NEWS README AUTHORS ChangeLog$ automake --add-missing</pre></td></tr></table></P><P>Automake has now produced a <TT>`Makefile.in'</TT>. At this point, you maywish to take a snapshot of this directory before we really let loosewith automatically generated files.</P><P>By now, the contents of the directory will be looking fairly completeand reminiscent of the top-level directory of a GNU package you mayhave installed in the past:</P><P><TABLE width=100%><tr><td> </td><td class=example bgcolor=#6688aa><br><pre>AUTHORS INSTALL NEWS install-sh mkinstalldirsCOPYING Makefile.am README configure missingChangeLog Makefile.in aclocal.m4 configure.in</pre></td></tr></table></P><P>It should now be possible to package up your tree in a <CODE>tar</CODE> fileand give it to other users for them to install on their own systems.One of the <CODE>make</CODE> targets that Automake generates in<TT>`Makefile.in'</TT> makes it easy to generate distributions(see section <A HREF="autobook_99.html#SEC99">13. Rolling Distribution Tarballs</A>). A user would merely have tounpack the <CODE>tar</CODE> file, run <CODE>configure</CODE> (see section <A HREF="autobook_13.html#SEC13">3. How to run configure and make</A>) and finally type <CODE>make all</CODE>:</P><P><TABLE width=100%><tr><td> </td><td class=example bgcolor=#6688aa><br><pre>$ ./configurecreating cache ./config.cachechecking for a BSD compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking whether make sets ${MAKE}... yeschecking for working aclocal... foundchecking for working autoconf... foundchecking for working automake... foundchecking for working autoheader... foundchecking for working makeinfo... foundchecking for gcc... gccchecking whether the C compiler (gcc ) works... yeschecking whether the C compiler (gcc ) is a cross-compiler... nochecking whether we are using GNU C... yeschecking whether gcc accepts -g... yeschecking how to run the C preprocessor... gcc -Echecking for flex... flexchecking for flex... (cached) flexchecking for yywrap in -lfl... yeschecking lex output file root... lex.yychecking whether yytext is a pointer... yeschecking for bison... bison -yupdating cache ./config.cachecreating ./config.statuscreating Makefile$ make allgcc -DPACKAGE=\"foonly\" -DVERSION=\"1.0\" -DYYTEXT_POINTER=1 -I. -I. \ -g -O2 -c main.cgcc -DPACKAGE=\"foonly\" -DVERSION=\"1.0\" -DYYTEXT_POINTER=1 -I. -I. \ -g -O2 -c foo.cflex scanner.l && mv lex.yy.c scanner.cgcc -DPACKAGE=\"foonly\" -DVERSION=\"1.0\" -DYYTEXT_POINTER=1 -I. -I. \ -g -O2 -c scanner.cbison -y parser.y && mv y.tab.c parser.cif test -f y.tab.h; then \ if cmp -s y.tab.h parser.h; then rm -f y.tab.h; \ else mv y.tab.h parser.h; fi; \else :; figcc -DPACKAGE=\"foonly\" -DVERSION=\"1.0\" -DYYTEXT_POINTER=1 -I. -I. \ -g -O2 -c parser.cgcc -g -O2 -o foonly main.o foo.o scanner.o parser.o -lfl</pre></td></tr></table></P><P><A NAME="Maintaining Input Files"></A></TR></TABLE><BR> <FONT SIZE="-1">This document was generatedby <I>Gary V. Vaughan</I> on <I>September, 12 2004</I>using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html"><I>texi2html</I></A></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -