bug-automake
[Top][All Lists]
Advanced

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

bug#9579: distcheck does not detect incomplete uninstall as advertised


From: Nick Bowler
Subject: bug#9579: distcheck does not detect incomplete uninstall as advertised
Date: Thu, 22 Sep 2011 16:48:46 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

In the Automake manual, §14.4 "Checking the Distribution"

  
https://www.gnu.org/software/automake/manual/automake.html#Checking-the-Distribution

claims that make distcheck will verify that make uninstall works
correctly.  The relevant text is quoted here:

> distcheck also checks that the uninstall rule works properly, both for
> ordinary and DESTDIR builds. It does this by invoking ‘make uninstall’,
> and then it checks the install tree to see if any files are left over.
> This check will make sure that you correctly coded your
> uninstall-related rules.

However, this does not seem to be the case.  I realized that I had
completely forgotten to write an uninstall-local rule to go with my
install-data-local rule, yet distcheck remained completely silent on
the matter.

I'm using autoconf-2.68 and automake-1.11.1.  The issue also occurs with
latest automake git at the time of writing.  Here's an example:

% cat >Makefile.am <<'EOF'
dist_data_DATA = foo
EXTRA_DIST = bar

install-data-local:
        $(MKDIR_P) '$(DESTDIR)$(datadir)'
        cp '$(srcdir)/bar' '$(DESTDIR)$(datadir)/bar'
EOF

% cat >configure.ac <<'EOF'
AC_INIT([test], [1.0])

AM_INIT_AUTOMAKE([-Wall -Werror foreign])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF

% cat >foo <<'EOF'
foo
EOF

% cat >bar <<'EOF'
bar
EOF

A quick test reveals that the uninstall target of my Makefile is
definitely broken:

  % ./configure --prefix=$PWD/inst
  % make install
  % find inst -type f
  inst/share/foo
  inst/share/bar
  % make uninstall
  % find inst -type f
  inst/share/bar

As expected, "bar" is erroneously left in the install tree.  However,
when we go to run make distcheck:

  % make distcheck
  [...]
  ==========================================
  test-1.0 archives ready for distribution: 
  test-1.0.tar.gz
  ==========================================

Based on the quoted paragraph in the manual, I had expected distcheck to
fail.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)





reply via email to

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