]> OCCT Git - occt-wok.git/commitdiff
0023887: wgenproj -target=amk generate incorrect dependicies in *.am files for occt...
authoribs <ibs@oprncascade.com>
Wed, 10 Apr 2013 10:30:22 +0000 (14:30 +0400)
committeribs <ibs@oprncascade.com>
Wed, 10 Apr 2013 10:30:22 +0000 (14:30 +0400)
occt's toolkits added to libTKDXF_la_LIBADD variable like -l<toolkit name>
Removing extra spaces
__EXTERNLIB__ returned

src/WOKTclLib/osutils.tcl
src/WOKTclLib/templates/template.mam

index f8de607c53d03bd53d7040304163e6ff9231bf79..346c65ba01022819273ece8e628d671c9441f704 100755 (executable)
@@ -1574,9 +1574,26 @@ proc osutils:am:__INCLUDES__ { l } {
 ;# Used to replace the string __LIBADD__ in Makefile.am
 ;# l is the toolkit closure list of a toolkit.
 ;#
-proc osutils:am:__LIBADD__ { l {final 0} } {
-  set fmt "../%s/lib%s.la"
-  return [wokUtils:EASY:FmtString2 $fmt $l $final]
+proc osutils:am:__LIBADD__ { theIncToolkits {final 0} } {
+
+  set aCurrentWorkBench [wokinfo -w]
+  while { "[w_info -f]" != "" } {
+    wokcd [w_info -f]
+  }
+  set aOriginModules [w_info -k]
+  wokcd $aCurrentWorkBench
+
+  set aLibString ""
+  
+  foreach aIncToolkit $theIncToolkits {
+    if { [lsearch $aOriginModules $aIncToolkit] != -1} {
+      append aLibString " \\\n-l$aIncToolkit"
+    } else {
+      append aLibString " \\\n../$aIncToolkit/lib$aIncToolkit.la"
+    }
+  }
+
+  return $aLibString
 }
 
 ;#
@@ -2673,7 +2690,7 @@ proc osutils:xcdtk { theOutDir theToolKit theGuidsMap {theTargetType "dylib"} }
   set aDepsFileRefSection ""
   set aDepsGuids ""
   set aDepsRefGuids ""
-  set anIncPaths [list "../../../inc"]
+  set anIncPaths [list "../../../inc" $::env(WOK_LIBRARY)]
   puts $aPbxprojFile [osutils:xcdtk:sources $theToolKit $theTargetType aSrcFileRefSection aGroupSection aPackagesGuids aSrcFileGuids aGuidsMap anIncPaths]
   puts $aPbxprojFile [osutils:xcdtk:deps    $theToolKit $theTargetType aGuidsMap aDepsFileRefSection aDepsGuids aDepsRefGuids]
   # End PBXBuildFile section
index 9ad668b8e17d8c2fe6f2bb8963b7bd1cdb6b3064..5669bceb2bc490eaf79f5aabd484adb4ba68fdb2 100644 (file)
@@ -15,7 +15,8 @@ __INCLUDES__
 lib_LTLIBRARIES=lib__TKNAM__.la
 
 lib__TKNAM___la_LIBADD = $(CSF_OPT_LIBS) \
-__LIBADD____EXTERNLIB__
+__LIBADD__ \
+__EXTERNLIB__
 
 lib__TKNAM___la_SOURCES = \
 __SOURCES__