GNU bug report logs - #8540
Java "make uninstall" doesn't work after "make clean"

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Sat, 23 Apr 2011 11:54:02 UTC

Severity: normal

Tags: wontfix

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: Java "make uninstall" doesn't work after "make clean"
Date: Sat, 23 Apr 2011 13:53:23 +0200
Hello automakers.

Currently, Java support in Automake provides uninstall rules that doesn't
work after "make clean":
  
  $ cat > configure.ac <<'END'
  AC_INIT(x,0)
  AM_INIT_AUTOMAKE(foreign)
  AC_CONFIG_FILES(Makefile)
  AC_OUTPUT
  $ cat > Makefile.am <<'END'
  javadir = $(prefix)/java
  java_JAVA = foo.java
  END
  $ echo 'class Foo {}' > foo.java
  $ autoreconf -vi
  configure.ac:2: installing `./install-sh'
  configure.ac:2: installing `./missing'
  $ ./configure --prefix=/tmp
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  configure: creating ./config.status
  config.status: creating Makefile
  $ make
  CLASSPATH=.:./.:$CLASSPATH javac -d .    foo.java
  echo timestamp > classjava.stamp
  $ ls *.class
  Foo.class
  $ make install
  /usr/bin/install -c -m 644 Foo.class '/tmp/java/'
  $ make clean
  rm -f *.class classjava.stamp
  $ make uninstall
  $ ls /tmp/java
  Foo.class

While IMHO it's acceptable to provide uninstall rules that stop working
after "make distclean", having them broken by a simple "make clean" is
unacceptable.

Probably, the better fix is to write at "make all" time a file (to
be removed by "make distclean" only, not by "make clean") that lists
all the generated class files; then, at "make uninstall" time, that
that file can be used to recover the names of the files to uninstall.

Regards,
  Stefano




This bug report was last modified 11 years and 207 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.