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

Re: Building package twice



On 08/12/25 11:50, Giovanni Mascellani wrote:
To do all of that I'd need to configure, compile and install the source code twice when building the package, with different configuration options. Is there a reasonably simple way to do that, possibly with debhelper? Are there other packages doing this I can take as an example

Have a look at this version of `d/rules` for bash (it builds twice, once dynamically, once statically), in particular `override_dh_auto_configure` and `override_dh_auto_build`:

https://salsa.debian.org/gioele/bash/-/blob/rules-std-dh/debian/rules?ref_type=heads#L70-91

The trick is to first run `dh_auto_configure` with two different --builddirectory= arguments (and two different sets of configure flags, obviously), then to run `dh_auto_build` twice, once in each --builddirectory=.

Hope it helps,

--
Gioele Barabucci


Reply to: