automake-patches
[Top][All Lists]
Advanced

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

makefile-deps.test false positive, how to handle?


From: Peter Rosin
Subject: makefile-deps.test false positive, how to handle?
Date: Tue, 14 Feb 2012 13:34:28 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1

Hi!

Commit v1.11-685-g947ce0e of 07-02-2012 added code for am__make_dryrun
that triggers a false positive in makefile-deps.test. I see two
alternative approaches, which should I commit?

1. Avoid the check in the test

From: Peter Rosin <address@hidden>
Date: Tue, 14 Feb 2012 12:55:32 +0100
Subject: [PATCH] fixup: do not tickle makefile-deps.test with the make_dryrun 
code

* lib/am/header-vars.am (am__make_dryrun): Avoid code matching
'^ *:' in the Makefile, as that tickles makefile-deps.test.
---
 lib/am/header-vars.am |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 1078a3d..97516ef 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -32,12 +32,15 @@ VPATH = @srcdir@
 ## and are thus executed also with "make -n" -- either because they
 ## are declared as dependencies to '.MAKE' (NetBSD make), or because
 ## their recipes contain the "$(MAKE)" string (GNU and Solari make).
+
+## The case statement has [:] in order to not tickle makefile-deps.test
+## which greps for '^ *:'.
 am__make_dryrun = \
   { \
     am__dry=no; \
     for am__flg in : $(MAKEFLAGS); do \
       case $$am__flg in \
-        :) ;; \
+        [:]) ;; \
         *=*|--*) ;; \
         *n*) am__dry=yes; break;; \
       esac; \
-- 
1.7.5.1



2. Be less strict in the testsuite

From: Peter Rosin <address@hidden>
Date: Tue, 14 Feb 2012 13:31:48 +0100
Subject: [PATCH] tests: avoid false positives when looking for empty make 
targets

Commit v1.11-685-g947ce0e of 07-02-2012 added code for
am__make_dryrun that causes a spurious testsuite failure.

* tests/makefile-deps.test: Be less strict when looking for
empty targets, and allow code that has a closing parenthesis
immediately following the colon.
---
 tests/makefile-deps.test |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/makefile-deps.test b/tests/makefile-deps.test
index 819c7d3..5552f10 100755
--- a/tests/makefile-deps.test
+++ b/tests/makefile-deps.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 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
@@ -26,6 +26,8 @@ set -e
 $ACLOCAL
 $AUTOMAKE
 
-grep "^ *:" Makefile.in && Exit 1
+# Avoid false positives matching '^ *:)' from am__make_dryrun in
+# lib/am/header_vars.am.
+grep '^ *:\($\|[^)]\)' Makefile.in && Exit 1
 
 :
-- 
1.7.5.1




reply via email to

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