Package: debhelper
Version: 8.9.7
Severity: wishlist

Having converted samba over to use of dh(1), I find the option handling for
dh_auto_* somewhat suboptimal.  Because the upstream source being built is
contained in a 'source3' subdirectory of the package root, I now have a
debian/rules that looks like this:

override_dh_auto_configure:
        [...]
        dh_auto_configure -Dsource3 -- $(conf_args)

override_dh_auto_build:
        dh_auto_build -Dsource3 -- everything nsswitch

override_dh_auto_clean:
        dh_auto_clean -Dsource3

override_dh_auto_install:
        dh_auto_install -Dsource3
        [...]


It would be nice if it weren't necessary to duplicate the -D option in
distinct override rules for each command, since obviously the option used
should be the same for each of these (and for dh_auto_test, which I'm not
bothering to override in this case).  For samba this would only save us one
override rule (dh_auto_clean) since we have other needs for overriding each
of the others, but reducing the duplicated code is still valuable, and other
packages may benefit much more.

exporting DH_OPTIONS isn't a great solution because the build system options
are *not* common options; debhelper commands other than dh_auto_* will throw
a warning about ignored unknown options if you try to pass
DH_OPTIONS=-Dsource3.  I may opt to do it this way anyway because I think
debian/rules cleanliness trumps build log cleanliness, but would prefer
something like a DH_BUILD_OPTIONS env variable - something that's guaranteed
not to result in option name collisions in the future with other per-command
options.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org

Attachment: signature.asc
Description: Digital signature

Reply via email to