On Fri, Sep 10, 1999 at 04:28:08AM +0200, Marcus Brinkmann wrote:
> 
> I have written down what I think to be a better proposal

Of course, because I am utterly stupid, I forgot to attach the beast.

--- policy.sgml.old     Fri Sep 10 03:45:13 1999
+++ policy.sgml Fri Sep 10 04:10:28 1999
@@ -1966,13 +1966,13 @@
            Generally the following compilation parameters should be used:
            <example>
              CC = gcc 
-             CFLAGS = -O2 -g -Wall # sane warning options vary between 
programs 
+             CFLAGS = -O2 -Wall # sane warning options vary between programs 
              LDFLAGS = # none 
              install -s # (or use strip on the files in debian/tmp)
            </example></p>
            
          <p>
-           Note that all installed binaries should be stripped,
+           Note that by default all installed binaries should be stripped,
            either by using the <tt>-s</tt> flag to
            <prgn>install</prgn>, or by calling <prgn>strip</prgn> on
            the binaries after they have been copied into
@@ -1980,16 +1980,35 @@
            package.</p>
            
          <p>
-           The <tt>-g</tt> flag is useful on compilation so that you
-           have available a full set of debugging symbols in your
-           built source tree, in case anyone should file a bug report
-           involving (for example) a core dump.</p>
-           
-         <p>
            The <tt>-N</tt> flag should not be used.  On a.out systems
            it may have been useful for some very small binaries, but
            for ELF it has no good effect.</p>
-           
+
+         <p>
+           It is recommended to support building the package with
+           debugging information through the following interface:
+           If the environment variable <tt>DEB_BUILD_OPTIONS</tt>
+           contains the string <tt>debug<tt>, compile the software with
+           debugging information (usually this involves adding the
+           <tt>-g</tt> flag to <tt>CFLAGS</tt>). This allows to generate
+           a build tree with debugging information. If the environment
+           variable <tt>DEB_BUILD_OPTIONS</tt> contains the
+           string <tt>nostrip</tt>, do not strip the files at installation
+           time. This allows to generate a package with debugging
+           information included. The following makefile snippet
+           is only an example how to test for either condition:
+
+           <example>
+             CFLAGS = -O2 -Wall
+             INSTALL = install
+             ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+               CFLAGS += -g
+             endif
+             ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+               INSTALL += -s
+             endif
+           </example></p>
+
          <p>
            It is up to the package maintainer to decide what
            compilation options are best for the package.  Certain

--  
`Rhubarb is no Egyptian god.' Debian http://www.debian.org  Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
[EMAIL PROTECTED]                        PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/

Reply via email to