automake
[Top][All Lists]
Advanced

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

Bug in "distcheck" target?


From: Roger Leigh
Subject: Bug in "distcheck" target?
Date: 17 Sep 2002 22:59:19 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

I recently found a bug in the distcheck target:

        dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
          && cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
            --with-included-gettext \
            $(DISTCHECK_CONFIGURE_FLAGS) \

I don't know if this will be considered buggy behaviour.  However,
this makes one very big assumption: every installation directory will
use $prefix as the path prefix.  This is usually the case, but not
always.  For example, in the gimp-print project, we build a CUPS
driver.  For this, the install path is obtained from "cups-config",
because the CUPS package is completely independent.  This path will
never contain $prefix, and so make distcheck will always fail.

Suggested fix:

Even though in this case, setting $prefix will not work, a similar
effect could be achieved by setting "DESTDIR=$$dc_install_base" when
installing and uninstalling.  Every installed object should respect
DESTDIR, and so this would not break distcheck.

Modifying the distcheck rule as follows, and removing the --prefix
option works fine:

  && $(MAKE) $(AM_MAKEFLAGS) install \
  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
  && $(MAKE) $(AM_MAKEFLAGS) uninstall \

  becomes

  && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=$$dc_install_base install \
  && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=$$dc_install_base installcheck \
  && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=$$dc_install_base uninstall \

My current workaround is a new configure option,
--enable-non-native-install-prefix=PREFIX, which is blank by default.
This is used in install-*-local to install into
$(DESTDIR)$(non_native_install_prefix)$(installdir), but this is
totally gross.

Currently I test the build with
make DESTDIR=/tmp/test install   # check everything is installed
make DESTDIR=/tmp/test uninstall # check everything is cleaned up
due to distcheck not working.


Regards,
Roger

-- 
Roger Leigh
                ** Registration Number: 151826, http://counter.li.org **
                Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848 available on public keyservers




reply via email to

[Prev in Thread] Current Thread [Next in Thread]