home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / autoconf.10 / autoconf / autoconf-2.10 / standards.info < prev    next >
Encoding:
GNU Info File  |  1996-05-07  |  104.6 KB  |  3,302 lines

  1. This is Info file standards.info, produced by Makeinfo-1.63 from the
  2. input file ./standards.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * Standards: (standards).        GNU coding standards.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996 Free
  9. Software Foundation, Inc.
  10.  
  11.    Permission is granted to make and distribute verbatim copies of this
  12. manual provided the copyright notice and this permission notice are
  13. preserved on all copies.
  14.  
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided that
  17. the entire resulting derived work is distributed under the terms of a
  18. permission notice identical to this one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that this permission notice may be stated in a
  23. translation approved by the Free Software Foundation.
  24.  
  25. 
  26. File: standards.info,  Node: Top,  Next: Preface,  Prev: (dir),  Up: (dir)
  27.  
  28. Version
  29. *******
  30.  
  31.    Last updated 27 February 1996.
  32.  
  33. * Menu:
  34.  
  35. * Preface::            About the GNU Coding Standards
  36. * Intellectual Property::       Keeping Free Software Free
  37. * Design Advice::               General Program Design
  38. * Program Behavior::            Program Behavior for All Programs
  39. * Writing C::                   Making The Best Use of C
  40. * Documentation::        Documenting Programs
  41. * Managing Releases::           The Release Process
  42.  
  43. 
  44. File: standards.info,  Node: Preface,  Next: Intellectual Property,  Prev: Top,  Up: Top
  45.  
  46. About the GNU Coding Standards
  47. ******************************
  48.  
  49.    The GNU Coding Standards were written by Richard Stallman and other
  50. GNU Project volunteers.  Their purpose is to make the GNU system clean,
  51. consistent, and easy to install.  This document can also be read as a
  52. guide to writing portable, robust and reliable programs.  It focuses on
  53. programs written in C, but many of the rules and principles are useful
  54. even if you write in another programming language.  The rules often
  55. state reasons for writing in a certain way.
  56.  
  57.    Corrections or suggestions regarding this document should be sent to
  58. `gnu@prep.ai.mit.edu'.  If you make a suggestion, please include a
  59. suggested new wording for it; our time is limited.  We prefer a context
  60. diff to the `standards.texi' or `make-stds.texi' files, but if you
  61. don't have those files, please mail your suggestion anyway.
  62.  
  63.    This release of the GNU Coding Standards was last updated 27
  64. February 1996.
  65.  
  66. 
  67. File: standards.info,  Node: Intellectual Property,  Next: Design Advice,  Prev: Preface,  Up: Top
  68.  
  69. Keeping Free Software Free
  70. **************************
  71.  
  72.    This node discusses how you can make sure that GNU software remains
  73. unencumbered.
  74.  
  75. * Menu:
  76.  
  77. * Reading Non-Free Code::    Referring to Proprietary Programs
  78. * Contributions::        Accepting Contributions
  79.  
  80. 
  81. File: standards.info,  Node: Reading Non-Free Code,  Next: Contributions,  Up: Intellectual Property
  82.  
  83. Referring to Proprietary Programs
  84. =================================
  85.  
  86.    Don't in any circumstances refer to Unix source code for or during
  87. your work on GNU!  (Or to any other proprietary programs.)
  88.  
  89.    If you have a vague recollection of the internals of a Unix program,
  90. this does not absolutely mean you can't write an imitation of it, but
  91. do try to organize the imitation internally along different lines,
  92. because this is likely to make the details of the Unix version
  93. irrelevant and dissimilar to your results.
  94.  
  95.    For example, Unix utilities were generally optimized to minimize
  96. memory use; if you go for speed instead, your program will be very
  97. different.  You could keep the entire input file in core and scan it
  98. there instead of using stdio.  Use a smarter algorithm discovered more
  99. recently than the Unix program.  Eliminate use of temporary files.  Do
  100. it in one pass instead of two (we did this in the assembler).
  101.  
  102.    Or, on the contrary, emphasize simplicity instead of speed.  For some
  103. applications, the speed of today's computers makes simpler algorithms
  104. adequate.
  105.  
  106.    Or go for generality.  For example, Unix programs often have static
  107. tables or fixed-size strings, which make for arbitrary limits; use
  108. dynamic allocation instead.  Make sure your program handles NULs and
  109. other funny characters in the input files.  Add a programming language
  110. for extensibility and write part of the program in that language.
  111.  
  112.    Or turn some parts of the program into independently usable
  113. libraries.  Or use a simple garbage collector instead of tracking
  114. precisely when to free memory, or use a new GNU facility such as
  115. obstacks.
  116.  
  117. 
  118. File: standards.info,  Node: Contributions,  Prev: Reading Non-Free Code,  Up: Intellectual Property
  119.  
  120. Accepting Contributions
  121. =======================
  122.  
  123.    If someone else sends you a piece of code to add to the program you
  124. are working on, we need legal papers to use it--the same sort of legal
  125. papers we will need to get from you.  *Each* significant contributor to
  126. a program must sign some sort of legal papers in order for us to have
  127. clear title to the program.  The main author alone is not enough.
  128.  
  129.    So, before adding in any contributions from other people, tell us so
  130. we can arrange to get the papers.  Then wait until we tell you that we
  131. have received the signed papers, before you actually use the
  132. contribution.
  133.  
  134.    This applies both before you release the program and afterward.  If
  135. you receive diffs to fix a bug, and they make significant changes, we
  136. need legal papers for it.
  137.  
  138.    You don't need papers for changes of a few lines here or there, since
  139. they are not significant for copyright purposes.  Also, you don't need
  140. papers if all you get from the suggestion is some ideas, not actual code
  141. which you use.  For example, if you write a different solution to the
  142. problem, you don't need to get papers.
  143.  
  144.    We know this is frustrating; it's frustrating for us as well.  But if
  145. you don't wait, you are going out on a limb--for example, what if the
  146. contributor's employer won't sign a disclaimer?  You might have to take
  147. that code out again!
  148.  
  149.    The very worst thing is if you forget to tell us about the other
  150. contributor.  We could be very embarrassed in court some day as a
  151. result.
  152.  
  153. 
  154. File: standards.info,  Node: Design Advice,  Next: Program Behavior,  Prev: Intellectual Property,  Up: Top
  155.  
  156. General Program Design
  157. **********************
  158.  
  159.    This node discusses some of the issues you should take into account
  160. when designing your program.
  161.  
  162. * Menu:
  163.  
  164. * Compatibility::        Compatibility with other implementations
  165. * Using Extensions::        Using non-standard features
  166. * ANSI C::                      Using ANSI C features
  167. * Source Language::        Using languages other than C
  168.  
  169. 
  170. File: standards.info,  Node: Compatibility,  Next: Using Extensions,  Up: Design Advice
  171.  
  172. Compatibility with Other Implementations
  173. ========================================
  174.  
  175.    With occasional exceptions, utility programs and libraries for GNU
  176. should be upward compatible with those in Berkeley Unix, and upward
  177. compatible with ANSI C if ANSI C specifies their behavior, and upward
  178. compatible with POSIX if POSIX specifies their behavior.
  179.  
  180.    When these standards conflict, it is useful to offer compatibility
  181. modes for each of them.
  182.  
  183.    ANSI C and POSIX prohibit many kinds of extensions.  Feel free to
  184. make the extensions anyway, and include a `--ansi', `--posix', or
  185. `--compatible' option to turn them off.  However, if the extension has
  186. a significant chance of breaking any real programs or scripts, then it
  187. is not really upward compatible.  Try to redesign its interface.
  188.  
  189.    Many GNU programs suppress extensions that conflict with POSIX if the
  190. environment variable `POSIXLY_CORRECT' is defined (even if it is
  191. defined with a null value).  Please make your program recognize this
  192. variable if appropriate.
  193.  
  194.    When a feature is used only by users (not by programs or command
  195. files), and it is done poorly in Unix, feel free to replace it
  196. completely with something totally different and better.  (For example,
  197. `vi' is replaced with Emacs.)  But it is nice to offer a compatible
  198. feature as well.  (There is a free `vi' clone, so we offer it.)
  199.  
  200.    Additional useful features not in Berkeley Unix are welcome.
  201. Additional programs with no counterpart in Unix may be useful, but our
  202. first priority is usually to duplicate what Unix already has.
  203.  
  204. 
  205. File: standards.info,  Node: Using Extensions,  Next: ANSI C,  Prev: Compatibility,  Up: Design Advice
  206.  
  207. Using Non-standard Features
  208. ===========================
  209.  
  210.    Many GNU facilities that already exist support a number of convenient
  211. extensions over the comparable Unix facilities.  Whether to use these
  212. extensions in implementing your program is a difficult question.
  213.  
  214.    On the one hand, using the extensions can make a cleaner program.
  215. On the other hand, people will not be able to build the program unless
  216. the other GNU tools are available.  This might cause the program to
  217. work on fewer kinds of machines.
  218.  
  219.    With some extensions, it might be easy to provide both alternatives.
  220. For example, you can define functions with a "keyword" `INLINE' and
  221. define that as a macro to expand into either `inline' or nothing,
  222. depending on the compiler.
  223.  
  224.    In general, perhaps it is best not to use the extensions if you can
  225. straightforwardly do without them, but to use the extensions if they
  226. are a big improvement.
  227.  
  228.    An exception to this rule are the large, established programs (such
  229. as Emacs) which run on a great variety of systems.  Such programs would
  230. be broken by use of GNU extensions.
  231.  
  232.    Another exception is for programs that are used as part of
  233. compilation: anything that must be compiled with other compilers in
  234. order to bootstrap the GNU compilation facilities.  If these require
  235. the GNU compiler, then no one can compile them without having them
  236. installed already.  That would be no good.
  237.  
  238. 
  239. File: standards.info,  Node: ANSI C,  Next: Source Language,  Prev: Using Extensions,  Up: Design Advice
  240.  
  241. ANSI C and pre-ANSI C
  242. =====================
  243.  
  244.    Do not ever use the "trigraph" feature of ANSI C.
  245.  
  246.    ANSI C is widespread enough now that it is ok to write new programs
  247. that use ANSI C features (and therefore will not work in non-ANSI
  248. compilers).  And if a program is already written in ANSI C, there's no
  249. need to convert it to support non-ANSI compilers.
  250.  
  251.    However, it is easy to support non-ANSI compilers in most programs,
  252. so you might still consider doing so when you write a program.  Instead
  253. of writing function definitions in ANSI prototype form,
  254.  
  255.      int
  256.      foo (int x, int y)
  257.      ...
  258.  
  259. write the definition in pre-ANSI style like this,
  260.  
  261.      int
  262.      foo (x, y)
  263.           int x, y;
  264.      ...
  265.  
  266. and use a separate declaration to specify the argument prototype:
  267.  
  268.      int foo (int, int);
  269.  
  270.    You need such a declaration anyway, in a header file, to get the
  271. benefit of ANSI C prototypes in all the files where the function is
  272. called.  And once you have it, you lose nothing by writing the function
  273. definition in the pre-ANSI style.
  274.  
  275.    If you don't know non-ANSI C, there's no need to learn it; just
  276. write in ANSI C.
  277.  
  278. 
  279. File: standards.info,  Node: Source Language,  Prev: ANSI C,  Up: Design Advice
  280.  
  281. Using Languages Other Than C
  282. ============================
  283.  
  284.    Using a language other than C is like using a non-standard feature:
  285. it will cause trouble for users.  Even if GCC supports the other
  286. language, users may find it inconvenient to have to install the
  287. compiler for that other language in order to build your program.  So
  288. please write in C.
  289.  
  290.    There are three exceptions for this rule:
  291.  
  292.    * It is okay to use a special language if the same program contains
  293.      an interpreter for that language.
  294.  
  295.      For example, if your program links with GUILE, it is ok to write
  296.      part of the program in Scheme or another language supported by
  297.      GUILE.
  298.  
  299.    * It is okay to use another language in a tool specifically intended
  300.      for use with that language.
  301.  
  302.      This is okay because the only people who want to build the tool
  303.      will be those who have installed the other language anyway.
  304.  
  305.    * If an application is not of extremely widespread interest, then
  306.      perhaps it's not important if the application is inconvenient to
  307.      install.
  308.  
  309. 
  310. File: standards.info,  Node: Program Behavior,  Next: Writing C,  Prev: Design Advice,  Up: Top
  311.  
  312. Program Behavior for All Programs
  313. *********************************
  314.  
  315.    This node describes how to write robust software. It also describes
  316. general standards for error messages, the command line interface, and
  317. how libraries should behave.
  318.  
  319. * Menu:
  320.  
  321. * Semantics::            Writing robust programs
  322. * Libraries::            Library behavior
  323. * Errors::            Formatting error messages
  324. * User Interfaces::        Standards for command line interfaces
  325. * Memory Usage::                When and how to care about memory needs
  326.  
  327. 
  328. File: standards.info,  Node: Semantics,  Next: Libraries,  Up: Program Behavior
  329.  
  330. Writing Robust Programs
  331. =======================
  332.  
  333.    Avoid arbitrary limits on the length or number of *any* data
  334. structure, including file names, lines, files, and symbols, by
  335. allocating all data structures dynamically.  In most Unix utilities,
  336. "long lines are silently truncated".  This is not acceptable in a GNU
  337. utility.
  338.  
  339.    Utilities reading files should not drop NUL characters, or any other
  340. nonprinting characters *including those with codes above 0177*.  The
  341. only sensible exceptions would be utilities specifically intended for
  342. interface to certain types of printers that can't handle those
  343. characters.
  344.  
  345.    Check every system call for an error return, unless you know you
  346. wish to ignore errors.  Include the system error text (from `perror' or
  347. equivalent) in *every* error message resulting from a failing system
  348. call, as well as the name of the file if any and the name of the
  349. utility.  Just "cannot open foo.c" or "stat failed" is not sufficient.
  350.  
  351.    Check every call to `malloc' or `realloc' to see if it returned
  352. zero.  Check `realloc' even if you are making the block smaller; in a
  353. system that rounds block sizes to a power of 2, `realloc' may get a
  354. different block if you ask for less space.
  355.  
  356.    In Unix, `realloc' can destroy the storage block if it returns zero.
  357. GNU `realloc' does not have this bug: if it fails, the original block
  358. is unchanged.  Feel free to assume the bug is fixed.  If you wish to
  359. run your program on Unix, and wish to avoid lossage in this case, you
  360. can use the GNU `malloc'.
  361.  
  362.    You must expect `free' to alter the contents of the block that was
  363. freed.  Anything you want to fetch from the block, you must fetch before
  364. calling `free'.
  365.  
  366.    If `malloc' fails in a noninteractive program, make that a fatal
  367. error.  In an interactive program (one that reads commands from the
  368. user), it is better to abort the command and return to the command
  369. reader loop.  This allows the user to kill other processes to free up
  370. virtual memory, and then try the command again.
  371.  
  372.    Use `getopt_long' to decode arguments, unless the argument syntax
  373. makes this unreasonable.
  374.  
  375.    When static storage is to be written in during program execution, use
  376. explicit C code to initialize it.  Reserve C initialized declarations
  377. for data that will not be changed.
  378.  
  379.    Try to avoid low-level interfaces to obscure Unix data structures
  380. (such as file directories, utmp, or the layout of kernel memory), since
  381. these are less likely to work compatibly.  If you need to find all the
  382. files in a directory, use `readdir' or some other high-level interface.
  383. These will be supported compatibly by GNU.
  384.  
  385.    By default, the GNU system will provide the signal handling
  386. functions of BSD and of POSIX.  So GNU software should be written to use
  387. these.
  388.  
  389.    In error checks that detect "impossible" conditions, just abort.
  390. There is usually no point in printing any message.  These checks
  391. indicate the existence of bugs.  Whoever wants to fix the bugs will have
  392. to read the source code and run a debugger.  So explain the problem with
  393. comments in the source.  The relevant data will be in variables, which
  394. are easy to examine with the debugger, so there is no point moving them
  395. elsewhere.
  396.  
  397.    Do not use a count of errors as the exit status for a program.
  398. *That does not work*, because exit status values are limited to 8 bits
  399. (0 through 255).  A single run of the program might have 256 errors; if
  400. you try to return 256 as the exit status, the parent process will see 0
  401. as the status, and it will appear that the program succeeded.
  402.  
  403.    If you make temporary files, check the `TMPDIR' environment
  404. variable; if that variable is defined, use the specified directory
  405. instead of `/tmp'.
  406.  
  407. 
  408. File: standards.info,  Node: Libraries,  Next: Errors,  Prev: Semantics,  Up: Program Behavior
  409.  
  410. Library Behavior
  411. ================
  412.  
  413.    Try to make library functions reentrant.  If they need to do dynamic
  414. storage allocation, at least try to avoid any nonreentrancy aside from
  415. that of `malloc' itself.
  416.  
  417.    Here are certain name conventions for libraries, to avoid name
  418. conflicts.
  419.  
  420.    Choose a name prefix for the library, more than two characters long.
  421. All external function and variable names should start with this prefix.
  422. In addition, there should only be one of these in any given library
  423. member.  This usually means putting each one in a separate source file.
  424.  
  425.    An exception can be made when two external symbols are always used
  426. together, so that no reasonable program could use one without the
  427. other; then they can both go in the same file.
  428.  
  429.    External symbols that are not documented entry points for the user
  430. should have names beginning with `_'.  They should also contain the
  431. chosen name prefix for the library, to prevent collisions with other
  432. libraries.  These can go in the same files with user entry points if
  433. you like.
  434.  
  435.    Static functions and variables can be used as you like and need not
  436. fit any naming convention.
  437.  
  438. 
  439. File: standards.info,  Node: Errors,  Next: User Interfaces,  Prev: Libraries,  Up: Program Behavior
  440.  
  441. Formatting Error Messages
  442. =========================
  443.  
  444.    Error messages from compilers should look like this:
  445.  
  446.      SOURCE-FILE-NAME:LINENO: MESSAGE
  447.  
  448.    Error messages from other noninteractive programs should look like
  449. this:
  450.  
  451.      PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE
  452.  
  453. when there is an appropriate source file, or like this:
  454.  
  455.      PROGRAM: MESSAGE
  456.  
  457. when there is no relevant source file.
  458.  
  459.    In an interactive program (one that is reading commands from a
  460. terminal), it is better not to include the program name in an error
  461. message.  The place to indicate which program is running is in the
  462. prompt or with the screen layout.  (When the same program runs with
  463. input from a source other than a terminal, it is not interactive and
  464. would do best to print error messages using the noninteractive style.)
  465.  
  466.    The string MESSAGE should not begin with a capital letter when it
  467. follows a program name and/or file name.  Also, it should not end with
  468. a period.
  469.  
  470.    Error messages from interactive programs, and other messages such as
  471. usage messages, should start with a capital letter.  But they should not
  472. end with a period.
  473.  
  474. 
  475. File: standards.info,  Node: User Interfaces,  Next: Memory Usage,  Prev: Errors,  Up: Program Behavior
  476.  
  477. Standards for Command Line Interfaces
  478. =====================================
  479.  
  480.    Please don't make the behavior of a utility depend on the name used
  481. to invoke it.  It is useful sometimes to make a link to a utility with
  482. a different name, and that should not change what it does.
  483.  
  484.    Instead, use a run time option or a compilation switch or both to
  485. select among the alternate behaviors.
  486.  
  487.    Likewise, please don't make the behavior of the program depend on the
  488. type of output device it is used with.  Device independence is an
  489. important principle of the system's design; do not compromise it merely
  490. to save someone from typing an option now and then.
  491.  
  492.    If you think one behavior is most useful when the output is to a
  493. terminal, and another is most useful when the output is a file or a
  494. pipe, then it is usually best to make the default behavior the one that
  495. is useful with output to a terminal, and have an option for the other
  496. behavior.
  497.  
  498.    Compatibility requires certain programs to depend on the type of
  499. output device.  It would be disastrous if `ls' or `sh' did not do so in
  500. the way all users expect.  In some of these cases, we supplement the
  501. program with a preferred alternate version that does not depend on the
  502. output device type.  For example, we provide a `dir' program much like
  503. `ls' except that its default output format is always multi-column
  504. format.
  505.  
  506.    It is a good idea to follow the POSIX guidelines for the
  507. command-line options of a program.  The easiest way to do this is to use
  508. `getopt' to parse them.  Note that the GNU version of `getopt' will
  509. normally permit options anywhere among the arguments unless the special
  510. argument `--' is used.  This is not what POSIX specifies; it is a GNU
  511. extension.
  512.  
  513.    Please define long-named options that are equivalent to the
  514. single-letter Unix-style options.  We hope to make GNU more user
  515. friendly this way.  This is easy to do with the GNU function
  516. `getopt_long'.
  517.  
  518.    One of the advantages of long-named options is that they can be
  519. consistent from program to program.  For example, users should be able
  520. to expect the "verbose" option of any GNU program which has one, to be
  521. spelled precisely `--verbose'.  To achieve this uniformity, look at the
  522. table of common long-option names when you choose the option names for
  523. your program.  The table appears below.
  524.  
  525.    If you use names not already in the table, please send
  526. `gnu@prep.ai.mit.edu' a list of them, with their meanings, so we can
  527. update the table.
  528.  
  529.    It is usually a good idea for file names given as ordinary arguments
  530. to be input files only; any output files would be specified using
  531. options (preferably `-o').  Even if you allow an output file name as an
  532. ordinary argument for compatibility, try to provide a suitable option
  533. as well.  This will lead to more consistency among GNU utilities, so
  534. that there are fewer idiosyncracies for users to remember.
  535.  
  536.    Programs should support an option `--version' which prints the
  537. program's version number on standard output and exits successfully, and
  538. an option `--help' which prints option usage information on standard
  539. output and exits successfully.  These options should inhibit the normal
  540. function of the command; they should do nothing except print the
  541. requested information.
  542.  
  543.    Here is the table of long options used by GNU programs.
  544.  
  545. `after-date'
  546.      `-N' in `tar'.
  547.  
  548. `all'
  549.      `-a' in `du', `ls', `nm', `stty', `uname', and `unexpand'.
  550.  
  551. `all-text'
  552.      `-a' in `diff'.
  553.  
  554. `almost-all'
  555.      `-A' in `ls'.
  556.  
  557. `append'
  558.      `-a' in `etags', `tee', `time'; `-r' in `tar'.
  559.  
  560. `archive'
  561.      `-a' in `cp'.
  562.  
  563. `archive-name'
  564.      `-n' in `shar'.
  565.  
  566. `arglength'
  567.      `-l' in `m4'.
  568.  
  569. `ascii'
  570.      `-a' in `diff'.
  571.  
  572. `assign'
  573.      `-v' in `gawk'.
  574.  
  575. `assume-new'
  576.      `-W' in Make.
  577.  
  578. `assume-old'
  579.      `-o' in Make.
  580.  
  581. `auto-check'
  582.      `-a' in `recode'.
  583.  
  584. `auto-pager'
  585.      `-a' in `wdiff'.
  586.  
  587. `auto-reference'
  588.      `-A' in `ptx'.
  589.  
  590. `avoid-wraps'
  591.      `-n' in `wdiff'.
  592.  
  593. `backward-search'
  594.      `-B' in `ctags'.
  595.  
  596. `basename'
  597.      `-f' in `shar'.
  598.  
  599. `batch'
  600.      Used in GDB.
  601.  
  602. `baud'
  603.      Used in GDB.
  604.  
  605. `before'
  606.      `-b' in `tac'.
  607.  
  608. `binary'
  609.      `-b' in `cpio' and `diff'.
  610.  
  611. `bits-per-code'
  612.      `-b' in `shar'.
  613.  
  614. `block-size'
  615.      Used in `cpio' and `tar'.
  616.  
  617. `blocks'
  618.      `-b' in `head' and `tail'.
  619.  
  620. `break-file'
  621.      `-b' in `ptx'.
  622.  
  623. `brief'
  624.      Used in various programs to make output shorter.
  625.  
  626. `bytes'
  627.      `-c' in `head', `split', and `tail'.
  628.  
  629. `c++'
  630.      `-C' in `etags'.
  631.  
  632. `catenate'
  633.      `-A' in `tar'.
  634.  
  635. `cd'
  636.      Used in various programs to specify the directory to use.
  637.  
  638. `changes'
  639.      `-c' in `chgrp' and `chown'.
  640.  
  641. `classify'
  642.      `-F' in `ls'.
  643.  
  644. `colons'
  645.      `-c' in `recode'.
  646.  
  647. `command'
  648.      `-c' in `su'; `-x' in GDB.
  649.  
  650. `compare'
  651.      `-d' in `tar'.
  652.  
  653. `compat'
  654.      Used in `gawk'.
  655.  
  656. `compress'
  657.      `-Z' in `tar' and `shar'.
  658.  
  659. `concatenate'
  660.      `-A' in `tar'.
  661.  
  662. `confirmation'
  663.      `-w' in `tar'.
  664.  
  665. `context'
  666.      Used in `diff'.
  667.  
  668. `copyleft'
  669.      `-W copyleft' in `gawk'.
  670.  
  671. `copyright'
  672.      `-C' in `ptx', `recode', and `wdiff'; `-W copyright' in `gawk'.
  673.  
  674. `core'
  675.      Used in GDB.
  676.  
  677. `count'
  678.      `-q' in `who'.
  679.  
  680. `count-links'
  681.      `-l' in `du'.
  682.  
  683. `create'
  684.      Used in `tar' and `cpio'.
  685.  
  686. `cut-mark'
  687.      `-c' in `shar'.
  688.  
  689. `cxref'
  690.      `-x' in `ctags'.
  691.  
  692. `date'
  693.      `-d' in `touch'.
  694.  
  695. `debug'
  696.      `-d' in Make and `m4'; `-t' in Bison.
  697.  
  698. `define'
  699.      `-D' in `m4'.
  700.  
  701. `defines'
  702.      `-d' in Bison and `ctags'.
  703.  
  704. `delete'
  705.      `-D' in `tar'.
  706.  
  707. `dereference'
  708.      `-L' in `chgrp', `chown', `cpio', `du', `ls', and `tar'.
  709.  
  710. `dereference-args'
  711.      `-D' in `du'.
  712.  
  713. `diacritics'
  714.      `-d' in `recode'.
  715.  
  716. `dictionary-order'
  717.      `-d' in `look'.
  718.  
  719. `diff'
  720.      `-d' in `tar'.
  721.  
  722. `digits'
  723.      `-n' in `csplit'.
  724.  
  725. `directory'
  726.      Specify the directory to use, in various programs.  In `ls', it
  727.      means to show directories themselves rather than their contents.
  728.      In `rm' and `ln', it means to not treat links to directories
  729.      specially.
  730.  
  731. `discard-all'
  732.      `-x' in `strip'.
  733.  
  734. `discard-locals'
  735.      `-X' in `strip'.
  736.  
  737. `dry-run'
  738.      `-n' in Make.
  739.  
  740. `ed'
  741.      `-e' in `diff'.
  742.  
  743. `elide-empty-files'
  744.      `-z' in `csplit'.
  745.  
  746. `end-delete'
  747.      `-x' in `wdiff'.
  748.  
  749. `end-insert'
  750.      `-z' in `wdiff'.
  751.  
  752. `entire-new-file'
  753.      `-N' in `diff'.
  754.  
  755. `environment-overrides'
  756.      `-e' in Make.
  757.  
  758. `eof'
  759.      `-e' in `xargs'.
  760.  
  761. `epoch'
  762.      Used in GDB.
  763.  
  764. `error-limit'
  765.      Used in `makeinfo'.
  766.  
  767. `error-output'
  768.      `-o' in `m4'.
  769.  
  770. `escape'
  771.      `-b' in `ls'.
  772.  
  773. `exclude-from'
  774.      `-X' in `tar'.
  775.  
  776. `exec'
  777.      Used in GDB.
  778.  
  779. `exit'
  780.      `-x' in `xargs'.
  781.  
  782. `exit-0'
  783.      `-e' in `unshar'.
  784.  
  785. `expand-tabs'
  786.      `-t' in `diff'.
  787.  
  788. `expression'
  789.      `-e' in `sed'.
  790.  
  791. `extern-only'
  792.      `-g' in `nm'.
  793.  
  794. `extract'
  795.      `-i' in `cpio'; `-x' in `tar'.
  796.  
  797. `faces'
  798.      `-f' in `finger'.
  799.  
  800. `fast'
  801.      `-f' in `su'.
  802.  
  803. `fatal-warnings'
  804.      `-E' in `m4'.
  805.  
  806. `file'
  807.      `-f' in `info', `gawk', Make, `mt', and `tar'; `-n' in `sed'; `-r'
  808.      in `touch'.
  809.  
  810. `field-separator'
  811.      `-F' in `gawk'.
  812.  
  813. `file-prefix'
  814.      `-b' in Bison.
  815.  
  816. `file-type'
  817.      `-F' in `ls'.
  818.  
  819. `files-from'
  820.      `-T' in `tar'.
  821.  
  822. `fill-column'
  823.      Used in `makeinfo'.
  824.  
  825. `flag-truncation'
  826.      `-F' in `ptx'.
  827.  
  828. `fixed-output-files'
  829.      `-y' in Bison.
  830.  
  831. `follow'
  832.      `-f' in `tail'.
  833.  
  834. `footnote-style'
  835.      Used in `makeinfo'.
  836.  
  837. `force'
  838.      `-f' in `cp', `ln', `mv', and `rm'.
  839.  
  840. `force-prefix'
  841.      `-F' in `shar'.
  842.  
  843. `format'
  844.      Used in `ls', `time', and `ptx'.
  845.  
  846. `freeze-state'
  847.      `-F' in `m4'.
  848.  
  849. `fullname'
  850.      Used in GDB.
  851.  
  852. `gap-size'
  853.      `-g' in `ptx'.
  854.  
  855. `get'
  856.      `-x' in `tar'.
  857.  
  858. `graphic'
  859.      `-i' in `ul'.
  860.  
  861. `graphics'
  862.      `-g' in `recode'.
  863.  
  864. `group'
  865.      `-g' in `install'.
  866.  
  867. `gzip'
  868.      `-z' in `tar' and `shar'.
  869.  
  870. `hashsize'
  871.      `-H' in `m4'.
  872.  
  873. `header'
  874.      `-h' in `objdump' and `recode'
  875.  
  876. `heading'
  877.      `-H' in `who'.
  878.  
  879. `help'
  880.      Used to ask for brief usage information.
  881.  
  882. `here-delimiter'
  883.      `-d' in `shar'.
  884.  
  885. `hide-control-chars'
  886.      `-q' in `ls'.
  887.  
  888. `idle'
  889.      `-u' in `who'.
  890.  
  891. `ifdef'
  892.      `-D' in `diff'.
  893.  
  894. `ignore'
  895.      `-I' in `ls'; `-x' in `recode'.
  896.  
  897. `ignore-all-space'
  898.      `-w' in `diff'.
  899.  
  900. `ignore-backups'
  901.      `-B' in `ls'.
  902.  
  903. `ignore-blank-lines'
  904.      `-B' in `diff'.
  905.  
  906. `ignore-case'
  907.      `-f' in `look' and `ptx'; `-i' in `diff' and `wdiff'.
  908.  
  909. `ignore-errors'
  910.      `-i' in Make.
  911.  
  912. `ignore-file'
  913.      `-i' in `ptx'.
  914.  
  915. `ignore-indentation'
  916.      `-I' in `etags'.
  917.  
  918. `ignore-init-file'
  919.      `-f' in Oleo.
  920.  
  921. `ignore-interrupts'
  922.      `-i' in `tee'.
  923.  
  924. `ignore-matching-lines'
  925.      `-I' in `diff'.
  926.  
  927. `ignore-space-change'
  928.      `-b' in `diff'.
  929.  
  930. `ignore-zeros'
  931.      `-i' in `tar'.
  932.  
  933. `include'
  934.      `-i' in `etags'; `-I' in `m4'.
  935.  
  936. `include-dir'
  937.      `-I' in Make.
  938.  
  939. `incremental'
  940.      `-G' in `tar'.
  941.  
  942. `info'
  943.      `-i', `-l', and `-m' in Finger.
  944.  
  945. `initial'
  946.      `-i' in `expand'.
  947.  
  948. `initial-tab'
  949.      `-T' in `diff'.
  950.  
  951. `inode'
  952.      `-i' in `ls'.
  953.  
  954. `interactive'
  955.      `-i' in `cp', `ln', `mv', `rm'; `-e' in `m4'; `-p' in `xargs';
  956.      `-w' in `tar'.
  957.  
  958. `intermix-type'
  959.      `-p' in `shar'.
  960.  
  961. `jobs'
  962.      `-j' in Make.
  963.  
  964. `just-print'
  965.      `-n' in Make.
  966.  
  967. `keep-going'
  968.      `-k' in Make.
  969.  
  970. `keep-files'
  971.      `-k' in `csplit'.
  972.  
  973. `kilobytes'
  974.      `-k' in `du' and `ls'.
  975.  
  976. `language'
  977.      `-l' in `etags'.
  978.  
  979. `less-mode'
  980.      `-l' in `wdiff'.
  981.  
  982. `level-for-gzip'
  983.      `-g' in `shar'.
  984.  
  985. `line-bytes'
  986.      `-C' in `split'.
  987.  
  988. `lines'
  989.      Used in `split', `head', and `tail'.
  990.  
  991. `link'
  992.      `-l' in `cpio'.
  993.  
  994. `lint'
  995. `lint-old'
  996.      Used in `gawk'.
  997.  
  998. `list'
  999.      `-t' in `cpio'; `-l' in `recode'.
  1000.  
  1001. `list'
  1002.      `-t' in `tar'.
  1003.  
  1004. `literal'
  1005.      `-N' in `ls'.
  1006.  
  1007. `load-average'
  1008.      `-l' in Make.
  1009.  
  1010. `login'
  1011.      Used in `su'.
  1012.  
  1013. `machine'
  1014.      No listing of which programs already use this; someone should
  1015.      check to see if any actually do and tell `gnu@prep.ai.mit.edu'.
  1016.  
  1017. `macro-name'
  1018.      `-M' in `ptx'.
  1019.  
  1020. `mail'
  1021.      `-m' in `hello' and `uname'.
  1022.  
  1023. `make-directories'
  1024.      `-d' in `cpio'.
  1025.  
  1026. `makefile'
  1027.      `-f' in Make.
  1028.  
  1029. `mapped'
  1030.      Used in GDB.
  1031.  
  1032. `max-args'
  1033.      `-n' in `xargs'.
  1034.  
  1035. `max-chars'
  1036.      `-n' in `xargs'.
  1037.  
  1038. `max-lines'
  1039.      `-l' in `xargs'.
  1040.  
  1041. `max-load'
  1042.      `-l' in Make.
  1043.  
  1044. `max-procs'
  1045.      `-P' in `xargs'.
  1046.  
  1047. `mesg'
  1048.      `-T' in `who'.
  1049.  
  1050. `message'
  1051.      `-T' in `who'.
  1052.  
  1053. `minimal'
  1054.      `-d' in `diff'.
  1055.  
  1056. `mixed-uuencode'
  1057.      `-M' in `shar'.
  1058.  
  1059. `mode'
  1060.      `-m' in `install', `mkdir', and `mkfifo'.
  1061.  
  1062. `modification-time'
  1063.      `-m' in `tar'.
  1064.  
  1065. `multi-volume'
  1066.      `-M' in `tar'.
  1067.  
  1068. `name-prefix'
  1069.      `-a' in Bison.
  1070.  
  1071. `nesting-limit'
  1072.      `-L' in `m4'.
  1073.  
  1074. `net-headers'
  1075.      `-a' in `shar'.
  1076.  
  1077. `new-file'
  1078.      `-W' in Make.
  1079.  
  1080. `no-builtin-rules'
  1081.      `-r' in Make.
  1082.  
  1083. `no-character-count'
  1084.      `-w' in `shar'.
  1085.  
  1086. `no-check-existing'
  1087.      `-x' in `shar'.
  1088.  
  1089. `no-common'
  1090.      `-3' in `wdiff'.
  1091.  
  1092. `no-create'
  1093.      `-c' in `touch'.
  1094.  
  1095. `no-defines'
  1096.      `-D' in `etags'.
  1097.  
  1098. `no-deleted'
  1099.      `-1' in `wdiff'.
  1100.  
  1101. `no-dereference'
  1102.      `-d' in `cp'.
  1103.  
  1104. `no-inserted'
  1105.      `-2' in `wdiff'.
  1106.  
  1107. `no-keep-going'
  1108.      `-S' in Make.
  1109.  
  1110. `no-lines'
  1111.      `-l' in Bison.
  1112.  
  1113. `no-piping'
  1114.      `-P' in `shar'.
  1115.  
  1116. `no-prof'
  1117.      `-e' in `gprof'.
  1118.  
  1119. `no-regex'
  1120.      `-R' in `etags'.
  1121.  
  1122. `no-sort'
  1123.      `-p' in `nm'.
  1124.  
  1125. `no-split'
  1126.      Used in `makeinfo'.
  1127.  
  1128. `no-static'
  1129.      `-a' in `gprof'.
  1130.  
  1131. `no-time'
  1132.      `-E' in `gprof'.
  1133.  
  1134. `no-timestamp'
  1135.      `-m' in `shar'.
  1136.  
  1137. `no-validate'
  1138.      Used in `makeinfo'.
  1139.  
  1140. `no-warn'
  1141.      Used in various programs to inhibit warnings.
  1142.  
  1143. `node'
  1144.      `-n' in `info'.
  1145.  
  1146. `nodename'
  1147.      `-n' in `uname'.
  1148.  
  1149. `nonmatching'
  1150.      `-f' in `cpio'.
  1151.  
  1152. `nstuff'
  1153.      `-n' in `objdump'.
  1154.  
  1155. `null'
  1156.      `-0' in `xargs'.
  1157.  
  1158. `number'
  1159.      `-n' in `cat'.
  1160.  
  1161. `number-nonblank'
  1162.      `-b' in `cat'.
  1163.  
  1164. `numeric-sort'
  1165.      `-n' in `nm'.
  1166.  
  1167. `numeric-uid-gid'
  1168.      `-n' in `cpio' and `ls'.
  1169.  
  1170. `nx'
  1171.      Used in GDB.
  1172.  
  1173. `old-archive'
  1174.      `-o' in `tar'.
  1175.  
  1176. `old-file'
  1177.      `-o' in Make.
  1178.  
  1179. `one-file-system'
  1180.      `-l' in `tar', `cp', and `du'.
  1181.  
  1182. `only-file'
  1183.      `-o' in `ptx'.
  1184.  
  1185. `only-prof'
  1186.      `-f' in `gprof'.
  1187.  
  1188. `only-time'
  1189.      `-F' in `gprof'.
  1190.  
  1191. `output'
  1192.      In various programs, specify the output file name.
  1193.  
  1194. `output-prefix'
  1195.      `-o' in `shar'.
  1196.  
  1197. `override'
  1198.      `-o' in `rm'.
  1199.  
  1200. `overwrite'
  1201.      `-c' in `unshar'.
  1202.  
  1203. `owner'
  1204.      `-o' in `install'.
  1205.  
  1206. `paginate'
  1207.      `-l' in `diff'.
  1208.  
  1209. `paragraph-indent'
  1210.      Used in `makeinfo'.
  1211.  
  1212. `parents'
  1213.      `-p' in `mkdir' and `rmdir'.
  1214.  
  1215. `pass-all'
  1216.      `-p' in `ul'.
  1217.  
  1218. `pass-through'
  1219.      `-p' in `cpio'.
  1220.  
  1221. `port'
  1222.      `-P' in `finger'.
  1223.  
  1224. `portability'
  1225.      `-c' in `cpio' and `tar'.
  1226.  
  1227. `posix'
  1228.      Used in `gawk'.
  1229.  
  1230. `prefix-builtins'
  1231.      `-P' in `m4'.
  1232.  
  1233. `prefix'
  1234.      `-f' in `csplit'.
  1235.  
  1236. `preserve'
  1237.      Used in `tar' and `cp'.
  1238.  
  1239. `preserve-environment'
  1240.      `-p' in `su'.
  1241.  
  1242. `preserve-modification-time'
  1243.      `-m' in `cpio'.
  1244.  
  1245. `preserve-order'
  1246.      `-s' in `tar'.
  1247.  
  1248. `preserve-permissions'
  1249.      `-p' in `tar'.
  1250.  
  1251. `print'
  1252.      `-l' in `diff'.
  1253.  
  1254. `print-chars'
  1255.      `-L' in `cmp'.
  1256.  
  1257. `print-data-base'
  1258.      `-p' in Make.
  1259.  
  1260. `print-directory'
  1261.      `-w' in Make.
  1262.  
  1263. `print-file-name'
  1264.      `-o' in `nm'.
  1265.  
  1266. `print-symdefs'
  1267.      `-s' in `nm'.
  1268.  
  1269. `printer'
  1270.      `-p' in `wdiff'.
  1271.  
  1272. `prompt'
  1273.      `-p' in `ed'.
  1274.  
  1275. `query-user'
  1276.      `-X' in `shar'.
  1277.  
  1278. `question'
  1279.      `-q' in Make.
  1280.  
  1281. `quiet'
  1282.      Used in many programs to inhibit the usual output.  *Note:* every
  1283.      program accepting `--quiet' should accept `--silent' as a synonym.
  1284.  
  1285. `quiet-unshar'
  1286.      `-Q' in `shar'
  1287.  
  1288. `quote-name'
  1289.      `-Q' in `ls'.
  1290.  
  1291. `rcs'
  1292.      `-n' in `diff'.
  1293.  
  1294. `re-interval'
  1295.      Used in `gawk'.
  1296.  
  1297. `read-full-blocks'
  1298.      `-B' in `tar'.
  1299.  
  1300. `readnow'
  1301.      Used in GDB.
  1302.  
  1303. `recon'
  1304.      `-n' in Make.
  1305.  
  1306. `record-number'
  1307.      `-R' in `tar'.
  1308.  
  1309. `recursive'
  1310.      Used in `chgrp', `chown', `cp', `ls', `diff', and `rm'.
  1311.  
  1312. `reference-limit'
  1313.      Used in `makeinfo'.
  1314.  
  1315. `references'
  1316.      `-r' in `ptx'.
  1317.  
  1318. `regex'
  1319.      `-r' in `tac' and `etags'.
  1320.  
  1321. `release'
  1322.      `-r' in `uname'.
  1323.  
  1324. `reload-state'
  1325.      `-R' in `m4'.
  1326.  
  1327. `relocation'
  1328.      `-r' in `objdump'.
  1329.  
  1330. `rename'
  1331.      `-r' in `cpio'.
  1332.  
  1333. `replace'
  1334.      `-i' in `xargs'.
  1335.  
  1336. `report-identical-files'
  1337.      `-s' in `diff'.
  1338.  
  1339. `reset-access-time'
  1340.      `-a' in `cpio'.
  1341.  
  1342. `reverse'
  1343.      `-r' in `ls' and `nm'.
  1344.  
  1345. `reversed-ed'
  1346.      `-f' in `diff'.
  1347.  
  1348. `right-side-defs'
  1349.      `-R' in `ptx'.
  1350.  
  1351. `same-order'
  1352.      `-s' in `tar'.
  1353.  
  1354. `same-permissions'
  1355.      `-p' in `tar'.
  1356.  
  1357. `save'
  1358.      `-g' in `stty'.
  1359.  
  1360. `se'
  1361.      Used in GDB.
  1362.  
  1363. `sentence-regexp'
  1364.      `-S' in `ptx'.
  1365.  
  1366. `separate-dirs'
  1367.      `-S' in `du'.
  1368.  
  1369. `separator'
  1370.      `-s' in `tac'.
  1371.  
  1372. `sequence'
  1373.      Used by `recode' to chose files or pipes for sequencing passes.
  1374.  
  1375. `shell'
  1376.      `-s' in `su'.
  1377.  
  1378. `show-all'
  1379.      `-A' in `cat'.
  1380.  
  1381. `show-c-function'
  1382.      `-p' in `diff'.
  1383.  
  1384. `show-ends'
  1385.      `-E' in `cat'.
  1386.  
  1387. `show-function-line'
  1388.      `-F' in `diff'.
  1389.  
  1390. `show-tabs'
  1391.      `-T' in `cat'.
  1392.  
  1393. `silent'
  1394.      Used in many programs to inhibit the usual output.  *Note:* every
  1395.      program accepting `--silent' should accept `--quiet' as a synonym.
  1396.  
  1397. `size'
  1398.      `-s' in `ls'.
  1399.  
  1400. `sort'
  1401.      Used in `ls'.
  1402.  
  1403. `source'
  1404.      `-W source' in `gawk'.
  1405.  
  1406. `sparse'
  1407.      `-S' in `tar'.
  1408.  
  1409. `speed-large-files'
  1410.      `-H' in `diff'.
  1411.  
  1412. `split-at'
  1413.      `-E' in `unshar'.
  1414.  
  1415. `split-size-limit'
  1416.      `-L' in `shar'.
  1417.  
  1418. `squeeze-blank'
  1419.      `-s' in `cat'.
  1420.  
  1421. `start-delete'
  1422.      `-w' in `wdiff'.
  1423.  
  1424. `start-insert'
  1425.      `-y' in `wdiff'.
  1426.  
  1427. `starting-file'
  1428.      Used in `tar' and `diff' to specify which file within a directory
  1429.      to start processing with.
  1430.  
  1431. `statistics'
  1432.      `-s' in `wdiff'.
  1433.  
  1434. `stdin-file-list'
  1435.      `-S' in `shar'.
  1436.  
  1437. `stop'
  1438.      `-S' in Make.
  1439.  
  1440. `strict'
  1441.      `-s' in `recode'.
  1442.  
  1443. `strip'
  1444.      `-s' in `install'.
  1445.  
  1446. `strip-all'
  1447.      `-s' in `strip'.
  1448.  
  1449. `strip-debug'
  1450.      `-S' in `strip'.
  1451.  
  1452. `submitter'
  1453.      `-s' in `shar'.
  1454.  
  1455. `suffix'
  1456.      `-S' in `cp', `ln', `mv'.
  1457.  
  1458. `suffix-format'
  1459.      `-b' in `csplit'.
  1460.  
  1461. `sum'
  1462.      `-s' in `gprof'.
  1463.  
  1464. `summarize'
  1465.      `-s' in `du'.
  1466.  
  1467. `symbolic'
  1468.      `-s' in `ln'.
  1469.  
  1470. `symbols'
  1471.      Used in GDB and `objdump'.
  1472.  
  1473. `synclines'
  1474.      `-s' in `m4'.
  1475.  
  1476. `sysname'
  1477.      `-s' in `uname'.
  1478.  
  1479. `tabs'
  1480.      `-t' in `expand' and `unexpand'.
  1481.  
  1482. `tabsize'
  1483.      `-T' in `ls'.
  1484.  
  1485. `terminal'
  1486.      `-T' in `tput' and `ul'.  `-t' in `wdiff'.
  1487.  
  1488. `text'
  1489.      `-a' in `diff'.
  1490.  
  1491. `text-files'
  1492.      `-T' in `shar'.
  1493.  
  1494. `time'
  1495.      Used in `ls' and `touch'.
  1496.  
  1497. `to-stdout'
  1498.      `-O' in `tar'.
  1499.  
  1500. `total'
  1501.      `-c' in `du'.
  1502.  
  1503. `touch'
  1504.      `-t' in Make, `ranlib', and `recode'.
  1505.  
  1506. `trace'
  1507.      `-t' in `m4'.
  1508.  
  1509. `traditional'
  1510.      `-t' in `hello'; `-W traditional' in `gawk'; `-G' in `ed', `m4',
  1511.      and `ptx'.
  1512.  
  1513. `tty'
  1514.      Used in GDB.
  1515.  
  1516. `typedefs'
  1517.      `-t' in `ctags'.
  1518.  
  1519. `typedefs-and-c++'
  1520.      `-T' in `ctags'.
  1521.  
  1522. `typeset-mode'
  1523.      `-t' in `ptx'.
  1524.  
  1525. `uncompress'
  1526.      `-z' in `tar'.
  1527.  
  1528. `unconditional'
  1529.      `-u' in `cpio'.
  1530.  
  1531. `undefine'
  1532.      `-U' in `m4'.
  1533.  
  1534. `undefined-only'
  1535.      `-u' in `nm'.
  1536.  
  1537. `update'
  1538.      `-u' in `cp', `ctags', `mv', `tar'.
  1539.  
  1540. `usage'
  1541.      Used in `gawk'; same as `--help'.
  1542.  
  1543. `uuencode'
  1544.      `-B' in `shar'.
  1545.  
  1546. `vanilla-operation'
  1547.      `-V' in `shar'.
  1548.  
  1549. `verbose'
  1550.      Print more information about progress.  Many programs support this.
  1551.  
  1552. `verify'
  1553.      `-W' in `tar'.
  1554.  
  1555. `version'
  1556.      Print the version number.
  1557.  
  1558. `version-control'
  1559.      `-V' in `cp', `ln', `mv'.
  1560.  
  1561. `vgrind'
  1562.      `-v' in `ctags'.
  1563.  
  1564. `volume'
  1565.      `-V' in `tar'.
  1566.  
  1567. `what-if'
  1568.      `-W' in Make.
  1569.  
  1570. `whole-size-limit'
  1571.      `-l' in `shar'.
  1572.  
  1573. `width'
  1574.      `-w' in `ls' and `ptx'.
  1575.  
  1576. `word-regexp'
  1577.      `-W' in `ptx'.
  1578.  
  1579. `writable'
  1580.      `-T' in `who'.
  1581.  
  1582. `zeros'
  1583.      `-z' in `gprof'.
  1584.  
  1585. 
  1586. File: standards.info,  Node: Memory Usage,  Prev: User Interfaces,  Up: Program Behavior
  1587.  
  1588. Memory Usage
  1589. ============
  1590.  
  1591.    If it typically uses just a few meg of memory, don't bother making
  1592. any effort to reduce memory usage.  For example, if it is impractical
  1593. for other reasons to operate on files more than a few meg long, it is
  1594. reasonable to read entire input files into core to operate on them.
  1595.  
  1596.    However, for programs such as `cat' or `tail', that can usefully
  1597. operate on very large files, it is important to avoid using a technique
  1598. that would artificially limit the size of files it can handle.  If a
  1599. program works by lines and could be applied to arbitrary user-supplied
  1600. input files, it should keep only a line in memory, because this is not
  1601. very hard and users will want to be able to operate on input files that
  1602. are bigger than will fit in core all at once.
  1603.  
  1604.    If your program creates complicated data structures, just make them
  1605. in core and give a fatal error if `malloc' returns zero.
  1606.  
  1607. 
  1608. File: standards.info,  Node: Writing C,  Next: Documentation,  Prev: Program Behavior,  Up: Top
  1609.  
  1610. Making The Best Use of C
  1611. ************************
  1612.  
  1613.    This node provides advice on how best to use the C language when
  1614. writing GNU software.
  1615.  
  1616. * Menu:
  1617.  
  1618. * Formatting::            Formatting Your Source Code
  1619. * Comments::            Commenting Your Work
  1620. * Syntactic Conventions::    Clean Use of C Constructs
  1621. * Names::            Naming Variables and Functions
  1622. * System Portability::        Portability between different operating systems
  1623. * CPU Portability::             Supporting the range of CPU types
  1624. * System Functions::            Portability and "standard" library functions
  1625.  
  1626. 
  1627. File: standards.info,  Node: Formatting,  Next: Comments,  Up: Writing C
  1628.  
  1629. Formatting Your Source Code
  1630. ===========================
  1631.  
  1632.    It is important to put the open-brace that starts the body of a C
  1633. function in column zero, and avoid putting any other open-brace or
  1634. open-parenthesis or open-bracket in column zero.  Several tools look
  1635. for open-braces in column zero to find the beginnings of C functions.
  1636. These tools will not work on code not formatted that way.
  1637.  
  1638.    It is also important for function definitions to start the name of
  1639. the function in column zero.  This helps people to search for function
  1640. definitions, and may also help certain tools recognize them.  Thus, the
  1641. proper format is this:
  1642.  
  1643.      static char *
  1644.      concat (s1, s2)        /* Name starts in column zero here */
  1645.           char *s1, *s2;
  1646.      {                     /* Open brace in column zero here */
  1647.        ...
  1648.      }
  1649.  
  1650. or, if you want to use ANSI C, format the definition like this:
  1651.  
  1652.      static char *
  1653.      concat (char *s1, char *s2)
  1654.      {
  1655.        ...
  1656.      }
  1657.  
  1658.    In ANSI C, if the arguments don't fit nicely on one line, split it
  1659. like this:
  1660.  
  1661.      int
  1662.      lots_of_args (int an_integer, long a_long, short a_short,
  1663.                    double a_double, float a_float)
  1664.      ...
  1665.  
  1666.    For the body of the function, we prefer code formatted like this:
  1667.  
  1668.      if (x < foo (y, z))
  1669.        haha = bar[4] + 5;
  1670.      else
  1671.        {
  1672.          while (z)
  1673.            {
  1674.              haha += foo (z, z);
  1675.              z--;
  1676.            }
  1677.          return ++x + bar ();
  1678.        }
  1679.  
  1680.    We find it easier to read a program when it has spaces before the
  1681. open-parentheses and after the commas.  Especially after the commas.
  1682.  
  1683.    When you split an expression into multiple lines, split it before an
  1684. operator, not after one.  Here is the right way:
  1685.  
  1686.      if (foo_this_is_long && bar > win (x, y, z)
  1687.          && remaining_condition)
  1688.  
  1689.    Try to avoid having two operators of different precedence at the same
  1690. level of indentation.  For example, don't write this:
  1691.  
  1692.      mode = (inmode[j] == VOIDmode
  1693.              || GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])
  1694.              ? outmode[j] : inmode[j]);
  1695.  
  1696.    Instead, use extra parentheses so that the indentation shows the
  1697. nesting:
  1698.  
  1699.      mode = ((inmode[j] == VOIDmode
  1700.               || (GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])))
  1701.              ? outmode[j] : inmode[j]);
  1702.  
  1703.    Insert extra parentheses so that Emacs will indent the code properly.
  1704. For example, the following indentation looks nice if you do it by hand,
  1705. but Emacs would mess it up:
  1706.  
  1707.      v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
  1708.          + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000;
  1709.  
  1710.    But adding a set of parentheses solves the problem:
  1711.  
  1712.      v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
  1713.           + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000);
  1714.  
  1715.    Format do-while statements like this:
  1716.  
  1717.      do
  1718.        {
  1719.          a = foo (a);
  1720.        }
  1721.      while (a > 0);
  1722.  
  1723.    Please use formfeed characters (control-L) to divide the program into
  1724. pages at logical places (but not within a function).  It does not matter
  1725. just how long the pages are, since they do not have to fit on a printed
  1726. page.  The formfeeds should appear alone on lines by themselves.
  1727.  
  1728. 
  1729. File: standards.info,  Node: Comments,  Next: Syntactic Conventions,  Prev: Formatting,  Up: Writing C
  1730.  
  1731. Commenting Your Work
  1732. ====================
  1733.  
  1734.    Every program should start with a comment saying briefly what it is
  1735. for.  Example: `fmt - filter for simple filling of text'.
  1736.  
  1737.    Please put a comment on each function saying what the function does,
  1738. what sorts of arguments it gets, and what the possible values of
  1739. arguments mean and are used for.  It is not necessary to duplicate in
  1740. words the meaning of the C argument declarations, if a C type is being
  1741. used in its customary fashion.  If there is anything nonstandard about
  1742. its use (such as an argument of type `char *' which is really the
  1743. address of the second character of a string, not the first), or any
  1744. possible values that would not work the way one would expect (such as,
  1745. that strings containing newlines are not guaranteed to work), be sure
  1746. to say so.
  1747.  
  1748.    Also explain the significance of the return value, if there is one.
  1749.  
  1750.    Please put two spaces after the end of a sentence in your comments,
  1751. so that the Emacs sentence commands will work.  Also, please write
  1752. complete sentences and capitalize the first word.  If a lower-case
  1753. identifier comes at the beginning of a sentence, don't capitalize it!
  1754. Changing the spelling makes it a different identifier.  If you don't
  1755. like starting a sentence with a lower case letter, write the sentence
  1756. differently (e.g., "The identifier lower-case is ...").
  1757.  
  1758.    The comment on a function is much clearer if you use the argument
  1759. names to speak about the argument values.  The variable name itself
  1760. should be lower case, but write it in upper case when you are speaking
  1761. about the value rather than the variable itself.  Thus, "the inode
  1762. number NODE_NUM" rather than "an inode".
  1763.  
  1764.    There is usually no purpose in restating the name of the function in
  1765. the comment before it, because the reader can see that for himself.
  1766. There might be an exception when the comment is so long that the
  1767. function itself would be off the bottom of the screen.
  1768.  
  1769.    There should be a comment on each static variable as well, like this:
  1770.  
  1771.      /* Nonzero means truncate lines in the display;
  1772.         zero means continue them.  */
  1773.      int truncate_lines;
  1774.  
  1775.    Every `#endif' should have a comment, except in the case of short
  1776. conditionals (just a few lines) that are not nested.  The comment should
  1777. state the condition of the conditional that is ending, *including its
  1778. sense*.  `#else' should have a comment describing the condition *and
  1779. sense* of the code that follows.  For example:
  1780.  
  1781.      #ifdef foo
  1782.        ...
  1783.      #else /* not foo */
  1784.        ...
  1785.      #endif /* not foo */
  1786.  
  1787. but, by contrast, write the comments this way for a `#ifndef':
  1788.  
  1789.      #ifndef foo
  1790.        ...
  1791.      #else /* foo */
  1792.        ...
  1793.      #endif /* foo */
  1794.  
  1795. 
  1796. File: standards.info,  Node: Syntactic Conventions,  Next: Names,  Prev: Comments,  Up: Writing C
  1797.  
  1798. Clean Use of C Constructs
  1799. =========================
  1800.  
  1801.    Please explicitly declare all arguments to functions.  Don't omit
  1802. them just because they are `int's.
  1803.  
  1804.    Declarations of external functions and functions to appear later in
  1805. the source file should all go in one place near the beginning of the
  1806. file (somewhere before the first function definition in the file), or
  1807. else should go in a header file.  Don't put `extern' declarations inside
  1808. functions.
  1809.  
  1810.    It used to be common practice to use the same local variables (with
  1811. names like `tem') over and over for different values within one
  1812. function.  Instead of doing this, it is better declare a separate local
  1813. variable for each distinct purpose, and give it a name which is
  1814. meaningful.  This not only makes programs easier to understand, it also
  1815. facilitates optimization by good compilers.  You can also move the
  1816. declaration of each local variable into the smallest scope that includes
  1817. all its uses.  This makes the program even cleaner.
  1818.  
  1819.    Don't use local variables or parameters that shadow global
  1820. identifiers.
  1821.  
  1822.    Don't declare multiple variables in one declaration that spans lines.
  1823. Start a new declaration on each line, instead.  For example, instead of
  1824. this:
  1825.  
  1826.      int    foo,
  1827.             bar;
  1828.  
  1829. write either this:
  1830.  
  1831.      int foo, bar;
  1832.  
  1833. or this:
  1834.  
  1835.      int foo;
  1836.      int bar;
  1837.  
  1838. (If they are global variables, each should have a comment preceding it
  1839. anyway.)
  1840.  
  1841.    When you have an `if'-`else' statement nested in another `if'
  1842. statement, always put braces around the `if'-`else'.  Thus, never write
  1843. like this:
  1844.  
  1845.      if (foo)
  1846.        if (bar)
  1847.          win ();
  1848.        else
  1849.          lose ();
  1850.  
  1851. always like this:
  1852.  
  1853.      if (foo)
  1854.        {
  1855.          if (bar)
  1856.            win ();
  1857.          else
  1858.            lose ();
  1859.        }
  1860.  
  1861.    If you have an `if' statement nested inside of an `else' statement,
  1862. either write `else if' on one line, like this,
  1863.  
  1864.      if (foo)
  1865.        ...
  1866.      else if (bar)
  1867.        ...
  1868.  
  1869. with its `then'-part indented like the preceding `then'-part, or write
  1870. the nested `if' within braces like this:
  1871.  
  1872.      if (foo)
  1873.        ...
  1874.      else
  1875.        {
  1876.          if (bar)
  1877.            ...
  1878.        }
  1879.  
  1880.    Don't declare both a structure tag and variables or typedefs in the
  1881. same declaration.  Instead, declare the structure tag separately and
  1882. then use it to declare the variables or typedefs.
  1883.  
  1884.    Try to avoid assignments inside `if'-conditions.  For example, don't
  1885. write this:
  1886.  
  1887.      if ((foo = (char *) malloc (sizeof *foo)) == 0)
  1888.        fatal ("virtual memory exhausted");
  1889.  
  1890. instead, write this:
  1891.  
  1892.      foo = (char *) malloc (sizeof *foo);
  1893.      if (foo == 0)
  1894.        fatal ("virtual memory exhausted");
  1895.  
  1896.    Don't make the program ugly to placate `lint'.  Please don't insert
  1897. any casts to `void'.  Zero without a cast is perfectly fine as a null
  1898. pointer constant.
  1899.  
  1900. 
  1901. File: standards.info,  Node: Names,  Next: System Portability,  Prev: Syntactic Conventions,  Up: Writing C
  1902.  
  1903. Naming Variables and Functions
  1904. ==============================
  1905.  
  1906.    Please use underscores to separate words in a name, so that the Emacs
  1907. word commands can be useful within them.  Stick to lower case; reserve
  1908. upper case for macros and `enum' constants, and for name-prefixes that
  1909. follow a uniform convention.
  1910.  
  1911.    For example, you should use names like `ignore_space_change_flag';
  1912. don't use names like `iCantReadThis'.
  1913.  
  1914.    Variables that indicate whether command-line options have been
  1915. specified should be named after the meaning of the option, not after
  1916. the option-letter.  A comment should state both the exact meaning of
  1917. the option and its letter.  For example,
  1918.  
  1919.      /* Ignore changes in horizontal whitespace (-b).  */
  1920.      int ignore_space_change_flag;
  1921.  
  1922.    When you want to define names with constant integer values, use
  1923. `enum' rather than `#define'.  GDB knows about enumeration constants.
  1924.  
  1925.    Use file names of 14 characters or less, to avoid creating gratuitous
  1926. problems on older System V systems.  You can use the program `doschk'
  1927. to test for this.  `doschk' also tests for potential name conflicts if
  1928. the files were loaded onto an MS-DOS file system--something you may or
  1929. may not care about.
  1930.  
  1931. 
  1932. File: standards.info,  Node: System Portability,  Next: CPU Portability,  Prev: Names,  Up: Writing C
  1933.  
  1934. Portability between System Types
  1935. ================================
  1936.  
  1937.    In the Unix world, "portability" refers to porting to different Unix
  1938. versions.  For a GNU program, this kind of portability is desirable, but
  1939. not paramount.
  1940.  
  1941.    The primary purpose of GNU software is to run on top of the GNU
  1942. kernel, compiled with the GNU C compiler, on various types of CPU.  The
  1943. amount and kinds of variation among GNU systems on different CPUs will
  1944. be comparable to the variation among Linux-based GNU systems or among
  1945. BSD systems today.  So the kinds of portability that are absolutely
  1946. necessary are quite limited.
  1947.  
  1948.    But many users do run GNU software on non-GNU Unix or Unix-like
  1949. systems.  So supporting a variety of Unix-like systems is desirable,
  1950. although not paramount.
  1951.  
  1952.    The easiest way to achieve portability to most Unix-like systems is
  1953. to use Autoconf.  It's unlikely that your program needs to know more
  1954. information about the host platform than Autoconf can provide, simply
  1955. because most of the programs that need such knowledge have already been
  1956. written.
  1957.  
  1958.    Avoid using the format of semi-internal data bases (e.g.,
  1959. directories) when there is a higher-level alternative (`readdir').
  1960.  
  1961.    As for systems that are not like Unix, such as MSDOS, Windows, the
  1962. Macintosh, VMS, and MVS, supporting them is usually so much work that it
  1963. is better if you don't.
  1964.  
  1965.    The planned GNU kernel is not finished yet, but you can tell which
  1966. facilities it will provide by looking at the GNU C Library Manual.  The
  1967. GNU kernel is based on Mach, so the features of Mach will also be
  1968. available.  However, if you use Mach features, you'll probably have
  1969. trouble debugging your program today.
  1970.  
  1971. 
  1972. File: standards.info,  Node: CPU Portability,  Next: System Functions,  Prev: System Portability,  Up: Writing C
  1973.  
  1974. Portability between CPUs
  1975. ========================
  1976.  
  1977.    Even GNU systems will differ because of differences among CPU
  1978. types--for example, difference in byte ordering and alignment
  1979. requirements.  It is absolutely essential to handle these differences.
  1980. However, don't make any effort to cater to the possibility that an
  1981. `int' will be less than 32 bits.  We don't support 16-bit machines in
  1982. GNU.
  1983.  
  1984.    Don't assume that the address of an `int' object is also the address
  1985. of its least-significant byte.  This is false on big-endian machines.
  1986. Thus, don't make the following mistake:
  1987.  
  1988.      int c;
  1989.      ...
  1990.      while ((c = getchar()) != EOF)
  1991.        write(file_descriptor, &c, 1);
  1992.  
  1993.    When calling functions, you need not worry about the difference
  1994. between pointers of various types, or between pointers an integers.  On
  1995. most machines, there's no difference anyway.  As for the few machines
  1996. where there is a difference, all of them support ANSI C, so you can use
  1997. prototypes (conditionalized to be active only in ANSI C) to make the
  1998. code work on those systems.
  1999.  
  2000.    In certain cases, it is ok to pass integer and pointer arguments
  2001. indiscriminately to the same function, and use no prototype on any
  2002. system.  For example, many GNU programs have error-reporting functions
  2003. that pass their arguments along to `printf' and friends:
  2004.  
  2005.      error (s, a1, a2, a3)
  2006.           char *s;
  2007.           int a1, a2, a3;
  2008.      {
  2009.        fprintf (stderr, "error: ");
  2010.        fprintf (stderr, s, a1, a2, a3);
  2011.      }
  2012.  
  2013. In practice, this works on all machines, and it is much simpler than any
  2014. "correct" alternative.
  2015.  
  2016.    However, avoid casting pointers to integers unless you really need
  2017. to.  These assumptions really reduce portability, and in most programs
  2018. they are easy to avoid.  In the cases where casting pointers to
  2019. integers is essential--such as, a Lisp interpreter which stores type
  2020. information as well as an address in one word--it is ok to do so, but
  2021. you'll have to make explicit provisions to handle different word sizes.
  2022.  
  2023. 
  2024. File: standards.info,  Node: System Functions,  Prev: CPU Portability,  Up: Writing C
  2025.  
  2026. Calling System Functions
  2027. ========================
  2028.  
  2029.    C implementations differ substantially.  ANSI C reduces but does not
  2030. eliminate the incompatibilities; meanwhile, many users wish to compile
  2031. GNU software with pre-ANSI compilers.  This chapter gives
  2032. recommendations for how to use the more or less standard C library
  2033. functions to avoid unnecessary loss of portability.
  2034.  
  2035.    * Don't use the value of `sprintf'.  It returns the number of
  2036.      characters written on some systems, but not on all systems.
  2037.  
  2038.    * Don't declare system functions explicitly.
  2039.  
  2040.      Almost any declaration for a system function is wrong on some
  2041.      system.  To minimize conflicts, leave it to the system header
  2042.      files to declare system functions.  If the headers don't declare a
  2043.      function, let it remain undeclared.
  2044.  
  2045.      While it may seem unclean to use a function without declaring it,
  2046.      in practice this works fine for most system library functions on
  2047.      the systems where this really happens; thus, the disadvantage is
  2048.      only theoretical.  By contrast, actual declarations have
  2049.      frequently caused actual conflicts.
  2050.  
  2051.    * If you must declare a system function, don't specify the argument
  2052.      types.  Use an old-style declaration, not an ANSI prototype.  The
  2053.      more you specify about the function, the more likely a conflict.
  2054.  
  2055.    * In particular, don't unconditionally declare `malloc' or `realloc'.
  2056.  
  2057.      Most GNU programs use those functions just once, in functions
  2058.      conventionally named `xmalloc' and `xrealloc'.  These functions
  2059.      call `malloc' and `realloc', respectively, and check the results.
  2060.  
  2061.      Because `xmalloc' and `xrealloc' are defined in your program, you
  2062.      can declare them in other files without any risk of type conflict.
  2063.  
  2064.      On most systems, `int' is the same length as a pointer; thus, the
  2065.      calls to `malloc' and `realloc' work fine.  For the few
  2066.      exceptional systems (mostly 64-bit machines), you can use
  2067.      *conditionalized* declarations of `malloc' and `realloc'--or put
  2068.      these declarations in configuration files specific to those
  2069.      systems.
  2070.  
  2071.    * The string functions require special treatment.  Some Unix systems
  2072.      have a header file `string.h'; others have `strings.h'.  Neither
  2073.      file name is portable.  There are two things you can do: use
  2074.      Autoconf to figure out which file to include, or don't include
  2075.      either file.
  2076.  
  2077.    * If you don't include either strings file, you can't get
  2078.      declarations for the string functions from the header file in the
  2079.      usual way.
  2080.  
  2081.      That causes less of a problem than you might think.  The newer ANSI
  2082.      string functions should be avoided anyway because many systems
  2083.      still don't support them.  The string functions you can use are
  2084.      these:
  2085.  
  2086.           strcpy   strncpy   strcat   strncat
  2087.           strlen   strcmp    strncmp
  2088.           strchr   strrchr
  2089.  
  2090.      The copy and concatenate functions work fine without a declaration
  2091.      as long as you don't use their values.  Using their values without
  2092.      a declaration fails on systems where the width of a pointer
  2093.      differs from the width of `int', and perhaps in other cases.  It
  2094.      is trivial to avoid using their values, so do that.
  2095.  
  2096.      The compare functions and `strlen' work fine without a declaration
  2097.      on most systems, possibly all the ones that GNU software runs on.
  2098.      You may find it necessary to declare them *conditionally* on a few
  2099.      systems.
  2100.  
  2101.      The search functions must be declared to return `char *'.  Luckily,
  2102.      there is no variation in the data type they return.  But there is
  2103.      variation in their names.  Some systems give these functions the
  2104.      names `index' and `rindex'; other systems use the names `strchr'
  2105.      and `strrchr'.  Some systems support both pairs of names, but
  2106.      neither pair works on all systems.
  2107.  
  2108.      You should pick a single pair of names and use it throughout your
  2109.      program.  (Nowadays, it is better to choose `strchr' and `strrchr'
  2110.      for new programs, since those are the standard ANSI names.)
  2111.      Declare both of those names as functions returning `char *'.  On
  2112.      systems which don't support those names, define them as macros in
  2113.      terms of the other pair.  For example, here is what to put at the
  2114.      beginning of your file (or in a header) if you want to use the
  2115.      names `strchr' and `strrchr' throughout:
  2116.  
  2117.           #ifndef HAVE_STRCHR
  2118.           #define strchr index
  2119.           #endif
  2120.           #ifndef HAVE_STRRCHR
  2121.           #define strrchr rindex
  2122.           #endif
  2123.           
  2124.           char *strchr ();
  2125.           char *strrchr ();
  2126.  
  2127.    Here we assume that `HAVE_STRCHR' and `HAVE_STRRCHR' are macros
  2128. defined in systems where the corresponding functions exist.  One way to
  2129. get them properly defined is to use Autoconf.
  2130.  
  2131. 
  2132. File: standards.info,  Node: Documentation,  Next: Managing Releases,  Prev: Writing C,  Up: Top
  2133.  
  2134. Documenting Programs
  2135. ********************
  2136.  
  2137. * Menu:
  2138.  
  2139. * GNU Manuals::                 Writing proper manuals.
  2140. * Manual Structure Details::    Specific structure conventions.
  2141. * NEWS File::                   NEWS files supplement manuals.
  2142. * Change Logs::            Recording Changes
  2143. * Man Pages::                   Man pages are secondary.
  2144. * Reading other Manuals::       How far you can go in learning
  2145.                                 from other manuals.
  2146.  
  2147. 
  2148. File: standards.info,  Node: GNU Manuals,  Next: Manual Structure Details,  Up: Documentation
  2149.  
  2150. GNU Manuals
  2151. ===========
  2152.  
  2153.    The preferred way to document part of the GNU system is to write a
  2154. manual in the Texinfo formatting language.  See the Texinfo manual,
  2155. either the hardcopy, or the on-line version available through `info' or
  2156. the Emacs Info subsystem (`C-h i').
  2157.  
  2158.    The manual should document all of the program's command-line options
  2159. and all of its commands.  It should give examples of their use.  But
  2160. don't organize the manual as a list of features.  Instead, organize it
  2161. logically, by subtopics.  Address the goals that a user will have in
  2162. mind, and explain how to accomplish them.
  2163.  
  2164.    In general, a GNU manual should serve both as tutorial and reference.
  2165. It should be set up for convenient access to each topic through Info,
  2166. and for reading straight through (appendixes aside).  A GNU manual
  2167. should give a good introduction to a beginner reading through from the
  2168. start, and should also provide all the details that hackers want.
  2169.  
  2170.    That is not as hard as it first sounds.  Arrange each chapter as a
  2171. logical breakdown of its topic, but order the sections, and write their
  2172. text, so that reading the chapter straight through makes sense.  Do
  2173. likewise when structuring the book into chapters, and when structuring a
  2174. section into paragraphs.  The watchword is, *at each point, address the
  2175. most fundamental and important issue raised by the preceding text.*
  2176.  
  2177.    If necessary, add extra chapters at the beginning of the manual which
  2178. are purely tutorial and cover the basics of the subject.  These provide
  2179. the framework for a beginner to understand the rest of the manual.  The
  2180. Bison manual provides a good example of how to do this.
  2181.  
  2182.    Don't use Unix man pages as a model for how to write GNU
  2183. documentation; they are a bad example to follow.
  2184.  
  2185.    Please do not use the term "pathname" that is used in Unix
  2186. documentation; use "file name" (two words) instead.  We use the term
  2187. "path" only for search paths, which are lists of file names.
  2188.  
  2189. 
  2190. File: standards.info,  Node: Manual Structure Details,  Next: NEWS File,  Prev: GNU Manuals,  Up: Documentation
  2191.  
  2192. Manual Structure Details
  2193. ========================
  2194.  
  2195.    The title page of the manual should state the version of the program
  2196. to which the manual applies.  The Top node of the manual should also
  2197. contain this information.  If the manual is changing more frequently
  2198. than or independent of the program, also state a version number for the
  2199. manual in both of these places.
  2200.  
  2201.    The manual should have a node named `PROGRAM Invocation' or
  2202. `Invoking PROGRAM', where PROGRAM stands for the name of the program
  2203. being described, as you would type it in the shell to run the program.
  2204. This node (together with its subnodes, if any) should describe the
  2205. program's command line arguments and how to run it (the sort of
  2206. information people would look in a man page for).  Start with an
  2207. `@example' containing a template for all the options and arguments that
  2208. the program uses.
  2209.  
  2210.    Alternatively, put a menu item in some menu whose item name fits one
  2211. of the above patterns.  This identifies the node which that item points
  2212. to as the node for this purpose, regardless of the node's actual name.
  2213.  
  2214.    There will be automatic features for specifying a program name and
  2215. quickly reading just this part of its manual.
  2216.  
  2217.    If one manual describes several programs, it should have such a node
  2218. for each program described.
  2219.  
  2220. 
  2221. File: standards.info,  Node: NEWS File,  Next: Change Logs,  Prev: Manual Structure Details,  Up: Documentation
  2222.  
  2223. The NEWS File
  2224. =============
  2225.  
  2226.    In addition to its manual, the package should have a file named
  2227. `NEWS' which contains a list of user-visible changes worth mentioning.
  2228. In each new release, add items to the front of the file and identify
  2229. the version they pertain to.  Don't discard old items; leave them in
  2230. the file after the newer items.  This way, a user upgrading from any
  2231. previous version can see what is new.
  2232.  
  2233.    If the `NEWS' file gets very long, move some of the older items into
  2234. a file named `ONEWS' and put a note at the end referring the user to
  2235. that file.
  2236.  
  2237. 
  2238. File: standards.info,  Node: Change Logs,  Next: Man Pages,  Prev: NEWS File,  Up: Documentation
  2239.  
  2240. Change Logs
  2241. ===========
  2242.  
  2243.    Keep a change log for each directory, describing the changes made to
  2244. source files in that directory.  The purpose of this is so that people
  2245. investigating bugs in the future will know about the changes that might
  2246. have introduced the bug.  Often a new bug can be found by looking at
  2247. what was recently changed.  More importantly, change logs can help
  2248. eliminate conceptual inconsistencies between different parts of a
  2249. program; they can give you a history of how the conflicting concepts
  2250. arose.
  2251.  
  2252.    Use the Emacs command `M-x add-change-log-entry' to start a new
  2253. entry in the change log.  An entry should have an asterisk, the name of
  2254. the changed file, and then in parentheses the name of the changed
  2255. functions, variables or whatever, followed by a colon.  Then describe
  2256. the changes you made to that function or variable.
  2257.  
  2258.    Separate unrelated entries with blank lines.  When two entries
  2259. represent parts of the same change, so that they work together, then
  2260. don't put blank lines between them.  Then you can omit the file name
  2261. and the asterisk when successive entries are in the same file.
  2262.  
  2263.    Here are some examples:
  2264.  
  2265.      * register.el (insert-register): Return nil.
  2266.      (jump-to-register): Likewise.
  2267.      
  2268.      * sort.el (sort-subr): Return nil.
  2269.      
  2270.      * tex-mode.el (tex-bibtex-file, tex-file, tex-region):
  2271.      Restart the tex shell if process is gone or stopped.
  2272.      (tex-shell-running): New function.
  2273.      
  2274.      * expr.c (store_one_arg): Round size up for move_block_to_reg.
  2275.      (expand_call): Round up when emitting USE insns.
  2276.      * stmt.c (assign_parms): Round size up for move_block_from_reg.
  2277.  
  2278.    It's important to name the changed function or variable in full.
  2279. Don't abbreviate function or variable names, and don't combine them.
  2280. Subsequent maintainers will often search for a function name to find
  2281. all the change log entries that pertain to it; if you abbreviate the
  2282. name, they won't find it when they search.  For example, some people
  2283. are tempted to abbreviate groups of function names by writing `*
  2284. register.el ({insert,jump-to}-register)'; this is not a good idea,
  2285. since searching for `jump-to-register' or `insert-register' would not
  2286. find the entry.
  2287.  
  2288.    There's no need to describe the full purpose of the changes or how
  2289. they work together.  It is better to put such explanations in comments
  2290. in the code.  That's why just "New function" is enough; there is a
  2291. comment with the function in the source to explain what it does.
  2292.  
  2293.    However, sometimes it is useful to write one line to describe the
  2294. overall purpose of a large batch of changes.
  2295.  
  2296.    You can think of the change log as a conceptual "undo list" which
  2297. explains how earlier versions were different from the current version.
  2298. People can see the current version; they don't need the change log to
  2299. tell them what is in it.  What they want from a change log is a clear
  2300. explanation of how the earlier version differed.
  2301.  
  2302.    When you change the calling sequence of a function in a simple
  2303. fashion, and you change all the callers of the function, there is no
  2304. need to make individual entries for all the callers.  Just write in the
  2305. entry for the function being called, "All callers changed."
  2306.  
  2307.    When you change just comments or doc strings, it is enough to write
  2308. an entry for the file, without mentioning the functions.  Write just,
  2309. "Doc fix."  There's no need to keep a change log for documentation
  2310. files.  This is because documentation is not susceptible to bugs that
  2311. are hard to fix.  Documentation does not consist of parts that must
  2312. interact in a precisely engineered fashion; to correct an error, you
  2313. need not know the history of the erroneous passage.
  2314.  
  2315. 
  2316. File: standards.info,  Node: Man Pages,  Next: Reading other Manuals,  Prev: Change Logs,  Up: Documentation
  2317.  
  2318. Man Pages
  2319. =========
  2320.  
  2321.    In the GNU project, man pages are secondary.  It is not necessary or
  2322. expected for every GNU program to have a man page, but some of them do.
  2323. It's your choice whether to include a man page in your program.
  2324.  
  2325.    When you make this decision, consider that supporting a man page
  2326. requires continual effort each time the program is changed.  The time
  2327. you spend on the man page is time taken away from more useful work.
  2328.  
  2329.    For a simple program which changes little, updating the man page may
  2330. be a small job.  Then there is little reason not to include a man page,
  2331. if you have one.
  2332.  
  2333.    For a large program that changes a great deal, updating a man page
  2334. may be a substantial burden.  If a user offers to donate a man page,
  2335. you may find this gift costly to accept.  It may be better to refuse
  2336. the man page unless the same person agrees to take full responsibility
  2337. for maintaining it--so that you can wash your hands of it entirely.  If
  2338. this volunteer later ceases to do the job, then don't feel obliged to
  2339. pick it up yourself; it may be better to withdraw the man page from the
  2340. distribution until someone else agrees to update it.
  2341.  
  2342.    When a program changes only a little, you may feel that the
  2343. discrepancies are small enough that the man page remains useful without
  2344. updating.  If so, put a prominent note near the beginning of the man
  2345. page explaining that you don't maintain it and that the Texinfo manual
  2346. is more authoritative.  The note should say how to access the Texinfo
  2347. documentation.
  2348.  
  2349. 
  2350. File: standards.info,  Node: Reading other Manuals,  Prev: Man Pages,  Up: Documentation
  2351.  
  2352. Reading other Manuals
  2353. =====================
  2354.  
  2355.    There may be non-free books or documentation files that describe the
  2356. program you are documenting.
  2357.  
  2358.    It is ok to use these documents for reference, just as the author of
  2359. a new algebra textbook can read other books on algebra.  A large portion
  2360. of any non-fiction book consists of facts, in this case facts about how
  2361. a certain program works, and these facts are necessarily the same for
  2362. everyone who writes about the subject.  But be careful not to copy your
  2363. outline structure, wording, tables or examples from preexisting non-free
  2364. documentation.  Copying from free documentation may be ok; please check
  2365. with the FSF about the individual case.
  2366.  
  2367. 
  2368. File: standards.info,  Node: Managing Releases,  Prev: Documentation,  Up: Top
  2369.  
  2370. The Release Process
  2371. *******************
  2372.  
  2373.    Making a release is more than just bundling up your source files in a
  2374. tar file and putting it up for FTP.  You should set up your software so
  2375. that it can be configured to run on a variety of systems.  Your Makefile
  2376. should conform to the GNU standards described below, and your directory
  2377. layout should also conform to the standards discussed below.  Doing so
  2378. makes it easy to include your package into the larger framework of all
  2379. GNU software.
  2380.  
  2381. * Menu:
  2382.  
  2383. * Configuration::        How Configuration Should Work
  2384. * Makefile Conventions::    Makefile Conventions
  2385. * Releases::            Making Releases
  2386.  
  2387. 
  2388. File: standards.info,  Node: Configuration,  Next: Makefile Conventions,  Up: Managing Releases
  2389.  
  2390. How Configuration Should Work
  2391. =============================
  2392.  
  2393.    Each GNU distribution should come with a shell script named
  2394. `configure'.  This script is given arguments which describe the kind of
  2395. machine and system you want to compile the program for.
  2396.  
  2397.    The `configure' script must record the configuration options so that
  2398. they affect compilation.
  2399.  
  2400.    One way to do this is to make a link from a standard name such as
  2401. `config.h' to the proper configuration file for the chosen system.  If
  2402. you use this technique, the distribution should *not* contain a file
  2403. named `config.h'.  This is so that people won't be able to build the
  2404. program without configuring it first.
  2405.  
  2406.    Another thing that `configure' can do is to edit the Makefile.  If
  2407. you do this, the distribution should *not* contain a file named
  2408. `Makefile'.  Instead, it should include a file `Makefile.in' which
  2409. contains the input used for editing.  Once again, this is so that people
  2410. won't be able to build the program without configuring it first.
  2411.  
  2412.    If `configure' does write the `Makefile', then `Makefile' should
  2413. have a target named `Makefile' which causes `configure' to be rerun,
  2414. setting up the same configuration that was set up last time.  The files
  2415. that `configure' reads should be listed as dependencies of `Makefile'.
  2416.  
  2417.    All the files which are output from the `configure' script should
  2418. have comments at the beginning explaining that they were generated
  2419. automatically using `configure'.  This is so that users won't think of
  2420. trying to edit them by hand.
  2421.  
  2422.    The `configure' script should write a file named `config.status'
  2423. which describes which configuration options were specified when the
  2424. program was last configured.  This file should be a shell script which,
  2425. if run, will recreate the same configuration.
  2426.  
  2427.    The `configure' script should accept an option of the form
  2428. `--srcdir=DIRNAME' to specify the directory where sources are found (if
  2429. it is not the current directory).  This makes it possible to build the
  2430. program in a separate directory, so that the actual source directory is
  2431. not modified.
  2432.  
  2433.    If the user does not specify `--srcdir', then `configure' should
  2434. check both `.' and `..' to see if it can find the sources.  If it finds
  2435. the sources in one of these places, it should use them from there.
  2436. Otherwise, it should report that it cannot find the sources, and should
  2437. exit with nonzero status.
  2438.  
  2439.    Usually the easy way to support `--srcdir' is by editing a
  2440. definition of `VPATH' into the Makefile.  Some rules may need to refer
  2441. explicitly to the specified source directory.  To make this possible,
  2442. `configure' can add to the Makefile a variable named `srcdir' whose
  2443. value is precisely the specified directory.
  2444.  
  2445.    The `configure' script should also take an argument which specifies
  2446. the type of system to build the program for.  This argument should look
  2447. like this:
  2448.  
  2449.      CPU-COMPANY-SYSTEM
  2450.  
  2451.    For example, a Sun 3 might be `m68k-sun-sunos4.1'.
  2452.  
  2453.    The `configure' script needs to be able to decode all plausible
  2454. alternatives for how to describe a machine.  Thus, `sun3-sunos4.1'
  2455. would be a valid alias.  For many programs, `vax-dec-ultrix' would be
  2456. an alias for `vax-dec-bsd', simply because the differences between
  2457. Ultrix and BSD are rarely noticeable, but a few programs might need to
  2458. distinguish them.
  2459.  
  2460.    There is a shell script called `config.sub' that you can use as a
  2461. subroutine to validate system types and canonicalize aliases.
  2462.  
  2463.    Other options are permitted to specify in more detail the software
  2464. or hardware present on the machine, and include or exclude optional
  2465. parts of the package:
  2466.  
  2467. `--enable-FEATURE[=PARAMETER]'
  2468.      Configure the package to build and install an optional user-level
  2469.      facility called FEATURE.  This allows users to choose which
  2470.      optional features to include.  Giving an optional PARAMETER of
  2471.      `no' should omit FEATURE, if it is built by default.
  2472.  
  2473.      No `--enable' option should *ever* cause one feature to replace
  2474.      another.  No `--enable' option should ever substitute one useful
  2475.      behavior for another useful behavior.  The only proper use for
  2476.      `--enable' is for questions of whether to build part of the program
  2477.      or exclude it.
  2478.  
  2479. `--with-PACKAGE'
  2480.      The package PACKAGE will be installed, so configure this package
  2481.      to work with PACKAGE.
  2482.  
  2483.      Possible values of PACKAGE include `x', `x-toolkit', `gnu-as' (or
  2484.      `gas'), `gnu-ld', `gnu-libc', and `gdb'.
  2485.  
  2486.      Do not use a `--with' option to specify the file name to use to
  2487.      find certain files.  That is outside the scope of what `--with'
  2488.      options are for.
  2489.  
  2490. `--nfp'
  2491.      The target machine has no floating point processor.
  2492.  
  2493. `--gas'
  2494.      The target machine assembler is GAS, the GNU assembler.  This is
  2495.      obsolete; users should use `--with-gnu-as' instead.
  2496.  
  2497. `--x'
  2498.      The target machine has the X Window System installed.  This is
  2499.      obsolete; users should use `--with-x' instead.
  2500.  
  2501.    All `configure' scripts should accept all of these "detail" options,
  2502. whether or not they make any difference to the particular package at
  2503. hand.  In particular, they should accept any option that starts with
  2504. `--with-' or `--enable-'.  This is so users will be able to configure
  2505. an entire GNU source tree at once with a single set of options.
  2506.  
  2507.    You will note that the categories `--with-' and `--enable-' are
  2508. narrow: they *do not* provide a place for any sort of option you might
  2509. think of.  That is deliberate.  We want to limit the possible
  2510. configuration options in GNU software.  We do not want GNU programs to
  2511. have idiosyncratic configuration options.
  2512.  
  2513.    Packages that perform part of the compilation process may support
  2514. cross-compilation.  In such a case, the host and target machines for
  2515. the program may be different.  The `configure' script should normally
  2516. treat the specified type of system as both the host and the target,
  2517. thus producing a program which works for the same type of machine that
  2518. it runs on.
  2519.  
  2520.    The way to build a cross-compiler, cross-assembler, or what have
  2521. you, is to specify the option `--host=HOSTTYPE' when running
  2522. `configure'.  This specifies the host system without changing the type
  2523. of target system.  The syntax for HOSTTYPE is the same as described
  2524. above.
  2525.  
  2526.    Bootstrapping a cross-compiler requires compiling it on a machine
  2527. other than the host it will run on.  Compilation packages accept a
  2528. configuration option `--build=HOSTTYPE' for specifying the
  2529. configuration on which you will compile them, in case that is different
  2530. from the host.
  2531.  
  2532.    Programs for which cross-operation is not meaningful need not accept
  2533. the `--host' option, because configuring an entire operating system for
  2534. cross-operation is not a meaningful thing.
  2535.  
  2536.    Some programs have ways of configuring themselves automatically.  If
  2537. your program is set up to do this, your `configure' script can simply
  2538. ignore most of its arguments.
  2539.  
  2540. 
  2541. File: standards.info,  Node: Makefile Conventions,  Next: Releases,  Prev: Configuration,  Up: Managing Releases
  2542.  
  2543. Makefile Conventions
  2544. ====================
  2545.  
  2546.    This node describes conventions for writing the Makefiles for GNU
  2547. programs.
  2548.  
  2549. * Menu:
  2550.  
  2551. * Makefile Basics::        General Conventions for Makefiles
  2552. * Utilities in Makefiles::    Utilities in Makefiles
  2553. * Command Variables::        Variables for Specifying Commands
  2554. * Directory Variables::        Variables for Installation Directories
  2555. * Standard Targets::        Standard Targets for Users
  2556.  
  2557. 
  2558. File: standards.info,  Node: Makefile Basics,  Next: Utilities in Makefiles,  Up: Makefile Conventions
  2559.  
  2560. General Conventions for Makefiles
  2561. ---------------------------------
  2562.  
  2563.    Every Makefile should contain this line:
  2564.  
  2565.      SHELL = /bin/sh
  2566.  
  2567. to avoid trouble on systems where the `SHELL' variable might be
  2568. inherited from the environment.  (This is never a problem with GNU
  2569. `make'.)
  2570.  
  2571.    Different `make' programs have incompatible suffix lists and
  2572. implicit rules, and this sometimes creates confusion or misbehavior.  So
  2573. it is a good idea to set the suffix list explicitly using only the
  2574. suffixes you need in the particular Makefile, like this:
  2575.  
  2576.      .SUFFIXES:
  2577.      .SUFFIXES: .c .o
  2578.  
  2579. The first line clears out the suffix list, the second introduces all
  2580. suffixes which may be subject to implicit rules in this Makefile.
  2581.  
  2582.    Don't assume that `.' is in the path for command execution.  When
  2583. you need to run programs that are a part of your package during the
  2584. make, please make sure that it uses `./' if the program is built as
  2585. part of the make or `$(srcdir)/' if the file is an unchanging part of
  2586. the source code.  Without one of these prefixes, the current search
  2587. path is used.
  2588.  
  2589.    The distinction between `./' and `$(srcdir)/' is important when
  2590. using the `--srcdir' option to `configure'.  A rule of the form:
  2591.  
  2592.      foo.1 : foo.man sedscript
  2593.              sed -e sedscript foo.man > foo.1
  2594.  
  2595. will fail when the current directory is not the source directory,
  2596. because `foo.man' and `sedscript' are not in the current directory.
  2597.  
  2598.    When using GNU `make', relying on `VPATH' to find the source file
  2599. will work in the case where there is a single dependency file, since
  2600. the `make' automatic variable `$<' will represent the source file
  2601. wherever it is.  (Many versions of `make' set `$<' only in implicit
  2602. rules.)  A Makefile target like
  2603.  
  2604.      foo.o : bar.c
  2605.              $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o
  2606.  
  2607. should instead be written as
  2608.  
  2609.      foo.o : bar.c
  2610.              $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@
  2611.  
  2612. in order to allow `VPATH' to work correctly.  When the target has
  2613. multiple dependencies, using an explicit `$(srcdir)' is the easiest way
  2614. to make the rule work well.  For example, the target above for `foo.1'
  2615. is best written as:
  2616.  
  2617.      foo.1 : foo.man sedscript
  2618.              sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@
  2619.  
  2620.    Try to make the build and installation targets, at least (and all
  2621. their subtargets) work correctly with a parallel `make'.
  2622.  
  2623. 
  2624. File: standards.info,  Node: Utilities in Makefiles,  Next: Command Variables,  Prev: Makefile Basics,  Up: Makefile Conventions
  2625.  
  2626. Utilities in Makefiles
  2627. ----------------------
  2628.  
  2629.    Write the Makefile commands (and any shell scripts, such as
  2630. `configure') to run in `sh', not in `csh'.  Don't use any special
  2631. features of `ksh' or `bash'.
  2632.  
  2633.    The `configure' script and the Makefile rules for building and
  2634. installation should not use any utilities directly except these:
  2635.  
  2636.      cat cmp cp echo egrep expr false grep
  2637.      ln mkdir mv pwd rm rmdir sed test touch true
  2638.  
  2639.    Stick to the generally supported options for these programs.  For
  2640. example, don't use `mkdir -p', convenient as it may be, because most
  2641. systems don't support it.
  2642.  
  2643.    It is a good idea to avoid creating symbolic links in makefiles,
  2644. since a few systems don't support them.
  2645.  
  2646.    The Makefile rules for building and installation can also use
  2647. compilers and related programs, but should do so via `make' variables
  2648. so that the user can substitute alternatives.  Here are some of the
  2649. programs we mean:
  2650.  
  2651.      ar bison cc flex install ld lex
  2652.      make makeinfo ranlib texi2dvi yacc
  2653.  
  2654.    Use the following `make' variables:
  2655.  
  2656.      $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX)
  2657.      $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
  2658.  
  2659.    When you use `ranlib', you should make sure nothing bad happens if
  2660. the system does not have `ranlib'.  Arrange to ignore an error from
  2661. that command, and print a message before the command to tell the user
  2662. that failure of the `ranlib' command does not mean a problem.  (The
  2663. Autoconf `AC_PROG_RANLIB' macro can help with this.)
  2664.  
  2665.    If you use symbolic links, you should implement a fallback for
  2666. systems that don't have symbolic links.
  2667.  
  2668.    It is ok to use other utilities in Makefile portions (or scripts)
  2669. intended only for particular systems where you know those utilities
  2670. exist.
  2671.  
  2672. 
  2673. File: standards.info,  Node: Command Variables,  Next: Directory Variables,  Prev: Utilities in Makefiles,  Up: Makefile Conventions
  2674.  
  2675. Variables for Specifying Commands
  2676. ---------------------------------
  2677.  
  2678.    Makefiles should provide variables for overriding certain commands,
  2679. options, and so on.
  2680.  
  2681.    In particular, you should run most utility programs via variables.
  2682. Thus, if you use Bison, have a variable named `BISON' whose default
  2683. value is set with `BISON = bison', and refer to it with `$(BISON)'
  2684. whenever you need to use Bison.
  2685.  
  2686.    File management utilities such as `ln', `rm', `mv', and so on, need
  2687. not be referred to through variables in this way, since users don't
  2688. need to replace them with other programs.
  2689.  
  2690.    Each program-name variable should come with an options variable that
  2691. is used to supply options to the program.  Append `FLAGS' to the
  2692. program-name variable name to get the options variable name--for
  2693. example, `BISONFLAGS'.  (The name `CFLAGS' is an exception to this
  2694. rule, but we keep it because it is standard.)  Use `CPPFLAGS' in any
  2695. compilation command that runs the preprocessor, and use `LDFLAGS' in
  2696. any compilation command that does linking as well as in any direct use
  2697. of `ld'.
  2698.  
  2699.    If there are C compiler options that *must* be used for proper
  2700. compilation of certain files, do not include them in `CFLAGS'.  Users
  2701. expect to be able to specify `CFLAGS' freely themselves.  Instead,
  2702. arrange to pass the necessary options to the C compiler independently
  2703. of `CFLAGS', by writing them explicitly in the compilation commands or
  2704. by defining an implicit rule, like this:
  2705.  
  2706.      CFLAGS = -g
  2707.      ALL_CFLAGS = -I. $(CFLAGS)
  2708.      .c.o:
  2709.              $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
  2710.  
  2711.    Do include the `-g' option in `CFLAGS', because that is not
  2712. *required* for proper compilation.  You can consider it a default that
  2713. is only recommended.  If the package is set up so that it is compiled
  2714. with GCC by default, then you might as well include `-O' in the default
  2715. value of `CFLAGS' as well.
  2716.  
  2717.    Put `CFLAGS' last in the compilation command, after other variables
  2718. containing compiler options, so the user can use `CFLAGS' to override
  2719. the others.
  2720.  
  2721.    Every Makefile should define the variable `INSTALL', which is the
  2722. basic command for installing a file into the system.
  2723.  
  2724.    Every Makefile should also define the variables `INSTALL_PROGRAM'
  2725. and `INSTALL_DATA'.  (The default for each of these should be
  2726. `$(INSTALL)'.)  Then it should use those variables as the commands for
  2727. actual installation, for executables and nonexecutables respectively.
  2728. Use these variables as follows:
  2729.  
  2730.      $(INSTALL_PROGRAM) foo $(bindir)/foo
  2731.      $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
  2732.  
  2733. Always use a file name, not a directory name, as the second argument of
  2734. the installation commands.  Use a separate command for each file to be
  2735. installed.
  2736.  
  2737. 
  2738. File: standards.info,  Node: Directory Variables,  Next: Standard Targets,  Prev: Command Variables,  Up: Makefile Conventions
  2739.  
  2740. Variables for Installation Directories
  2741. --------------------------------------
  2742.  
  2743.    Installation directories should always be named by variables, so it
  2744. is easy to install in a nonstandard place.  The standard names for these
  2745. variables are described below.  They are based on a standard filesystem
  2746. layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
  2747. other modern operating systems.
  2748.  
  2749.    These two variables set the root for the installation.  All the other
  2750. installation directories should be subdirectories of one of these two,
  2751. and nothing should be directly installed into these two directories.
  2752.  
  2753. `prefix'
  2754.      A prefix used in constructing the default values of the variables
  2755.      listed below.  The default value of `prefix' should be
  2756.      `/usr/local'.  When building the complete GNU system, the prefix
  2757.      will be empty and `/usr' will be a symbolic link to `/'.  (If you
  2758.      are using Autoconf, write it as `@prefix@'.)
  2759.  
  2760. `exec_prefix'
  2761.      A prefix used in constructing the default values of some of the
  2762.      variables listed below.  The default value of `exec_prefix' should
  2763.      be `$(prefix)'.  (If you are using Autoconf, write it as
  2764.      `@exec_prefix@'.)
  2765.  
  2766.      Generally, `$(exec_prefix)' is used for directories that contain
  2767.      machine-specific files (such as executables and subroutine
  2768.      libraries), while `$(prefix)' is used directly for other
  2769.      directories.
  2770.  
  2771.    Executable programs are installed in one of the following
  2772. directories.
  2773.  
  2774. `bindir'
  2775.      The directory for installing executable programs that users can
  2776.      run.  This should normally be `/usr/local/bin', but write it as
  2777.      `$(exec_prefix)/bin'.  (If you are using Autoconf, write it as
  2778.      `@bindir@'.)
  2779.  
  2780. `sbindir'
  2781.      The directory for installing executable programs that can be run
  2782.      from the shell, but are only generally useful to system
  2783.      administrators.  This should normally be `/usr/local/sbin', but
  2784.      write it as `$(exec_prefix)/sbin'.  (If you are using Autoconf,
  2785.      write it as `@sbindir@'.)
  2786.  
  2787. `libexecdir'
  2788.      The directory for installing executable programs to be run by other
  2789.      programs rather than by users.  This directory should normally be
  2790.      `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'.
  2791.      (If you are using Autoconf, write it as `@libexecdir@'.)
  2792.  
  2793.    Data files used by the program during its execution are divided into
  2794. categories in two ways.
  2795.  
  2796.    * Some files are normally modified by programs; others are never
  2797.      normally modified (though users may edit some of these).
  2798.  
  2799.    * Some files are architecture-independent and can be shared by all
  2800.      machines at a site; some are architecture-dependent and can be
  2801.      shared only by machines of the same kind and operating system;
  2802.      others may never be shared between two machines.
  2803.  
  2804.    This makes for six different possibilities.  However, we want to
  2805. discourage the use of architecture-dependent files, aside from object
  2806. files and libraries.  It is much cleaner to make other data files
  2807. architecture-independent, and it is generally not hard.
  2808.  
  2809.    Therefore, here are the variables Makefiles should use to specify
  2810. directories:
  2811.  
  2812. `datadir'
  2813.      The directory for installing read-only architecture independent
  2814.      data files.  This should normally be `/usr/local/share', but write
  2815.      it as `$(prefix)/share'.  (If you are using Autoconf, write it as
  2816.      `@datadir@'.) As a special exception, see `$(infodir)' and
  2817.      `$(includedir)' below.
  2818.  
  2819. `sysconfdir'
  2820.      The directory for installing read-only data files that pertain to a
  2821.      single machine-that is to say, files for configuring a host.
  2822.      Mailer and network configuration files, `/etc/passwd', and so
  2823.      forth belong here.  All the files in this directory should be
  2824.      ordinary ASCII text files.  This directory should normally be
  2825.      `/usr/local/etc', but write it as `$(prefix)/etc'.  (If you are
  2826.      using Autoconf, write it as `@sysconfdir@'.)
  2827.  
  2828.      Do not install executables in this directory (they probably belong
  2829.      in `$(libexecdir)' or `$(sbindir)').  Also do not install files
  2830.      that are modified in the normal course of their use (programs
  2831.      whose purpose is to change the configuration of the system
  2832.      excluded).  Those probably belong in `$(localstatedir)'.
  2833.  
  2834. `sharedstatedir'
  2835.      The directory for installing architecture-independent data files
  2836.      which the programs modify while they run.  This should normally be
  2837.      `/usr/local/com', but write it as `$(prefix)/com'.  (If you are
  2838.      using Autoconf, write it as `@sharedstatedir@'.)
  2839.  
  2840. `localstatedir'
  2841.      The directory for installing data files which the programs modify
  2842.      while they run, and that pertain to one specific machine.  Users
  2843.      should never need to modify files in this directory to configure
  2844.      the package's operation; put such configuration information in
  2845.      separate files that go in `$(datadir)' or `$(sysconfdir)'.
  2846.      `$(localstatedir)' should normally be `/usr/local/var', but write
  2847.      it as `$(prefix)/var'.  (If you are using Autoconf, write it as
  2848.      `@localstatedir@'.)
  2849.  
  2850. `libdir'
  2851.      The directory for object files and libraries of object code.  Do
  2852.      not install executables here, they probably ought to go in
  2853.      `$(libexecdir)' instead.  The value of `libdir' should normally be
  2854.      `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
  2855.      are using Autoconf, write it as `@libdir@'.)
  2856.  
  2857. `infodir'
  2858.      The directory for installing the Info files for this package.  By
  2859.      default, it should be `/usr/local/info', but it should be written
  2860.      as `$(prefix)/info'.  (If you are using Autoconf, write it as
  2861.      `@infodir@'.)
  2862.  
  2863. `includedir'
  2864.      The directory for installing header files to be included by user
  2865.      programs with the C `#include' preprocessor directive.  This
  2866.      should normally be `/usr/local/include', but write it as
  2867.      `$(prefix)/include'.  (If you are using Autoconf, write it as
  2868.      `@includedir@'.)
  2869.  
  2870.      Most compilers other than GCC do not look for header files in
  2871.      `/usr/local/include'.  So installing the header files this way is
  2872.      only useful with GCC.  Sometimes this is not a problem because some
  2873.      libraries are only really intended to work with GCC.  But some
  2874.      libraries are intended to work with other compilers.  They should
  2875.      install their header files in two places, one specified by
  2876.      `includedir' and one specified by `oldincludedir'.
  2877.  
  2878. `oldincludedir'
  2879.      The directory for installing `#include' header files for use with
  2880.      compilers other than GCC.  This should normally be `/usr/include'.
  2881.      (If you are using Autoconf, you can write it as `@oldincludedir@'.)
  2882.  
  2883.      The Makefile commands should check whether the value of
  2884.      `oldincludedir' is empty.  If it is, they should not try to use
  2885.      it; they should cancel the second installation of the header files.
  2886.  
  2887.      A package should not replace an existing header in this directory
  2888.      unless the header came from the same package.  Thus, if your Foo
  2889.      package provides a header file `foo.h', then it should install the
  2890.      header file in the `oldincludedir' directory if either (1) there
  2891.      is no `foo.h' there or (2) the `foo.h' that exists came from the
  2892.      Foo package.
  2893.  
  2894.      To tell whether `foo.h' came from the Foo package, put a magic
  2895.      string in the file--part of a comment--and `grep' for that string.
  2896.  
  2897.    Unix-style man pages are installed in one of the following:
  2898.  
  2899. `mandir'
  2900.      The top-level directory for installing the man pages (if any) for
  2901.      this package.  It will normally be `/usr/local/man', but you should
  2902.      write it as `$(prefix)/man'.  (If you are using Autoconf, write it
  2903.      as `@mandir@'.)
  2904.  
  2905. `man1dir'
  2906.      The directory for installing section 1 man pages.  Write it as
  2907.      `$(mandir)/man1'.
  2908.  
  2909. `man2dir'
  2910.      The directory for installing section 2 man pages.  Write it as
  2911.      `$(mandir)/man2'
  2912.  
  2913. `...'
  2914.      *Don't make the primary documentation for any GNU software be a
  2915.      man page.  Write a manual in Texinfo instead.  Man pages are just
  2916.      for the sake of people running GNU software on Unix, which is a
  2917.      secondary application only.*
  2918.  
  2919. `manext'
  2920.      The file name extension for the installed man page.  This should
  2921.      contain a period followed by the appropriate digit; it should
  2922.      normally be `.1'.
  2923.  
  2924. `man1ext'
  2925.      The file name extension for installed section 1 man pages.
  2926.  
  2927. `man2ext'
  2928.      The file name extension for installed section 2 man pages.
  2929.  
  2930. `...'
  2931.      Use these names instead of `manext' if the package needs to
  2932.      install man pages in more than one section of the manual.
  2933.  
  2934.    And finally, you should set the following variable:
  2935.  
  2936. `srcdir'
  2937.      The directory for the sources being compiled.  The value of this
  2938.      variable is normally inserted by the `configure' shell script.
  2939.      (If you are using Autconf, use `srcdir = @srcdir@'.)
  2940.  
  2941.    For example:
  2942.  
  2943.      # Common prefix for installation directories.
  2944.      # NOTE: This directory must exist when you start the install.
  2945.      prefix = /usr/local
  2946.      exec_prefix = $(prefix)
  2947.      # Where to put the executable for the command `gcc'.
  2948.      bindir = $(exec_prefix)/bin
  2949.      # Where to put the directories used by the compiler.
  2950.      libexecdir = $(exec_prefix)/libexec
  2951.      # Where to put the Info files.
  2952.      infodir = $(prefix)/info
  2953.  
  2954.    If your program installs a large number of files into one of the
  2955. standard user-specified directories, it might be useful to group them
  2956. into a subdirectory particular to that program.  If you do this, you
  2957. should write the `install' rule to create these subdirectories.
  2958.  
  2959.    Do not expect the user to include the subdirectory name in the value
  2960. of any of the variables listed above.  The idea of having a uniform set
  2961. of variable names for installation directories is to enable the user to
  2962. specify the exact same values for several different GNU packages.  In
  2963. order for this to be useful, all the packages must be designed so that
  2964. they will work sensibly when the user does so.
  2965.  
  2966. 
  2967. File: standards.info,  Node: Standard Targets,  Prev: Directory Variables,  Up: Makefile Conventions
  2968.  
  2969. Standard Targets for Users
  2970. --------------------------
  2971.  
  2972.    All GNU programs should have the following targets in their
  2973. Makefiles:
  2974.  
  2975. `all'
  2976.      Compile the entire program.  This should be the default target.
  2977.      This target need not rebuild any documentation files; Info files
  2978.      should normally be included in the distribution, and DVI files
  2979.      should be made only when explicitly asked for.
  2980.  
  2981.      By default, the Make rules should compile and link with `-g', so
  2982.      that executable programs have debugging symbols.  Users who don't
  2983.      mind being helpless can strip the executables later if they wish.
  2984.  
  2985. `install'
  2986.      Compile the program and copy the executables, libraries, and so on
  2987.      to the file names where they should reside for actual use.  If
  2988.      there is a simple test to verify that a program is properly
  2989.      installed, this target should run that test.
  2990.  
  2991.      Do not strip executables when installing them.  Devil-may-care
  2992.      users can use the `install-strip' target to do that.
  2993.  
  2994.      If possible, write the `install' target rule so that it does not
  2995.      modify anything in the directory where the program was built,
  2996.      provided `make all' has just been done.  This is convenient for
  2997.      building the program under one user name and installing it under
  2998.      another.
  2999.  
  3000.      The commands should create all the directories in which files are
  3001.      to be installed, if they don't already exist.  This includes the
  3002.      directories specified as the values of the variables `prefix' and
  3003.      `exec_prefix', as well as all subdirectories that are needed.  One
  3004.      way to do this is by means of an `installdirs' target as described
  3005.      below.
  3006.  
  3007.      Use `-' before any command for installing a man page, so that
  3008.      `make' will ignore any errors.  This is in case there are systems
  3009.      that don't have the Unix man page documentation system installed.
  3010.  
  3011.      The way to install Info files is to copy them into `$(infodir)'
  3012.      with `$(INSTALL_DATA)' (*note Command Variables::.), and then run
  3013.      the `install-info' program if it is present.  `install-info' is a
  3014.      program that edits the Info `dir' file to add or update the menu
  3015.      entry for the given Info file; it is part of the Texinfo package.
  3016.      Here is a sample rule to install an Info file:
  3017.  
  3018.           $(infodir)/foo.info: foo.info
  3019.           # There may be a newer info file in . than in srcdir.
  3020.                   -if test -f foo.info; then d=.; \
  3021.                    else d=$(srcdir); fi; \
  3022.                   $(INSTALL_DATA) $$d/foo.info $@; \
  3023.           # Run install-info only if it exists.
  3024.           # Use `if' instead of just prepending `-' to the
  3025.           # line so we notice real errors from install-info.
  3026.           # We use `$(SHELL) -c' because some shells do not
  3027.           # fail gracefully when there is an unknown command.
  3028.                   if $(SHELL) -c 'install-info --version' \
  3029.                      >/dev/null 2>&1; then \
  3030.                     install-info --dir-file=$(infodir)/dir \
  3031.                                  $(infodir)/foo.info; \
  3032.                   else true; fi
  3033.  
  3034. `uninstall'
  3035.      Delete all the installed files that the `install' target would
  3036.      create (but not the noninstalled files such as `make all' would
  3037.      create).
  3038.  
  3039.      This rule should not modify the directories where compilation is
  3040.      done, only the directories where files are installed.
  3041.  
  3042. `install-strip'
  3043.      Like `install', but strip the executable files while installing
  3044.      them.  The definition of this target can be very simple:
  3045.  
  3046.           install-strip:
  3047.                   $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
  3048.                           install
  3049.  
  3050.      Normally we do not recommend stripping an executable unless you
  3051.      are sure the program has no bugs.  However, it can be reasonable
  3052.      to install a stripped executable for actual execution while saving
  3053.      the unstripped executable elsewhere in case there is a bug.
  3054.  
  3055. `clean'
  3056.      Delete all files from the current directory that are normally
  3057.      created by building the program.  Don't delete the files that
  3058.      record the configuration.  Also preserve files that could be made
  3059.      by building, but normally aren't because the distribution comes
  3060.      with them.
  3061.  
  3062.      Delete `.dvi' files here if they are not part of the distribution.
  3063.  
  3064. `distclean'
  3065.      Delete all files from the current directory that are created by
  3066.      configuring or building the program.  If you have unpacked the
  3067.      source and built the program without creating any other files,
  3068.      `make distclean' should leave only the files that were in the
  3069.      distribution.
  3070.  
  3071. `mostlyclean'
  3072.      Like `clean', but may refrain from deleting a few files that people
  3073.      normally don't want to recompile.  For example, the `mostlyclean'
  3074.      target for GCC does not delete `libgcc.a', because recompiling it
  3075.      is rarely necessary and takes a lot of time.
  3076.  
  3077. `maintainer-clean'
  3078.      Delete almost everything from the current directory that can be
  3079.      reconstructed with this Makefile.  This typically includes
  3080.      everything deleted by `distclean', plus more: C source files
  3081.      produced by Bison, tags tables, Info files, and so on.
  3082.  
  3083.      The reason we say "almost everything" is that running the command
  3084.      `make maintainer-clean' should not delete `configure' even if
  3085.      `configure' can be remade using a rule in the Makefile.  More
  3086.      generally, `make maintainer-clean' should not delete anything that
  3087.      needs to exist in order to run `configure' and then begin to build
  3088.      the program.  This is the only exception; `maintainer-clean' should
  3089.      delete everything else that can be rebuilt.
  3090.  
  3091.      The `maintainer-clean' target is intended to be used by a
  3092.      maintainer of the package, not by ordinary users.  You may need
  3093.      special tools to reconstruct some of the files that `make
  3094.      maintainer-clean' deletes.  Since these files are normally
  3095.      included in the distribution, we don't take care to make them easy
  3096.      to reconstruct.  If you find you need to unpack the full
  3097.      distribution again, don't blame us.
  3098.  
  3099.      To help make users aware of this, the commands for the special
  3100.      `maintainer-clean' target should start with these two:
  3101.  
  3102.           @echo 'This command is intended for maintainers to use; it'
  3103.           @echo 'deletes files that may need special tools to rebuild.'
  3104.  
  3105. `TAGS'
  3106.      Update a tags table for this program.
  3107.  
  3108. `info'
  3109.      Generate any Info files needed.  The best way to write the rules
  3110.      is as follows:
  3111.  
  3112.           info: foo.info
  3113.           
  3114.           foo.info: foo.texi chap1.texi chap2.texi
  3115.                   $(MAKEINFO) $(srcdir)/foo.texi
  3116.  
  3117.      You must define the variable `MAKEINFO' in the Makefile.  It should
  3118.      run the `makeinfo' program, which is part of the Texinfo
  3119.      distribution.
  3120.  
  3121. `dvi'
  3122.      Generate DVI files for all Texinfo documentation.  For example:
  3123.  
  3124.           dvi: foo.dvi
  3125.           
  3126.           foo.dvi: foo.texi chap1.texi chap2.texi
  3127.                   $(TEXI2DVI) $(srcdir)/foo.texi
  3128.  
  3129.      You must define the variable `TEXI2DVI' in the Makefile.  It should
  3130.      run the program `texi2dvi', which is part of the Texinfo
  3131.      distribution.(1)  Alternatively, write just the dependencies, and
  3132.      allow GNU `make' to provide the command.
  3133.  
  3134. `dist'
  3135.      Create a distribution tar file for this program.  The tar file
  3136.      should be set up so that the file names in the tar file start with
  3137.      a subdirectory name which is the name of the package it is a
  3138.      distribution for.  This name can include the version number.
  3139.  
  3140.      For example, the distribution tar file of GCC version 1.40 unpacks
  3141.      into a subdirectory named `gcc-1.40'.
  3142.  
  3143.      The easiest way to do this is to create a subdirectory
  3144.      appropriately named, use `ln' or `cp' to install the proper files
  3145.      in it, and then `tar' that subdirectory.
  3146.  
  3147.      Compress the tar file file with `gzip'.  For example, the actual
  3148.      distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'.
  3149.  
  3150.      The `dist' target should explicitly depend on all non-source files
  3151.      that are in the distribution, to make sure they are up to date in
  3152.      the distribution.  *Note Making Releases: Releases.
  3153.  
  3154. `check'
  3155.      Perform self-tests (if any).  The user must build the program
  3156.      before running the tests, but need not install the program; you
  3157.      should write the self-tests so that they work when the program is
  3158.      built but not installed.
  3159.  
  3160.    The following targets are suggested as conventional names, for
  3161. programs in which they are useful.
  3162.  
  3163. `installcheck'
  3164.      Perform installation tests (if any).  The user must build and
  3165.      install the program before running the tests.  You should not
  3166.      assume that `$(bindir)' is in the search path.
  3167.  
  3168. `installdirs'
  3169.      It's useful to add a target named `installdirs' to create the
  3170.      directories where files are installed, and their parent
  3171.      directories.  There is a script called `mkinstalldirs' which is
  3172.      convenient for this; you can find it in the Texinfo package.  You
  3173.      can use a rule like this:
  3174.  
  3175.           # Make sure all installation directories (e.g. $(bindir))
  3176.           # actually exist by making them if necessary.
  3177.           installdirs: mkinstalldirs
  3178.                   $(srcdir)/mkinstalldirs $(bindir) $(datadir) \
  3179.                                           $(libdir) $(infodir) \
  3180.                                           $(mandir)
  3181.  
  3182.      This rule should not modify the directories where compilation is
  3183.      done.  It should do nothing but create installation directories.
  3184.  
  3185.    ---------- Footnotes ----------
  3186.  
  3187.    (1)  `texi2dvi' uses TeX to do the real work of formatting. TeX is
  3188. not distributed with Texinfo.
  3189.  
  3190. 
  3191. File: standards.info,  Node: Releases,  Prev: Makefile Conventions,  Up: Managing Releases
  3192.  
  3193. Making Releases
  3194. ===============
  3195.  
  3196.    Package the distribution of Foo version 69.96 in a gzipped tar file
  3197. named `foo-69.96.tar.gz'.  It should unpack into a subdirectory named
  3198. `foo-69.96'.
  3199.  
  3200.    Building and installing the program should never modify any of the
  3201. files contained in the distribution.  This means that all the files
  3202. that form part of the program in any way must be classified into "source
  3203. files" and "non-source files".  Source files are written by humans and
  3204. never changed automatically; non-source files are produced from source
  3205. files by programs under the control of the Makefile.
  3206.  
  3207.    Naturally, all the source files must be in the distribution.  It is
  3208. okay to include non-source files in the distribution, provided they are
  3209. up-to-date and machine-independent, so that building the distribution
  3210. normally will never modify them.  We commonly include non-source files
  3211. produced by Bison, `lex', TeX, and `makeinfo'; this helps avoid
  3212. unnecessary dependencies between our distributions, so that users can
  3213. install whichever packages they want to install.
  3214.  
  3215.    Non-source files that might actually be modified by building and
  3216. installing the program should *never* be included in the distribution.
  3217. So if you do distribute non-source files, always make sure they are up
  3218. to date when you make a new distribution.
  3219.  
  3220.    Make sure that the directory into which the distribution unpacks (as
  3221. well as any subdirectories) are all world-writable (octal mode 777).
  3222. This is so that old versions of `tar' which preserve the ownership and
  3223. permissions of the files from the tar archive will be able to extract
  3224. all the files even if the user is unprivileged.
  3225.  
  3226.    Make sure that all the files in the distribution are world-readable.
  3227.  
  3228.    Make sure that no file name in the distribution is more than 14
  3229. characters long.  Likewise, no file created by building the program
  3230. should have a name longer than 14 characters.  The reason for this is
  3231. that some systems adhere to a foolish interpretation of the POSIX
  3232. standard, and refuse to open a longer name, rather than truncating as
  3233. they did in the past.
  3234.  
  3235.    Don't include any symbolic links in the distribution itself.  If the
  3236. tar file contains symbolic links, then people cannot even unpack it on
  3237. systems that don't support symbolic links.  Also, don't use multiple
  3238. names for one file in different directories, because certain file
  3239. systems cannot handle this and that prevents unpacking the distribution.
  3240.  
  3241.    Try to make sure that all the file names will be unique on MS-DOS.  A
  3242. name on MS-DOS consists of up to 8 characters, optionally followed by a
  3243. period and up to three characters.  MS-DOS will truncate extra
  3244. characters both before and after the period.  Thus, `foobarhacker.c'
  3245. and `foobarhacker.o' are not ambiguous; they are truncated to
  3246. `foobarha.c' and `foobarha.o', which are distinct.
  3247.  
  3248.    Include in your distribution a copy of the `texinfo.tex' you used to
  3249. test print any `*.texinfo' or `*.texi' files.
  3250.  
  3251.    Likewise, if your program uses small GNU software packages like
  3252. regex, getopt, obstack, or termcap, include them in the distribution
  3253. file.  Leaving them out would make the distribution file a little
  3254. smaller at the expense of possible inconvenience to a user who doesn't
  3255. know what other files to get.
  3256.  
  3257.  
  3258. 
  3259. Tag Table:
  3260. Node: Top968
  3261. Node: Preface1482
  3262. Node: Intellectual Property2525
  3263. Node: Reading Non-Free Code2881
  3264. Node: Contributions4613
  3265. Node: Design Advice6211
  3266. Node: Compatibility6694
  3267. Node: Using Extensions8338
  3268. Node: ANSI C9840
  3269. Node: Source Language11076
  3270. Node: Program Behavior12210
  3271. Node: Semantics12802
  3272. Node: Libraries16556
  3273. Node: Errors17791
  3274. Node: User Interfaces19014
  3275. Node: Memory Usage36015
  3276. Node: Writing C37012
  3277. Node: Formatting37654
  3278. Node: Comments40926
  3279. Node: Syntactic Conventions43719
  3280. Node: Names46617
  3281. Node: System Portability47929
  3282. Node: CPU Portability49705
  3283. Node: System Functions51812
  3284. Node: Documentation56684
  3285. Node: GNU Manuals57228
  3286. Node: Manual Structure Details59270
  3287. Node: NEWS File60675
  3288. Node: Change Logs61356
  3289. Node: Man Pages65109
  3290. Node: Reading other Manuals66728
  3291. Node: Managing Releases67512
  3292. Node: Configuration68218
  3293. Node: Makefile Conventions75158
  3294. Node: Makefile Basics75682
  3295. Node: Utilities in Makefiles78153
  3296. Node: Command Variables80027
  3297. Node: Directory Variables82863
  3298. Node: Standard Targets92968
  3299. Node: Releases102716
  3300. 
  3301. End Tag Table
  3302.