tests: expose automake bug#13940
[platform/upstream/automake.git] / t / instdir-java.sh
old mode 100755 (executable)
new mode 100644 (file)
index 4d47d19..1356f24
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 # If $(javadir) is the empty string, then nothing should be installed there.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -37,23 +37,15 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-javadir=
-export javadir
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+nulldirs='javadir='
+null_install
 
 :