]> OCCT Git - occt-wok.git/commitdiff
0023887: wgenproj -target=amk generate incorrect dependicies in *.am files for occt...
authoribs <ibs@opencascade.com>
Thu, 18 Apr 2013 14:04:13 +0000 (18:04 +0400)
committeribs <ibs@opencascade.com>
Thu, 18 Apr 2013 14:04:13 +0000 (18:04 +0400)
if automake files generates for OCCT, toolkits will include to libTKDXF_la_LIBADD variable like ../<toolkit name>/lib<toolkit name>.so
0023887: wgenproj -target=amk generate incorrect dependicies in *.am files for occt products

paths to father libs added;
all father libs have prefix -l now

src/WOKTclLib/osutils.tcl

index 00ca949b6aa37fc88f200371b70de813302eab31..e716fc21dd2e896f7a4c8998c4579921535a76dd 100755 (executable)
@@ -1576,24 +1576,18 @@ proc osutils:am:__INCLUDES__ { l } {
 ;#
 proc osutils:am:__LIBADD__ { theIncToolkits {final 0} } {
 
+  set aFatherModules ""
   set aCurrentWorkBench [wokinfo -w]
-  set aFirstFatherWorkBench $aCurrentWorkBench
-  
   while { "[w_info -f]" != "" } {
     wokcd [w_info -f]
-    set aFirstFatherWorkBench [wokinfo -w]
+    append aFatherModules [w_info -k]
   }
+  wokcd $aCurrentWorkBench
   
-  set aOriginModules {}
-  if { "$aCurrentWorkBench" != "$aFirstFatherWorkBench" } {
-    set aOriginModules [w_info -k]
-    wokcd $aCurrentWorkBench
-  }
-
   set aLibString ""
   
   foreach aIncToolkit $theIncToolkits {
-    if { [lsearch $aOriginModules $aIncToolkit] != -1} {
+    if { [lsearch [split $aFatherModules " "] $aIncToolkit] != -1} {
       append aLibString " \\\n-l$aIncToolkit"
     } else {
       append aLibString " \\\n../$aIncToolkit/lib$aIncToolkit.la"