>From 650dba0873f6c894461ce29cb26a1b3104287d24 Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Mon, 12 Mar 2012 12:15:47 +0100 Subject: [PATCH] coverage: make sure am__py_compile is defined when needed See automake bug#10995. * tests/python.test: Also make sure 'am__py_compile' is defined correctly in the generated Makefile.in. Signed-off-by: Stefano Lattarini --- tests/python.test | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tests/python.test b/tests/python.test index 8102ca0..e7a6984 100755 --- a/tests/python.test +++ b/tests/python.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2012 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 @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Test to make sure py_compile is defined. +# Test to make sure py_compile and am__py_compile are correctly defined. . ./defs || Exit 1 @@ -26,8 +26,26 @@ cat > Makefile.am << 'END' python_PYTHON = foo.py END +cat > Makefile2.am << 'END' +python_PYTHON = a.py +nodist_python_PYTHON = b.py +nobase_python_PYTHON = x/c.py +mydir = ${prefix} +my_PYTHON = d.py +END + $ACLOCAL $AUTOMAKE -a -grep '^py_compile =' Makefile.in test -f py-compile + +$AUTOMAKE Makefile2 + +grep "py" Makefile.in Makefile2.in # For debugging. + +for f in Makefile.in Makefile2.in; do + test `grep -c '^py_compile =' $f` -eq 1 + test `grep -c '^am__py_compile =' $f` -eq 1 +done + +: -- 1.7.9