[libvirt] [PATCH] don't assume builddir == srcdir

Hi, Makefile.maint assumes this in some places. This doesn't make the world perfect but maybe a bit better? Cheers, -- Guido

On Sat, Dec 13, 2008 at 12:23:30AM +0100, Guido G?nther wrote:
Hi, Makefile.maint assumes this in some places. This doesn't make the world perfect but maybe a bit better?
Seems reasonable to me. I think it is about time I changed the 'autobuild.sh' to do a VPATH build in the nightly builds, so we don't keep making regressions for the srcdir != builddir scenario Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Sat, Dec 13, 2008 at 04:52:10PM +0000, Daniel P. Berrange wrote:
On Sat, Dec 13, 2008 at 12:23:30AM +0100, Guido G?nther wrote:
Hi, Makefile.maint assumes this in some places. This doesn't make the world perfect but maybe a bit better?
Seems reasonable to me. Applied now. -- Guido

"Daniel P. Berrange" <berrange@redhat.com> wrote:
On Sat, Dec 13, 2008 at 12:23:30AM +0100, Guido G?nther wrote:
Hi, Makefile.maint assumes this in some places. This doesn't make the world perfect but maybe a bit better?
Seems reasonable to me.
I think it is about time I changed the 'autobuild.sh' to do a VPATH build in the nightly builds, so we don't keep making regressions for the srcdir != builddir scenario
FYI, running "make distcheck" does such a build.

On Wed, Dec 17, 2008 at 03:18:16PM +0100, Jim Meyering wrote:
"Daniel P. Berrange" <berrange@redhat.com> wrote:
On Sat, Dec 13, 2008 at 12:23:30AM +0100, Guido G?nther wrote:
Hi, Makefile.maint assumes this in some places. This doesn't make the world perfect but maybe a bit better?
Seems reasonable to me.
I think it is about time I changed the 'autobuild.sh' to do a VPATH build in the nightly builds, so we don't keep making regressions for the srcdir != builddir scenario
FYI, running "make distcheck" does such a build. "make distcheck" itself fails for me when run with $srcdir != $buildir. -- Guido

Guido Günther <agx@sigxcpu.org> wrote:
Makefile.maint assumes this in some places. This doesn't make the world perfect but maybe a bit better?
Um, not really, since a pathological $(abs_srcdir) may contain "; rm -rf /;" Best to avoid it and use $(srcdir) instead. Were you able to construct a situation in which this change helped? I wonder, since in a non-srcdir builds, GNUmakefile and Makefile.maint don't exist, so it should be impossible to run their rules without either copying them into the build directory or using make's -f option. [copying the files into place, to test this ...] It looks like if you use VC_LIST's -C option, then that invalidates the exempted names in the .x-sc* files. FWIW, I did "make distclean && mkdir .j && cd .j && ./configure".
From there, none of the Makefile.maint rules are available.
Eventually, I'll probably sync from coreutils/gnulib, where this file is now named maint.mk.

On Wed, Dec 17, 2008 at 03:31:45PM +0100, Jim Meyering wrote:
Guido Günther <agx@sigxcpu.org> wrote:
Makefile.maint assumes this in some places. This doesn't make the world perfect but maybe a bit better?
Um, not really, since a pathological $(abs_srcdir) may contain "; rm -rf /;"
Best to avoid it and use $(srcdir) instead. O.k.
Were you able to construct a situation in which this change helped? Yes. Running: make -f ../GNUmakefile <target> starts working.
I wonder, since in a non-srcdir builds, GNUmakefile and Makefile.maint don't exist, so it should be impossible to run their rules without either copying them into the build directory or using make's -f option.
[copying the files into place, to test this ...] It looks like if you use VC_LIST's -C option, then that invalidates the exempted names in the .x-sc* files. But that's the only problem left to fix to make "make distcheck" work with $srcdir != builddir. Before that it wouldn't even run the tests. Fixing up the pattern matching for the paths in the .x-sc* files still on my todo list. Cheers, -- Guido
participants (3)
-
Daniel P. Berrange
-
Guido Günther
-
Jim Meyering