Introduction
I have a source package (downloaded with apt source ...
) which I'd like to explore using rtags in a code editor.
The standard way of doing this is to dry-run the makefile produced by the build system feeding it to rtags
so that it could use those commands for (re)building its contextual source code navigation and auto-completion databases.
Problem
Normally, I would just autogen
/autoconf
/configure
to obtain a makefile and then dry-run the build with make -nk
.
However, since I'm working with a Debian package, I need to use the Debian-specific configuration commands with dpkg-buildpackage
or dpkg-source
in order for the source code navigation to reflect the same build options that were used in the official builds.
I looked through buildpackage
's man page but couldn't find any options that would stop the build after the ./configure
step, before any actual build commands are executed. While it does have the --build=source
(-S
) option, it doesn't do what I want: it applies Ubuntu-specific patches and then stops before running automake
/configure
. This is unacceptable, since I want the automake
/configure
step to be executed as well.
Question
How can I make dpkg-buildpackage
stop AFTER running autogen
/automake
/configure
but BEFORE running make
?
The suggested approach should work for the dnsutils
source package.
If you look at the
dpkg-buildpackage
manpage, you'll see that it doesn't distinguish between aconfigure
step and amake
step - as far it is concerned, there's abuild
step and abinary
step. While./configure; make; make install
is very common, it's not sanctified as the one true build method bydpkg-buildpackage
; it's left todebian/rules
to invoke appropriate actions as needed.In the specific case of
dnsutils
, or rather,bind
,debian/rules
seems to be highly manual (even though it invokes a number of debhelper utilities, it doesn't rely on debhelper's automation). So here, the simplest way is to take advantage of the targets indebian/rules
:If it were using debhelper's
dh_auto_configure
, another way would have been to overridedh_auto_configure
indebian/rules
to fail the build process after it.In general,
dpkg-buildpackage
doesn't know anything aboutconfigure
, and so has no way to stop there.