[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding cmake options to dh

On Sat, Aug 17, 2019 at 09:24:09PM +0200, Marc Haber wrote:
> On Fri, Aug 16, 2019 at 04:45:50PM +0200, Mattia Rizzolo wrote:
> > The way to go with that would be for you to set DH_VERBOSE, notice *which*
> > tool issue a particular command (in this case it's _confugure, not _build),
> > then know that you can just append options to the command like I did above.
> Is the latter, just appending options to the dh_foo command line,
> documented anywhere, and how do I know which of the emitted commands are
> the extra arguments added to? Or is this basically trial-and-error?

Well, appending arguments to the commands is not something *all* dh_*
tools do.  In this case, it's documented in the dh_auto_configure(1)

       dh_auto_configure [build system options] [debhelper options] [-- params]
       See "BUILD SYSTEM OPTIONS" in debhelper(7) for a list of common build system
       selection and control options.

       -- params
           Pass params to the program that is run, after the parameters that
           dh_auto_configure usually passes. For example:

             dh_auto_configure -- --with-foo --enable-bar

I'd expect your dh_auto_configure to call only one program once, so it
shouldn't be hard to guess where it adds them.  In a random package
using cmake I see:

dh binary-arch --with python3
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_configure -- \
	-DMATHJAX_DIR=/usr/share/javascript/mathjax/ \
	install -d obj-x86_64-linux-gnu
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_build -a

i.e. the only two commands called by dh_auto_configure are `install` to
create the build directory, `cd` and `cmake` itself.  So it's really
quite easy to figure to which of the emitted commands are the extra
arguments added to.

                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature

Reply to: