@setfilename standards.info
@settitle GNU Coding Standards
@c This date is automagically updated when you save this file:
-@set lastupdate February 23, 2008
+@set lastupdate September 14, 2009
@c %**end of header
@dircategory GNU organization
The GNU coding standards, last updated @value{lastupdate}.
Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no
-Front-Cover Texts, and with no Back-Cover Texts.
-A copy of the license is included in the section entitled ``GNU
-Free Documentation License''.
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the section entitled
+``GNU Free Documentation License''.
@end copying
@titlepage
is written in that language, too. The Emacs editor pioneered this
technique.
-@cindex GUILE
-The standard extensibility interpreter for GNU software is GUILE
+@cindex Guile
+@cindex GNOME and Guile
+The standard extensibility interpreter for GNU software is Guile
(@uref{http://www.gnu.org/@/software/@/guile/}), which implements the
-language Scheme (an especially clean and simple dialect of Lisp). We
-don't reject programs written in other ``scripting languages'' such as
-Perl and Python, but using GUILE is very important for the overall
-consistency of the GNU system.
+language Scheme (an especially clean and simple dialect of Lisp).
+Guile also includes bindings for GTK+/GNOME, making it practical to
+write modern GUI functionality within Guile. We don't reject programs
+written in other ``scripting languages'' such as Perl and Python, but
+using Guile is very important for the overall consistency of the GNU
+system.
+
@node Compatibility
@section Compatibility with Other Implementations
* Graphical Interfaces:: Standards for graphical interfaces.
* Command-Line Interfaces:: Standards for command line interfaces.
* Option Table:: Table of long options.
+* OID Allocations:: Table of OID slots for GNU.
* Memory Usage:: When and how to care about memory needs.
* File Usage:: Which files to use, and where.
@end menu
GNU GPL with the exception for Guile; for example, GPLv3+/Guile means
the GNU GPL version 3 or later, with the extra exception for Guile.
+@item GPL/Ada
GNU GPL with the exception for Ada.
@item Apache
@cindex address for bug reports
@cindex bug reports
-Near the end of the @samp{--help} option's output there should be a line
-that says where to mail bug reports. It should have this format:
+Near the end of the @samp{--help} option's output, please place lines
+giving the email address for bug reports, the package's home page
+(normally @indicateurl{http://www.gnu.org/software/@var{pkg}}, and the
+general page for help using GNU programs. The format should be like this:
@example
-Report bugs to @var{mailing-address}.
+Report bugs to: @var{mailing-address}
+@var{pkg} home page: <http://www.gnu.org/software/@var{pkg}/>
+General help using GNU software: <http://www.gnu.org/gethelp/>
@end example
+It is ok to mention other appropriate mailing lists and web pages.
+
@node Option Table
@section Table of Long Options
@samp{-v} in @code{gawk}.
@item assume-new
-@samp{-W} in Make.
+@samp{-W} in @code{make}.
@item assume-old
-@samp{-o} in Make.
+@samp{-o} in @code{make}.
@item auto-check
@samp{-a} in @code{recode}.
@samp{-d} in @code{touch}.
@item debug
-@samp{-d} in Make and @code{m4};
+@samp{-d} in @code{make} and @code{m4};
@samp{-t} in Bison.
@item define
@samp{-X} in @code{strip}.
@item dry-run
-@samp{-n} in Make.
+@samp{-n} in @code{make}.
@item ed
@samp{-e} in @code{diff}.
@samp{-N} in @code{diff}.
@item environment-overrides
-@samp{-e} in Make.
+@samp{-e} in @code{make}.
@item eof
@samp{-e} in @code{xargs}.
@samp{-E} in @code{m4}.
@item file
-@samp{-f} in @code{info}, @code{gawk}, Make, @code{mt}, and @code{tar};
-@samp{-n} in @code{sed};
-@samp{-r} in @code{touch}.
+@samp{-f} in @code{gawk}, @code{info}, @code{make}, @code{mt},
+@code{sed}, and @code{tar}.
@item field-separator
@samp{-F} in @code{gawk}.
@samp{-i} in @code{diff} and @code{wdiff}.
@item ignore-errors
-@samp{-i} in Make.
+@samp{-i} in @code{make}.
@item ignore-file
@samp{-i} in @code{ptx}.
@samp{-I} in @code{m4}.
@item include-dir
-@samp{-I} in Make.
+@samp{-I} in @code{make}.
@item incremental
@samp{-G} in @code{tar}.
Used in @code{date}
@item jobs
-@samp{-j} in Make.
+@samp{-j} in @code{make}.
@item just-print
-@samp{-n} in Make.
+@samp{-n} in @code{make}.
@item keep-going
-@samp{-k} in Make.
+@samp{-k} in @code{make}.
@item keep-files
@samp{-k} in @code{csplit}.
@samp{-N} in @code{ls}.
@item load-average
-@samp{-l} in Make.
+@samp{-l} in @code{make}.
@item login
Used in @code{su}.
@samp{-d} in @code{cpio}.
@item makefile
-@samp{-f} in Make.
+@samp{-f} in @code{make}.
@item mapped
Used in GDB.
@samp{-l} in @code{xargs}.
@item max-load
-@samp{-l} in Make.
+@samp{-l} in @code{make}.
@item max-procs
@samp{-P} in @code{xargs}.
@samp{-a} in @code{shar}.
@item new-file
-@samp{-W} in Make.
+@samp{-W} in @code{make}.
@item no-builtin-rules
-@samp{-r} in Make.
+@samp{-r} in @code{make}.
@item no-character-count
@samp{-w} in @code{shar}.
@samp{-2} in @code{wdiff}.
@item no-keep-going
-@samp{-S} in Make.
+@samp{-S} in @code{make}.
@item no-lines
@samp{-l} in Bison.
@samp{-o} in @code{tar}.
@item old-file
-@samp{-o} in Make.
+@samp{-o} in @code{make}.
@item one-file-system
@samp{-l} in @code{tar}, @code{cp}, and @code{du}.
@samp{-L} in @code{cmp}.
@item print-data-base
-@samp{-p} in Make.
+@samp{-p} in @code{make}.
@item print-directory
-@samp{-w} in Make.
+@samp{-w} in @code{make}.
@item print-file-name
@samp{-o} in @code{nm}.
@samp{-X} in @code{shar}.
@item question
-@samp{-q} in Make.
+@samp{-q} in @code{make}.
@item quiet
Used in many programs to inhibit the usual output. Every
Used in GDB.
@item recon
-@samp{-n} in Make.
+@samp{-n} in @code{make}.
@item record-number
@samp{-R} in @code{tar}.
Used in @code{chgrp}, @code{chown}, @code{cp}, @code{ls}, @code{diff},
and @code{rm}.
-@item reference-limit
-Used in @code{makeinfo}.
+@item reference
+@samp{-r} in @code{touch}.
@item references
@samp{-r} in @code{ptx}.
@samp{-S} in @code{shar}.
@item stop
-@samp{-S} in Make.
+@samp{-S} in @code{make}.
@item strict
@samp{-s} in @code{recode}.
@samp{-c} in @code{du}.
@item touch
-@samp{-t} in Make, @code{ranlib}, and @code{recode}.
+@samp{-t} in @code{make}, @code{ranlib}, and @code{recode}.
@item trace
@samp{-t} in @code{m4}.
@samp{-V} in @code{tar}.
@item what-if
-@samp{-W} in Make.
+@samp{-W} in @code{make}.
@item whole-size-limit
@samp{-l} in @code{shar}.
@samp{-z} in @code{gprof}.
@end table
+@node OID Allocations
+@section OID Allocations
+@cindex OID allocations for GNU
+@cindex SNMP
+@cindex LDAP
+@cindex X.509
+
+The OID (object identifier) 1.3.6.1.4.1.11591 has been assigned to the
+GNU Project (thanks to Werner Koch). These are used for SNMP, LDAP,
+X.509 certificates, and so on. The web site
+@url{http://www.alvestrand.no/objectid} has a (voluntary) listing of
+many OID assignments.
+
+If you need a new slot for your GNU package, write
+@email{maintainers@@gnu.org}. Here is a list of arcs currently
+assigned:
+
+@example
+@include gnu-oids.texi
+@end example
+
+
@node Memory Usage
@section Memory Usage
@cindex memory usage
is more authoritative. The note should say how to access the Texinfo
documentation.
-Be sure that man pages include a copyright statement and free
-license. The simple all-permissive license is appropriate for simple
-man pages:
-
-@example
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-@end example
+Be sure that man pages include a copyright statement and free license.
+The simple all-permissive license is appropriate for simple man pages
+(@pxref{License Notices for Other Files,,,maintain,Information for GNU
+Maintainers}).
For long man pages, with enough explanation and documentation that
they can be considered true manuals, use the GFDL (@pxref{License for
Each GNU distribution should come with a shell script named
@code{configure}. This script is given arguments which describe the
kind of machine and system you want to compile the program for.
-
The @code{configure} script must record the configuration options so
that they affect compilation.
-One way to do this is to make a link from a standard name such as
-@file{config.h} to the proper configuration file for the chosen system.
-If you use this technique, the distribution should @emph{not} contain a
-file named @file{config.h}. This is so that people won't be able to
-build the program without configuring it first.
+The description here is the specification of the interface for the
+@code{configure} script in GNU packages. Many packages implement it
+using GNU Autoconf (@pxref{Top,, Introduction, autoconf, Autoconf})
+and/or GNU Automake (@pxref{Top,, Introduction, automake, Automake}),
+but you do not have to use these tools. You can implement it any way
+you like; for instance, by making @code{configure} be a wrapper around
+a completely different configuration system.
+
+Another way for the @code{configure} script to operate is to make a
+link from a standard name such as @file{config.h} to the proper
+configuration file for the chosen system. If you use this technique,
+the distribution should @emph{not} contain a file named
+@file{config.h}. This is so that people won't be able to build the
+program without configuring it first.
Another thing that @code{configure} can do is to edit the Makefile. If
you do this, the distribution should @emph{not} contain a file named
CC=gcc ./configure
@end example
as it helps to recreate the same configuration later with
-@file{config.status}.
+@file{config.status}. However, both methods should be supported.
@end table
All @code{configure} scripts should accept all of the ``detail''
The @file{README} file should also refer to the file which contains the
copying conditions. The GNU GPL, if used, should be in a file called
@file{COPYING}. If the GNU LGPL is used, it should be in a file called
-@file{COPYING.LIB}.
+@file{COPYING.LESSER}.
Naturally, all the source files must be in the distribution. It is okay
to include non-source files in the distribution, provided they are
time-stamp-start: "@set lastupdate "
time-stamp-end: "$"
time-stamp-format: "%:b %:d, %:y"
-compile-command: "make just-standards"
+compile-command: "cd work.s && make"
End: