Hi,

On Sun, Jan 11, 2009 at 08:58:40PM -0500, Mike Joseph wrote:
> Package: maint-guide
> Severity: normal
> 
> The description of the sample debian/rules file in section 4.4 refers to
> lines that are not there.  

  4  # This file was originally written by Joey Hess and Craig Small.
  5  # As a special exception, when this file is copied by dh-make into a
  6  # dh-make output file, you may use that output file without restriction.
  7  # This special exception was added by Craig Small in version 0.37 of 
dh-make.
  8  # Uncomment this to turn on verbose mode.
  9  #export DH_VERBOSE=1

> Specifically, it appears that previous lines used
> to exist in the range of 11 - 16.  The description of that section is wrong
> since the lines aren't there, and all following sections refer to lines
> numbers offset by 6.

This is because example was updated with newer tool defaults and policy.

By the way, we have dh_make command and dh-make package. In order to
reduce confusion, it may be good idea to have clarification comments
somewhare near here. 

> Moreover, the description of lines 8 - 9 is confusing, as it refers to
> multiple options when only one is present in the example.

| The meaning of DH_* variables mentioned on lines 8 and 9 should be
| evident from the short description. For information on DH_COMPAT read
| the "Debhelper compatibility levels" section of the debhelper(1) manual
| page.

Now we only have DH_VERBOSE in line 8-9 (I remember this range was
larger originally).  I think there were DH_COMPAT too. This was the
reason behind  mentioning as "DH_* variables".  We now use debian/compat
instead of DH_COMPAT for package building.
 
| The lines 11 through 16 are a skeleton of support for DEB_BUILD_OPTIONS
| parameters, described in the Policy section 10.1 "Binaries". Basically,
| these things control if the binaries are to be built with the debugging
| symbols, and if they should be stripped upon installation. Again, this
| is just a skeleton, a hint that you should do it. You should check into
| how the upstream build system handles the inclusion of debugging symbols
| and stripping on installation and implement this yourself. 

Hmmm... lines 11 through 16 may be old range.  I see:

 11  configure-stamp:
 12          dh_testdir
 13          # Add here commands to configure the package.
 14          touch configure-stamp
 15  build: build-stamp
 16  build-stamp: configure-stamp  
 17          dh_testdir
 18          # Add here commands to compile the package.
 19          $(MAKE)
 20          #docbook-to-man debian/testpack.sgml > testpack.1
 21          touch $@

I do not see: DEB_BUILD_OPTIONS here.

As I see in the Policy: 4.9.1 debian/rules and DEB_BUILD_OPTIONS at
http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options

| Supporting the standardized environment variable DEB_BUILD_OPTIONS is
| recommended. 
| ...
| Unknown flags must be ignored by debian/rules.
| 
| The following makefile snippet is an example of how one may implement
| the build options; you will probably have to massage this example in
| order to make it work for your package.
| 
|      CFLAGS = -Wall -g
|      INSTALL = install
|      INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
|      INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
|      INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
|      INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
|      
|      ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
|          CFLAGS += -O0
|      else
|          CFLAGS += -O2
|      endif
|      ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
|          INSTALL_PROGRAM += -s
|      endif
|      ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|          NUMJOBS = $(patsubst parallel=%,%,$(filter 
parallel=%,$(DEB_BUILD_OPTIONS)))
|          MAKEFLAGS += -j$(NUMJOBS)
|      endif

Hmmm... when I replaced rules file example with the latest dh_make
result, something might have been dropped.

Instead of writing additional text here agian to insert makefile snippet
to autogenerated one, it may be better dh-make package takes care this
default setting etc.  If you have concrete way to fix situation, let me
know.

Osamu








-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to