Index: standards.texi =================================================================== RCS file: /sources/gnustandards/gnustandards/standards.texi,v retrieving revision 1.209 diff -c -r1.209 standards.texi *** standards.texi 10 Dec 2011 16:27:20 -0000 1.209 --- standards.texi 21 Dec 2011 16:23:44 -0000 *************** *** 3647,3670 **** @cindex conditional changes, and change logs @cindex change logs, conditional changes ! C programs often contain compile-time @code{#if} conditionals. Many ! changes are conditional; sometimes you add a new definition which is ! entirely contained in a conditional. It is very useful to indicate in ! the change log the conditions for which the change applies. ! ! Our convention for indicating conditional changes is to use square ! brackets around the name of the condition. ! ! Here is a simple example, describing a change which is conditional but ! does not have a function or entity name associated with it: @example ! * xterm.c [SOLARIS2]: Include string.h. @end example Here is an entry describing a new definition which is entirely conditional. This new definition for the macro @code{FRAME_WINDOW_P} is ! used only when @code{HAVE_X_WINDOWS} is defined: @example * frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. --- 3647,3689 ---- @cindex conditional changes, and change logs @cindex change logs, conditional changes ! Source files can often contain code that is conditional to build-time ! or static conditions. For example, C programs can contain compile-time ! @code{#if} conditionals; programs implemented in interpreted languages ! (like python or perl) can contain module imports of function definitions ! that are only performed for certain versions of the interpreter; and ! Automake @file{Makefile.am} files can contain variable definitions or ! target declarations that are only to be considered if a configure-time ! Automake conditional is true. ! ! Many changes are conditional as well: sometimes you add a new variable, ! or function, or even a new program or library, which is entirely ! dependent on a build-time condition. It is very useful to indicate ! in the change log the conditions for which the change applies. ! ! Our convention for indicating conditional changes is to use @strong{square ! brackets around the name of the condition}. ! ! Conditional changes can happen in various scenarios and in many variants, ! so we'll further clarify our advice with the help of some examples. In ! the first example we'll use all of C, python and perl; the next examples ! will for simplicity be limited to the use C, as the minor changes necessary ! to adapt them to other languages should be self-evident. ! ! So here is our first simple example, describing changes which are ! conditional but does not have a function or entity name associated ! with them: @example ! * xterm.c [SOLARIS2]: Include . ! * FilePath.pm [$^O eq 'VMS']: Import the VMS::Feature module. ! * framework.py [sys.version_info < (2, 6)]: Make "with" statement available ! by importing it from __future__, to support also python 2.5 @end example Here is an entry describing a new definition which is entirely conditional. This new definition for the macro @code{FRAME_WINDOW_P} is ! used only when the macro @code{HAVE_X_WINDOWS} is defined: @example * frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. *************** *** 3678,3684 **** * dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. @end example ! Here is an entry for a change that takes affect only when a certain macro is @emph{not} defined: @example --- 3697,3703 ---- * dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. @end example ! Finally, here is an entry for a change that takes affect only when a certain macro is @emph{not} defined: @example