185-189.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 97 行

HTML
97
字号
<HTML>

<HEAD>

<TITLE>Linux Unleashed, Third Edition:GNU Project Utilities</TITLE>

<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0672313723//-->

<!--TITLE=Linux Unleashed, Third Edition//-->

<!--AUTHOR=Tim Parker//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Sams//-->

<!--CHAPTER=10//-->

<!--PAGES=185-189//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="../ch09/182-184.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="189-192.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 10<BR>GNU Project Utilities

</FONT></H2>

<P><I>by Peter MacKinnon</I></P>

<DL>

<DT><B>In This Chapter</B>

<DT>&#149;&nbsp;&nbsp; GNU software currently available

</DL>

<P>The GNU project, administered by the Free Software Foundation (FSF), seeks to provide software (in the form of source code) that is freely available to anyone who wants to use it. The project has a lengthy manifesto that explains the motivation behind this libertarian undertaking (for which we should all be thankful, since GNU has some of the best software around!). One of the key ideas within this manifesto is that high-quality software is an intrinsic human right, just as is the air that we breathe. Although GNU software is freely distributed, it is not public domain and is protected by the GNU General Public License. The main purpose behind the license is to keep GNU software free.

</P>

<P>For more information on the FSF, you can write to them at</P>

<DL>

<DD>Free Software Foundation

<DD>675 Massachusetts Avenue

<DD>Cambridge, MA 02139

</DL>

<P>You can also request copies of the <I>GNU Bulletin</I> by sending e-mail to <TT>gnu&#64;prep.ai.mit.edu</TT>.</P>

<P>The distribution of Linux on this book&#146;s CD-ROM comes with virtually all of the GNU programs that are currently available. They are archived using the <TT>tar</TT> program and compressed using the GNU <TT>gzip</TT> utility. <TT>gzip</TT> tends to compress better than the standard UNIX compression utility, <TT>compress</TT>. Files compressed with <TT>gzip</TT> end with a <TT>.gz</TT> suffix, whereas <TT>compress</TT> files end in <TT>.Z</TT>. However, <TT>gzip</TT> can uncompress <TT>compress</TT> files as well as its own.</P>

<P>Each of these compressed files has a version number included in its filename so that you can determine which version is most current. After you decompress and un-<TT>tar</TT> the GNU file, the program can be compiled and installed on your system. Most of the files come with their own makefile. Most of the programs are refinements of standard Linux utilities, such as <TT>make</TT> and <TT>bc</TT>.</P>

<H3><A NAME="Heading2"></A><FONT COLOR="#000077">GNU Software Currently Available</FONT></H3>

<P>So much software is developed by or made available through the Free Software Foundation that each program cannot be described in detail. The following sections have brief descriptions of the GNU utilities and programs that are included with this distribution of Linux. They are summaries based on the descriptions of the programs as supplied by GNU.

</P>

<H4 ALIGN="LEFT"><A NAME="Heading3"></A><FONT COLOR="#000077">acm</FONT></H4>

<P><TT>acm</TT> is a multiplayer aerial combat game designed for the X window system that can be played in a LAN environment. Players engage in simulated air-to-air combat against one another using missiles and cannons.</P>

<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">Autoconf</FONT></H4>

<P><TT>Autoconf</TT> generates shell scripts that can automatically configure source code packages (such as those for GNU). <TT>Autoconf</TT> creates a script for a software package from a file that lists the operating system features that the package can utilize. <TT>Autoconf</TT> requires GNU <TT>m4</TT> to generate the required macro calls for its operation.</P>

<H4 ALIGN="LEFT"><A NAME="Heading5"></A><FONT COLOR="#000077">bash</FONT></H4>

<P>The shell called <TT>bash</TT> is an enhancement of the Bourne shell (thus the name, which stands for Bourne Again Shell). It offers many of the extensions found in <TT>csh</TT> and <TT>ksh</TT>. The <TT>bash</TT> shell also has job control, <TT>csh</TT>-style command history, and command-line editing with <TT>Emacs</TT> and <TT>vi</TT> modes built in. See Chapter 11, &#147;<TT>bash</TT>.&#148;</P>

<H4 ALIGN="LEFT"><A NAME="Heading6"></A><FONT COLOR="#000077">bc</FONT></H4>

<P><TT>bc</TT> is an algebraic language that can be used interactively from a shell command line or with input files. GNU <TT>bc</TT> has a C-like syntax with several extensions, including multicharacter variable names, an <TT>else</TT> statement, and full Boolean expressions. Unlike standard <TT>bc</TT>, GNU <TT>bc</TT> does not require the separate <TT>dc</TT> program, which is another GNU calculator utility.</P>

<H4 ALIGN="LEFT"><A NAME="Heading7"></A><FONT COLOR="#000077">BFD</FONT></H4>

<P>The <I>Binary File Descriptor</I> (BFD) library allows a program that operates on object files (such as <TT>ld</TT> or <TT>gdb</TT>) to support many different formats efficiently. BFD provides a portable interface, so that only BFD needs to know the details of a particular format. One result is that all programs using BFD support formats such as <TT>a.out</TT> (default C executable) and <TT>COFF</TT>.</P>

<H4 ALIGN="LEFT"><A NAME="Heading8"></A><FONT COLOR="#000077">Binutils</FONT></H4>

<P><TT>Binutils</TT> includes a collection of development programs, including <TT>ar</TT>, <TT>c&#43;&#43;filt</TT>, <TT>demangle</TT>, <TT>gprof</TT>, <TT>ld</TT>, <TT>nlmconv</TT>, <TT>objcopy</TT>, <TT>objdump</TT>, <TT>ranlib</TT>, <TT>size</TT>, <TT>strings</TT>, and <TT>strip</TT>.</P>

<TT>Binutils</TT> Version 2 is completely rewritten to use the BFD library. The GNU linker <TT>ld</TT> emits source-line numbered error messages for multiply defined symbols and undefined references. <TT>nlmconv</TT> converts object files into Novell NetWare Loadable Modules (NLM). The <TT>objdump</TT> program can display data such as symbols from any file format understood by BFD.

<H4 ALIGN="LEFT"><A NAME="Heading9"></A><FONT COLOR="#000077">Bison</FONT></H4>

<P><TT>Bison</TT> is an upwardly compatible replacement for the parser generator <TT>yacc</TT>. <TT>Bison</TT> takes a description of tokens in the form of a grammar and generates a parser in the form of a C program.</P>

<H4 ALIGN="LEFT"><A NAME="Heading10"></A><FONT COLOR="#000077">GNU C Compiler</FONT></H4>

<P>Version 2 of the GNU C Compiler (<TT>gcc</TT>) supports three languages: C, C&#43;&#43;, and Objective-C. The language selected depends on the source file suffix or a compiler option. The runtime support required by Objective-C programs is now distributed with <TT>gcc</TT>. The GNU C Compiler is a portable optimizing compiler that supports full ANSI C, traditional C, and GNU C extensions. GNU C has been extended to support features such as nested functions and nonlocal <TT>goto</TT> statements. Also, <TT>gcc</TT> can generate object files and debugging information in a variety of formats. See Chapter 27, &#147;Programming in C,&#148; for more detailed information about C language support.</P>

<H4 ALIGN="LEFT"><A NAME="Heading11"></A><FONT COLOR="#000077">GNU C Library</FONT></H4>

<P>The GNU C library supports ANSI C and adds some extensions of its own. For example, the GNU <TT>stdio</TT> library lets you define new kinds of streams and your own <TT>printf</TT> formats.</P>

<H4 ALIGN="LEFT"><A NAME="Heading12"></A><FONT COLOR="#000077">GNU C&#43;&#43; Library</FONT></H4>

<P>The GNU C&#43;&#43; library (<TT>libg&#43;&#43;</TT>) is an extensive collection of C&#43;&#43; classes, a new <TT>iostream</TT> library for input/output routines, and support tools for use with <TT>g&#43;&#43;</TT>. Among the classes supported are multiple-precision integers and rational numbers, complex numbers, and arbitrary-length strings. Prototype files also exist for generating common container classes.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="../ch09/182-184.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="189-192.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?