diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-07-23 20:39:14 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-07-23 20:39:14 +0100 |
commit | 1a24c5400c68c6cf3959c8ec5134ca79d0daad43 (patch) | |
tree | 2d5a477eb1c579504f05bfce66262103ef03c21b | |
parent | 43831406be5beb7d83c7798db9c96fd164b0c51d (diff) | |
parent | db6cb1847233d56c965a6d1e196dfb09f860ee97 (diff) | |
download | automake-1a24c5400c68c6cf3959c8ec5134ca79d0daad43.tar.gz |
Merge branch 'fix-pr14911' into micro
* fix-pr14911:
test: avoid false positives in 'cc-no-c-o' script
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | t/ax/cc-no-c-o.in | 20 |
2 files changed, 17 insertions, 4 deletions
@@ -145,6 +145,7 @@ Gwenole Beauchesne gbeauchesne@mandrakesoft.com H.J. Lu hjl@lucon.org H.Merijn Brand h.m.brand@hccnet.nl Hans Ulrich Niedermann hun@n-dimensional.de +Hanspeter Niederstrasser fink@snaggledworks.com Harald Dunkel harald@CoWare.com Harlan Stenn Harlan.Stenn@pfcs.com He Li tippa000@yahoo.com diff --git a/t/ax/cc-no-c-o.in b/t/ax/cc-no-c-o.in index c18f9b975..bbc9ec900 100644 --- a/t/ax/cc-no-c-o.in +++ b/t/ax/cc-no-c-o.in @@ -19,11 +19,23 @@ am_CC=${AM_TESTSUITE_GNU_CC-'@GNU_CC@'} -case " $* " in - *\ -c*\ -o* | *\ -o*\ -c*) +seen_c=false +seen_o=false + +for arg +do + case $arg in + -c) + seen_c=true;; + # It is acceptable not to leave a space between the '-o' option + # and its argument, so we have to cater for that. + -o|-o*) + seen_o=true;; + esac + if $seen_c && $seen_o; then echo "$0: both '-o' and '-c' seen on the command line" >&2 exit 2 - ;; -esac + fi +done exec $am_CC "$@" |