User cleaner way to handle new options for VC++ build.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 19 Jan 2007 13:17:52 +0000 (13:17 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 19 Jan 2007 13:17:52 +0000 (13:17 +0000)
util/mk1mf.pl

index 0f94082bb5f75ea9a3d9c9136d2499ae94c3386b..19cb9591f98f30d0e2ec7100686dfd088f88abe2 100755 (executable)
@@ -365,7 +365,6 @@ for (;;)
 
        if ($key eq "FIPS_EX_OBJ")
                { 
-               $val =~ s|\.\./crypto/||g;
                $fips_ex_obj=&var_add("crypto",$val);
                }
 
@@ -389,7 +388,7 @@ if ($fips)
                $fips_exclude_obj{$1} = 1 if (/\/([^\/]*)$/);
                }
 
-       $fips_exclude_obj{"bn_asm"} = 1;
+       $fips_exclude_obj{"bn_asm"} = 1;
 
        my @ltmp = split " ", $lib_obj{"CRYPTO"};
 
@@ -398,21 +397,19 @@ if ($fips)
 
        foreach(@ltmp)
                {
-               if (/\/bn_asm$/)
+               if (/\/([^\/]*)$/ && exists $fips_exclude_obj{$1})
                        {
-                       $lib_obj{"FIPS"} .= "$_ ";
+                       if ($fipscanisterbuild)
+                               {
+                               $lib_obj{"FIPS"} .= "$_ ";
+                               }
                        }
-               elsif (!/\/([^\/]*)$/ || !exists $fips_exclude_obj{$1})
+               else
                        {
                        $lib_obj{"CRYPTO"} .= "$_ ";
                        }
                }
 
-       if ($fipscanisterbuild)
-               {
-               $lib_obj{"FIPS"} .= $fips_ex_obj;
-               }
-
        }
 
 if ($fipscanisterbuild)