Bug#206941: [Build-common-hackers] Bug#206941: cdbs: do we have to run configure twice?

Julian Gilbey Julian Gilbey <jdg@debian.org>, 206941@bugs.debian.org
Fri, 29 Aug 2003 00:38:05 +0100


On Wed, Aug 27, 2003 at 01:37:47AM -0400, Colin Walters wrote:
> On Sat, 2003-08-23 at 20:59, Julian Gilbey wrote:
> > Package: cdbs
> > Version: 0.4.5.2
> > 
> > It seems that with the autotools.mk class, the package's configure
> > script is run twice, once for the build-arch and once for the
> > build-indep, because of the rules:
> > 
> > common-configure-arch common-configure-indep:: common-configure-impl
> > common-configure-impl:: $(DEB_BUILDDIR)/config.status
> > $(DEB_BUILDDIR)/config.status:
> > 	chmod a+x $(DEB_CONFIGURE_SCRIPT)
> 
> Here, config.status should suffice as a stamp file.  That's not working
> for you?

No, it isn't, and it's really, really, perplexing.  Here's what I've
tracked down.

In autoconf.mk, there are the rules I quoted above.  Now, if I change
$(DEB_BUILDDIR) to the explicit directory, all works fine.  But the
variable appears to be expanded incorrectly: $(DEB_BUILDDIR) appears
to have the value 'build', as far as the output of make --debug=v
gives (it searches for the file build/config.status).  But, when I put
in a command "@echo DEB_BUILDDIR=$(DEB_BUILDDIR)" to see what's going
on, it gives the correct value.  And it I create a dummy file called
build/config.status in the top source directory (the one containing
the debian/ directory), all works fine once more.  It's almost as
though make (version 3.80-2) has a bug....

Weird or what?

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

        Julian Gilbey, website: http://www.polya.uklinux.net/
   Debian GNU/Linux Developer, see: http://people.debian.org/~jdg/
     Visit http://www.thehungersite.com/ to help feed the hungry