am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / javaflags.sh
old mode 100755 (executable)
new mode 100644 (file)
index 364b21f..2f434b2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
@@ -16,7 +16,7 @@
 
 # Check support for $(JAVACFLAGS) and $(AM_JAVACFLAGS).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > fake-javac <<'END'
 #!/bin/sh
@@ -24,10 +24,6 @@ echo "$*" > javaflags.list
 END
 chmod a+x fake-javac
 
-# Remove JAVAC from the environment, so that it won't interfere
-# with 'make -e' below.
-unset JAVAC || :
-
 cat >> configure.ac <<'END'
 AC_PROG_CC
 # Simulate presence of the java compiler using our fake-javac script.
@@ -44,13 +40,13 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '\$(JAVACFLAGS).*\$(AM_JAVACFLAGS)' Makefile.in && Exit 1
+grep '\$(JAVACFLAGS).*\$(AM_JAVACFLAGS)' Makefile.in && exit 1
 
 : > bar.java
 
 $AUTOCONF
 ./configure
-env JAVACFLAGS=__user_flags__ $MAKE -e
+run_make JAVACFLAGS=__user_flags__
 
 ls -l