This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Ensure that documentation works under 'use strict'.
[perl5.git] / cflags.SH
index a50044e..3af1e97 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -226,33 +226,31 @@ Intel*) ;; # # Is that you, Intel C++?
                    ;;
                  esac
                  ;;
-               *) case "$opt" in
-                  -W)
-                    # -Wextra is the modern form of -W, so add
-                    # -W only if -Wextra is not there already.
-                    case " $warn " in
-                    *-Wextra*) ;;
-                    *)
-                      echo "cflags.SH: Adding $opt."
-                      warn="$warn $opt"
-                      ;;
-                    esac
-                    ;;
-                 -Werror=declaration-after-statement)
-                    # -pedantic* (with -std=c89) covers -Werror=d-a-s.
-                    case "$stdflags$warn" in
-                    *-std=c89*-pedantic*|*-pedantic*-std=c89*) ;;
-                    *)
-                      echo "cflags.SH: Adding $opt."
-                      warn="$warn $opt"
-                      ;;
-                    esac
-                   ;;
+               -W)
+                 # -Wextra is the modern form of -W, so add
+                 # -W only if -Wextra is not there already.
+                 case " $warn " in
+                 *-Wextra*) ;;
+                 *)
+                   echo "cflags.SH: Adding $opt."
+                   warn="$warn $opt"
+                   ;;
+                 esac
+                 ;;
+               -Werror=declaration-after-statement)
+                  # -pedantic* (with -std=c89) covers -Werror=d-a-s.
+                  case "$stdflags$warn" in
+                  *-std=c89*-pedantic*|*-pedantic*-std=c89*) ;;
                   *)
                      echo "cflags.SH: Adding $opt."
                      warn="$warn $opt"
                      ;;
                   esac
+                  ;;
+               *)
+                  echo "cflags.SH: Adding $opt."
+                  warn="$warn $opt"
+                  ;;
                esac
              fi
              ;;
@@ -487,10 +485,10 @@ for file do
 
     # allow variables like toke_cflags to be evaluated
 
-    if echo $file | grep -v / >/dev/null
-    then
-      eval 'eval ${'"${file}_cflags"'-""}'
-    fi
+    case "$file" in
+    */*) ;;
+    *) eval 'eval ${'"${file}_cflags"'-""}' ;;
+    esac
 
     # or customize here