From: ibs Date: Fri, 15 Feb 2013 08:43:47 +0000 (+0400) Subject: 0023764: WOK building crashes when using automake X-Git-Tag: V6_7_1~71 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=b40a90491e94dbc6c81e0e5db0c69418438cd295;p=occt-wok.git 0023764: WOK building crashes when using automake --- diff --git a/src/WOKTclLib/osutils.tcl b/src/WOKTclLib/osutils.tcl index e146d86..723788f 100755 --- a/src/WOKTclLib/osutils.tcl +++ b/src/WOKTclLib/osutils.tcl @@ -1575,22 +1575,13 @@ proc osutils:am:PkCOption ppk { set FoundFlag "[lindex [osutils:intersect3 [split [lindex [wokparam -v %CMPLRS_C_Options [w_info -f]] 0]] [split [lindex [wokparam -v %CMPLRS_C_Options] 0]] ] 2]" foreach pk $ppk { if {[lsearch [uinfo -f -T source [woklocate -u $pk]] ${pk}_CMPLRS.edl] != "-1"} { - set CStr [lindex [wokparam -e %CMPLRS_C_Options [woklocate -u $pk]] 0] - set LastIndex [expr {[string length $CCOMMON ] - 1}] - if {[string equal $CCOMMON [string range $CStr 0 $LastIndex]]} { - set COption [string range $CStr $LastIndex end ] - } else { - set COption [string range $CStr 0 [expr {[string last $CCOMMON $CStr] - 1}]] - } - if {$COption != " " && $COption != "" && $COption != " " && $COption != " "} { - set FoundList [split $COption " "] - foreach elem $FoundList { - if {$elem != ""} { - if {[string first "-I" $elem] == "-1" } { - if {[string first $elem $FoundFlag] == "-1"} { - set FoundFlag "$FoundFlag $elem" - } - } + set aPkList [split "[lindex [wokparam -e %CMPLRS_C_Options [woklocate -u $pk]] 0]" " "] + set aCcomList [split "$CCOMMON" " "] + + foreach aPkItem $aPkList { + if { [lsearch aCcomList $aPkItem] != -1 } { + if {[string first "-I" $aPkItem] == "-1" } { + set FoundFlag "$FoundFlag $aPkItem" } } }