automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-740-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-740-g3dc3957
Date: Sat, 09 Apr 2011 12:25:06 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=3dc39576936d18aa897bf955ab55916f61244a36

The branch, master has been updated
       via  3dc39576936d18aa897bf955ab55916f61244a36 (commit)
       via  1d6b98c76cd6e64ce1e67303db13d457ae33bc4f (commit)
      from  3a5f0a8b5e9d3116718cb55c1c0e46195b53a2ca (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3dc39576936d18aa897bf955ab55916f61244a36
Merge: 3a5f0a8 1d6b98c
Author: Stefano Lattarini <address@hidden>
Date:   Sat Apr 9 14:19:00 2011 +0200

    Merge branch 'java-coverage'

commit 1d6b98c76cd6e64ce1e67303db13d457ae33bc4f
Author: Stefano Lattarini <address@hidden>
Date:   Wed Apr 6 20:41:04 2011 +0200

    coverage: more on java support: EXTRA_ and noinst_ prefixes
    
    * tests/java-extra.test: New test, checking support for the
    prefix `EXTRA_' with the JAVA primary.
    * tests/java-noinst.test: New test, checking support for the
    prefix `noinst_' with the JAVA primary.
    * tests/Makefile.am (TESTS): Update.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    9 +++
 tests/Makefile.am                                  |    2 +
 tests/Makefile.in                                  |    2 +
 tests/java-extra.test                              |   76 ++++++++++++++++++++
 ...eck-tests_environment.test => java-noinst.test} |   34 +++++----
 5 files changed, 109 insertions(+), 14 deletions(-)
 create mode 100755 tests/java-extra.test
 copy tests/{check-tests_environment.test => java-noinst.test} (57%)

diff --git a/ChangeLog b/ChangeLog
index c254863..3de7584 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-04-06  Stefano Lattarini  <address@hidden>
+
+       coverage: more on java support EXTRA_ and noinst_ prefixes
+       * tests/java-extra.test: New test, checking support for the
+       prefix `EXTRA_' with the JAVA primary.
+       * tests/java-noinst.test: New test, checking support for the
+       prefix `noinst_' with the JAVA primary.
+       * tests/Makefile.am (TESTS): Update.
+
 2011-04-09  Ralf Wildenhues  <address@hidden>
 
        Clarify regex code in depcomp.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 880206e..c890f4c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -523,6 +523,8 @@ java2.test \
 java3.test \
 javaprim.test \
 javasubst.test \
+java-extra.test \
+java-noinst.test \
 ldadd.test \
 ldflags.test \
 lex.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 90f3d6b..a759958 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -784,6 +784,8 @@ java2.test \
 java3.test \
 javaprim.test \
 javasubst.test \
+java-extra.test \
+java-noinst.test \
 ldadd.test \
 ldflags.test \
 lex.test \
diff --git a/tests/java-extra.test b/tests/java-extra.test
new file mode 100755
index 0000000..5309964
--- /dev/null
+++ b/tests/java-extra.test
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2011 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check use of EXTRA with the JAVA primary.  Also test interaction
+# of JAVA with conditionals (it's natural to test it here, since
+# EXTRA_JAVA exists mostly for ensuring interoperation with Automake
+# conditionals).
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
+($HAS_JAVAC 77); $HAS_JAVAC 77
+AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+javadir = $(pkgdatadir)/java
+
+EXTRA_JAVA = Class1.java Class2.java Class3.java
+
+java_JAVA = Class1.java
+
+if COND
+java_JAVA += Class2.java
+else !COND
+java_JAVA += Class3.java
+endif !COND
+
+Class3.java: Makefile
+       echo 'class Class3 {}' > $@
+CLEANFILES = Class3.java
+END
+
+echo "class Class1 {}" > Class1.java
+echo "class Class2 {}" > Class2.java
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure cond=yes
+$MAKE
+ls -l
+test -f Class1.class
+test -f Class2.class
+test ! -f Class3.class
+test ! -f Class3.java
+
+$MAKE distclean
+
+./configure cond=no
+$MAKE
+ls -l
+test -f Class1.class
+test ! -f Class2.class
+test -f Class3.class
+test -f Class3.java
+
+:
diff --git a/tests/check-tests_environment.test b/tests/java-noinst.test
similarity index 57%
copy from tests/check-tests_environment.test
copy to tests/java-noinst.test
index a07ab95..130ea63 100755
--- a/tests/check-tests_environment.test
+++ b/tests/java-noinst.test
@@ -14,34 +14,40 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
+# Make sure that noinst_JAVA causes generated *.class files not to be 
installed.
 
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
+AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
+($HAS_JAVAC 77); $HAS_JAVAC 77
 AC_OUTPUT
 END
 
-cat > Makefile.am << 'END'
-TESTS = foo.test
-EXTRA_DIST = $(TESTS)
+cat > Foo.java <<'END'
+class Foo { }
 END
 
-cat > foo.test << 'END'
-#! /bin/sh
-test x"$FOO" = x"ok"
-END
-chmod a+x foo.test
-
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
 
-./configure
+: > Makefile.in # Will be updated later.
+
+./configure --prefix="`pwd`/_inst"
+
+# We need this hacky loop because multiple uses of the JAVA primary
+# in the same Makefile.am are not allowed.
 
-FOO=bad TESTS_ENVIRONMENT='FOO=ok'  $MAKE check
-FOO=ok  TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
+for prefix in '' nodist_ dist_; do
+  echo "${prefix}noinst_JAVA = Foo.java" > Makefile.am
+  $AUTOMAKE
+  ./config.status Makefile
+  $MAKE
+  test -f Foo.class
+  $MAKE install
+  test ! -d _inst
+done
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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