On Mon, Nov 22, 2010 at 06:41:22PM -0400, Joey Hess wrote: > Roger Leigh wrote: > > The only defect in the above testcase is that dh_auto_configure runs > > configure twice; once for build-arch and once for build-indep. This > > is not breaking anything, but it's less efficient--the old stamp files > > took care of this where the debian/*.log files created by dh don't. > > This is my first use of dh, so I may be overlooking something, and I > > could always tweak this in the override--I just didn't find time for > > that yet. > > I cannot see how a single invocation of dh_auto_configure could run > configure twice in a row. But if you run build-indep and then > build-arch, it will run first dh_auto_configure -i and then > dh_auto_configure -a. Of course, both of those run configure unless > overridden.
Yes. I've changed it as shown in the second attached rules file,
where we use config.status as the real target so it's only run once:
override_dh_auto_configure: debian/build/config.status
debian/build/config.status:
dh_auto_configure …
This appears to correct the problem fairly simply.
> Do you anticipate build-indep and build-arch being run in sequence
> normally? (If it just uses build, it will run configure once..)
I guess this is really dependent upon the higher-level tools driving
the build, and what they choose to do.
I think for normal builds they will continue to use the build and
binary-* targets as usual. The build target can (and should, where
present directly depend on the -arch and -indep variants, which could
therefore cause a double run of configure). When completely-driven by
dh, this won't be an issue.
The tools could equally just call both the build-arch and -indep
targets for everything and forget the generic target (it should have
exactly the same effect), but I can't see this being a popular choice
given the amount of breakage it would cause (at least until most
packages have adopted it).
For builds building only arch or indep packages, then just the
appropriate -arch and -indep targets need be called.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature

