From 19c52d8bf53b455b02e710ac73acf046f5f55145 Mon Sep 17 00:00:00 2001 From: ibs Date: Wed, 10 Apr 2013 14:30:22 +0400 Subject: [PATCH] 0023887: wgenproj -target=amk generate incorrect dependicies in *.am files for occt products occt's toolkits added to libTKDXF_la_LIBADD variable like -l Removing extra spaces __EXTERNLIB__ returned --- src/WOKTclLib/osutils.tcl | 25 +++++++++++++++++++++---- src/WOKTclLib/templates/template.mam | 3 ++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/WOKTclLib/osutils.tcl b/src/WOKTclLib/osutils.tcl index f8de607..346c65b 100755 --- a/src/WOKTclLib/osutils.tcl +++ b/src/WOKTclLib/osutils.tcl @@ -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 diff --git a/src/WOKTclLib/templates/template.mam b/src/WOKTclLib/templates/template.mam index 9ad668b..5669bce 100644 --- a/src/WOKTclLib/templates/template.mam +++ b/src/WOKTclLib/templates/template.mam @@ -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__ -- 2.39.5