X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=t%2Fax%2Fcc-no-c-o.in;h=bbc9ec90084f9d17b30d3788371062e5ce90bfd8;hb=db6cb1847233d56c965a6d1e196dfb09f860ee97;hp=c18f9b9752ba5624e7a18ac3921fb36e722daaef;hpb=0756a43c3a77cff0e86aa8dad7f9f4ebd90b800c;p=platform%2Fupstream%2Fautomake.git diff --git a/t/ax/cc-no-c-o.in b/t/ax/cc-no-c-o.in index c18f9b9..bbc9ec9 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 "$@"