mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0026602: Configuration, genproj.tcl - drop code generating Automake files
StdPrs/FILES - drop duplicates genproj.sh - fix launcher
This commit is contained in:
parent
6fb1a930e2
commit
cb6a2fbc18
751
adm/genproj.tcl
751
adm/genproj.tcl
@ -17,7 +17,7 @@
|
|||||||
# =======================================================================
|
# =======================================================================
|
||||||
# This script defines Tcl command genproj generating project files for
|
# This script defines Tcl command genproj generating project files for
|
||||||
# different IDEs:
|
# different IDEs:
|
||||||
# "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "amk" "xcd"
|
# "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd"
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# genproj -path=D:/occt -target=vc10
|
# genproj -path=D:/occt -target=vc10
|
||||||
@ -106,14 +106,14 @@ proc _get_used_files { pk {inc true} {src true} } {
|
|||||||
# Wrapper-function to generate VS project files
|
# Wrapper-function to generate VS project files
|
||||||
proc genproj { args } {
|
proc genproj { args } {
|
||||||
global path targetStation
|
global path targetStation
|
||||||
set aSupportedTargets { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "amk" "xcd" }
|
set aSupportedTargets { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
|
||||||
set anArgs $args
|
set anArgs $args
|
||||||
|
|
||||||
# Setting default IDE.
|
# Setting default IDE.
|
||||||
set anTarget ""
|
set anTarget ""
|
||||||
switch -exact -- "$targetStation" {
|
switch -exact -- "$targetStation" {
|
||||||
"wnt" {set anTarget "$::env(VCVER)"}
|
"wnt" {set anTarget "$::env(VCVER)"}
|
||||||
"lin" {set anTarget "amk"}
|
"lin" {set anTarget "cbp"}
|
||||||
"mac" {set anTarget "xcd"}
|
"mac" {set anTarget "xcd"}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,18 +188,14 @@ proc genproj { args } {
|
|||||||
vc12 - Visual Studio 2013
|
vc12 - Visual Studio 2013
|
||||||
vc14 - Visual Studio 2015
|
vc14 - Visual Studio 2015
|
||||||
cbp - CodeBlocks
|
cbp - CodeBlocks
|
||||||
xcd - XCode
|
xcd - XCode"
|
||||||
amk - AutoMake"
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if {!$isTargetDefault} {
|
if {!$isTargetDefault} {
|
||||||
puts "the \'$anTarget\' target has been applied"
|
puts "the \'$anTarget\' target has been applied"
|
||||||
}
|
}
|
||||||
|
|
||||||
if {"$anTarget" == "amk"} {
|
|
||||||
set targetStation "lin"
|
|
||||||
}
|
|
||||||
set anAdmPath "$path/adm"
|
set anAdmPath "$path/adm"
|
||||||
|
|
||||||
OS:MKPRC "$anAdmPath" "$anTarget" "$aLibType" "$aPlatform"
|
OS:MKPRC "$anAdmPath" "$anTarget" "$aLibType" "$aPlatform"
|
||||||
@ -220,8 +216,6 @@ proc genprojbat {thePath theIDE} {
|
|||||||
|
|
||||||
if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
|
if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
|
||||||
set aTargetPlatform wnt
|
set aTargetPlatform wnt
|
||||||
} elseif {"$theIDE" == "amk"} {
|
|
||||||
set aTargetPlatform lin
|
|
||||||
} elseif {"$theIDE" == "xcd"} {
|
} elseif {"$theIDE" == "xcd"} {
|
||||||
set aTargetPlatform mac
|
set aTargetPlatform mac
|
||||||
}
|
}
|
||||||
@ -278,7 +272,7 @@ set THE_GUIDS_LIST($aTKNullKey) "{00000000-0000-0000-0000-000000000000}"
|
|||||||
# Entry function to generate project files and solutions for IDE
|
# Entry function to generate project files and solutions for IDE
|
||||||
proc OS:MKPRC { {theOutDir {}} {theIDE ""} {theLibType "dynamic"} {thePlatform ""} } {
|
proc OS:MKPRC { {theOutDir {}} {theIDE ""} {theLibType "dynamic"} {thePlatform ""} } {
|
||||||
global path targetStation
|
global path targetStation
|
||||||
set aSupportedIDE { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "amk" "xcd" }
|
set aSupportedIDE { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
|
||||||
|
|
||||||
if { [lsearch $aSupportedIDE $theIDE] < 0 } {
|
if { [lsearch $aSupportedIDE $theIDE] < 0 } {
|
||||||
puts stderr "WOK does not support generation of project files for the selected IDE: $theIDE\nSupported IDEs: [join ${aSupportedIDE} " "]"
|
puts stderr "WOK does not support generation of project files for the selected IDE: $theIDE\nSupported IDEs: [join ${aSupportedIDE} " "]"
|
||||||
@ -350,7 +344,6 @@ proc OS:MKPRC { {theOutDir {}} {theIDE ""} {theLibType "dynamic"} {thePlatform "
|
|||||||
"vc12" -
|
"vc12" -
|
||||||
"vc14" { OS:MKVC $anOutDir $aModules $anAllSolution $theIDE }
|
"vc14" { OS:MKVC $anOutDir $aModules $anAllSolution $theIDE }
|
||||||
"cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution }
|
"cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution }
|
||||||
"amk" { OS:MKAMK $anOutDir $aModules "adm/${aWokStation}/${theIDE}"}
|
|
||||||
"xcd" {
|
"xcd" {
|
||||||
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
|
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
|
||||||
OS:MKXCD $anOutDir $aModules $anAllSolution $theLibType $thePlatform
|
OS:MKXCD $anOutDir $aModules $anAllSolution $theLibType $thePlatform
|
||||||
@ -1816,46 +1809,6 @@ proc osutils:vcproj:file { theVcVer theFile theOptions } {
|
|||||||
return $aText
|
return $aText
|
||||||
}
|
}
|
||||||
|
|
||||||
### AUTOMAKE ###############################################################################
|
|
||||||
proc OS:MKAMK { theOutDir {theModules {}} theSubPath} {
|
|
||||||
global path
|
|
||||||
wokUtils:FILES:mkdir $theOutDir
|
|
||||||
|
|
||||||
foreach aModule $theModules {
|
|
||||||
foreach aToolKit [$aModule:toolkits] {
|
|
||||||
puts " toolkit: $aToolKit ==> $path/src/$aToolKit/EXTERNLIB"
|
|
||||||
wokUtils:FILES:rmdir $theOutDir/$aToolKit
|
|
||||||
wokUtils:FILES:mkdir $theOutDir/$aToolKit
|
|
||||||
osutils:tk:mkam $theOutDir/$aToolKit $aToolKit
|
|
||||||
}
|
|
||||||
foreach anExecutable [OS:executable $aModule] {
|
|
||||||
wokUtils:FILES:rmdir $theOutDir/$anExecutable
|
|
||||||
wokUtils:FILES:mkdir $theOutDir/$anExecutable
|
|
||||||
osutils:tk:mkamx $theOutDir/$anExecutable $anExecutable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
osutils:am:adm $theOutDir $theModules
|
|
||||||
osutils:am:root $path $theSubPath $theModules
|
|
||||||
|
|
||||||
puts "The automake files are stored in the $theOutDir directory"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc wokUtils:FILES:rmdir { d } {
|
|
||||||
global env
|
|
||||||
global tcl_platform tcl_version
|
|
||||||
regsub -all {\.[^.]*} $tcl_version "" major
|
|
||||||
if { $major == 8 } {
|
|
||||||
file delete -force $d
|
|
||||||
} else {
|
|
||||||
if { "$tcl_platform(platform)" == "unix" } {
|
|
||||||
catch { exec rm -rf $d}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
proc wokUtils:FILES:mkdir { d } {
|
proc wokUtils:FILES:mkdir { d } {
|
||||||
global tcl_version
|
global tcl_version
|
||||||
regsub -all {\.[^.]*} $tcl_version "" major
|
regsub -all {\.[^.]*} $tcl_version "" major
|
||||||
@ -1877,51 +1830,6 @@ proc wokUtils:FILES:mkdir { d } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# "Nice letter: %s" { a b c } => {Nice letter: %a} {Nice letter: %b} ..
|
|
||||||
# as a string without backslash
|
|
||||||
proc wokUtils:EASY:FmtSimple1 { fmt l {backslh 1} } {
|
|
||||||
foreach e $l {
|
|
||||||
if { $backslh } {
|
|
||||||
append str [format $fmt $e] "\n"
|
|
||||||
} else {
|
|
||||||
append str [format $fmt $e]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $str
|
|
||||||
}
|
|
||||||
|
|
||||||
# edit_last is performed ONCE fmt has been applied.
|
|
||||||
proc wokUtils:EASY:FmtString2 { fmt l {yes_for_last 0} {edit_last {}} } {
|
|
||||||
set ldeb [lrange $l 0 [expr [llength $l] -2]]
|
|
||||||
set last [lrange $l end end]
|
|
||||||
foreach e $ldeb {
|
|
||||||
append str [format $fmt $e $e] " \\" "\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
if {$edit_last != {} } {
|
|
||||||
set slast [$edit_last [format $fmt $last $last]]
|
|
||||||
} else {
|
|
||||||
set slast [format $fmt $last $last]
|
|
||||||
}
|
|
||||||
|
|
||||||
if { $yes_for_last } {
|
|
||||||
append str $slast " \\" "\n"
|
|
||||||
} else {
|
|
||||||
append str $slast "\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str
|
|
||||||
}
|
|
||||||
|
|
||||||
# { a.x b.c c.v } => { a b c}
|
|
||||||
proc wokUtils:LIST:sanspoint { l } {
|
|
||||||
set rr {}
|
|
||||||
foreach x $l {
|
|
||||||
lappend rr [file root $x]
|
|
||||||
}
|
|
||||||
return $rr
|
|
||||||
}
|
|
||||||
|
|
||||||
# remove from listloc OpenCascade units indesirables on Unix
|
# remove from listloc OpenCascade units indesirables on Unix
|
||||||
proc osutils:justunix { listloc } {
|
proc osutils:justunix { listloc } {
|
||||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||||
@ -1932,653 +1840,6 @@ proc osutils:justunix { listloc } {
|
|||||||
return [osutils:juststation $goaway $listloc]
|
return [osutils:juststation $goaway $listloc]
|
||||||
}
|
}
|
||||||
|
|
||||||
# remove ":" from last item of dependencies list in target VPATH of Makefile.am
|
|
||||||
proc osutils:am:__VPATH__lastoccur { str } {
|
|
||||||
if { [regsub {:$} $str "" u] != 0 } {
|
|
||||||
return $u
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# ((((((((((((( Formats in Makefile.am )))))))))))))
|
|
||||||
# Used to replace the string __VPATH__ in Makefile.am
|
|
||||||
# l is the list of the units in a toolkit.
|
|
||||||
proc osutils:am:__VPATH__ { l } {
|
|
||||||
set fmt "@top_srcdir@/src/%s:"
|
|
||||||
return [wokUtils:EASY:FmtString2 $fmt $l 0 osutils:am:__VPATH__lastoccur]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Used to replace the string __INCLUDES__ in Makefile.am
|
|
||||||
# l is the list of packages in a toolkit.
|
|
||||||
proc osutils:am:__INCLUDES__ { l } {
|
|
||||||
set fmt "-I@top_srcdir@/src/%s"
|
|
||||||
return [wokUtils:EASY:FmtString2 $fmt $l]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Used to replace the string __LIBADD__ in Makefile.am
|
|
||||||
# l is the toolkit closure list of a toolkit.
|
|
||||||
proc osutils:am:__LIBADD__ { theIncToolkits {final 0} } {
|
|
||||||
global path
|
|
||||||
global fBranch
|
|
||||||
set aFatherModules ""
|
|
||||||
set aCurrentWorkBench [file tail $path]
|
|
||||||
if { $fBranch != "" } {
|
|
||||||
set fd [open $fBranch/adm/UDLIST rb]
|
|
||||||
set fileContent [split [read $fd] "\n"]
|
|
||||||
close $fd
|
|
||||||
set ftoolkits [lsearch -all -inline $fileContent "t *"]
|
|
||||||
foreach ft $ftoolkits {
|
|
||||||
set aFatherModules "$aFatherModules [string range $ft 2 end]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set aLibString ""
|
|
||||||
foreach aIncToolkit $theIncToolkits {
|
|
||||||
if { [lsearch [split $aFatherModules " "] $aIncToolkit] != -1} {
|
|
||||||
append aLibString " \\\n-l$aIncToolkit"
|
|
||||||
} else {
|
|
||||||
append aLibString " \\\n../$aIncToolkit/lib$aIncToolkit.la"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $aLibString
|
|
||||||
}
|
|
||||||
|
|
||||||
# Used to replace the string __SOURCES__ in Makefile.am
|
|
||||||
# l is the list of all compilable files in a toolkit.
|
|
||||||
proc osutils:am:__SOURCES__ { l } {
|
|
||||||
set fmt "%s"
|
|
||||||
return [wokUtils:EASY:FmtString1 $fmt $l]
|
|
||||||
}
|
|
||||||
|
|
||||||
proc osutils:am:__CXXFLAG__ { l } {
|
|
||||||
set fmt "%s"
|
|
||||||
return [wokUtils:EASY:FmtString1 $fmt [osutils:am:PkCXXOption $l]]
|
|
||||||
}
|
|
||||||
|
|
||||||
proc osutils:am:PkCXXOption { ppk } {
|
|
||||||
global path
|
|
||||||
#puts "\t 1 [lindex [wokparam -e %CMPLRS_CXX_Options [wokcd]] 0]"
|
|
||||||
set CXXCOMMON [_get_options lin cmplrs_cxx b]
|
|
||||||
#puts "\t 2 [wokparam -v %CMPLRS_CXX_Options [w_info -f]]"
|
|
||||||
#puts "\t 3 [wokparam -v %CMPLRS_CXX_Options]"
|
|
||||||
set FoundFlag "[lindex [osutils:intersect3 [split [_get_options lin cmplrs_cxx f]] [split [_get_options lin cmplrs_cxx b]] ] 2]"
|
|
||||||
foreach pk $ppk {
|
|
||||||
#puts $pk
|
|
||||||
if {![file isdirectory $path/src/$pk]} {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
set src_files [_get_used_files $pk false]
|
|
||||||
set only_src_files {}
|
|
||||||
foreach s $src_files {
|
|
||||||
regexp {source ([^\s]+)} $s dummy name
|
|
||||||
lappend only_src_files $name
|
|
||||||
}
|
|
||||||
if {[lsearch $only_src_files ${pk}_CMPLRS.edl] != "-1"} {
|
|
||||||
set pk_cmplrs_cxx [_get_options lin cmplrs_cxx $pk]
|
|
||||||
if {$pk_cmplrs_cxx == ""} {
|
|
||||||
set pk_cmplrs_cxx [_get_options lin cmplrs_cxx b]
|
|
||||||
}
|
|
||||||
set CXXStr $pk_cmplrs_cxx
|
|
||||||
#puts "\t 4 [wokparam -e %CMPLRS_CXX_Options [woklocate -u $pk]] $pk"
|
|
||||||
set LastIndex [expr {[string length $CXXCOMMON ] - 1}]
|
|
||||||
if {[string equal $CXXCOMMON [string range $CXXStr 0 $LastIndex]]} {
|
|
||||||
set CXXOption " "
|
|
||||||
} else {
|
|
||||||
set CXXOption [string range $CXXStr 0 [expr {[string last $CXXCOMMON $CXXStr] - 1}]]
|
|
||||||
}
|
|
||||||
if {$CXXOption != " " && $CXXOption != "" && $CXXOption != " " && $CXXOption != " "} {
|
|
||||||
set FoundList [split $CXXOption " "]
|
|
||||||
foreach elem $FoundList {
|
|
||||||
if {$elem != ""} {
|
|
||||||
if {[string first "-I" $elem] == "-1" } {
|
|
||||||
if {[string first $elem $FoundFlag] == "-1"} {
|
|
||||||
set FoundFlag "$FoundFlag $elem"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $FoundFlag
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create in dir the Makefile.am associated with toolkit tkloc.
|
|
||||||
# Returns the full path of the created file.
|
|
||||||
proc osutils:tk:mkam { dir tkloc } {
|
|
||||||
global path
|
|
||||||
set pkgs $path/src/${tkloc}/PACKAGES
|
|
||||||
if { ![file exists $pkgs] } {
|
|
||||||
puts stderr "osutils:tk:mkam : Error. File PACKAGES not found for toolkit $tkloc."
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
|
|
||||||
set tmplat [osutils:readtemplate mam "Makefile.am"]
|
|
||||||
set lpkgs [osutils:justunix [wokUtils:FILES:FileToList $pkgs]]
|
|
||||||
set close [wokUtils:LIST:Purge [osutils:tk:close $tkloc]]
|
|
||||||
set lsrc [lsort [osutils:tk:files $tkloc osutils:compilable 1 osutils:justunix]]
|
|
||||||
set lobj [wokUtils:LIST:sanspoint $lsrc]
|
|
||||||
|
|
||||||
set lcsf [osutils:tk:csfInExternlib $path/src/${tkloc}/EXTERNLIB]
|
|
||||||
|
|
||||||
set final 0
|
|
||||||
set externinc ""
|
|
||||||
set externlib ""
|
|
||||||
if { $lcsf != {} } {
|
|
||||||
set final 1
|
|
||||||
set fmtinc "\$(%s_INCLUDES) "
|
|
||||||
set fmtlib "\$(%s_LIB) "
|
|
||||||
set externinc [wokUtils:EASY:FmtSimple1 $fmtinc $lcsf 0]
|
|
||||||
set externlib [wokUtils:EASY:FmtSimple1 $fmtlib $lcsf 0]
|
|
||||||
}
|
|
||||||
|
|
||||||
regsub -all -- {__TKNAM__} $tmplat $tkloc tmplat
|
|
||||||
set vpath [osutils:am:__VPATH__ $lpkgs]
|
|
||||||
regsub -all -- {__VPATH__} $tmplat $vpath tmplat
|
|
||||||
set inclu [osutils:am:__INCLUDES__ $lpkgs]
|
|
||||||
regsub -all -- {__INCLUDES__} $tmplat $inclu tmplat
|
|
||||||
if { $close != {} } {
|
|
||||||
set libadd [osutils:am:__LIBADD__ $close $final]
|
|
||||||
} else {
|
|
||||||
set libadd ""
|
|
||||||
}
|
|
||||||
regsub -all -- {__LIBADD__} $tmplat $libadd tmplat
|
|
||||||
set source [osutils:am:__SOURCES__ $lsrc]
|
|
||||||
regsub -all -- {__SOURCES__} $tmplat $source tmplat
|
|
||||||
regsub -all -- {__EXTERNINC__} $tmplat $externinc tmplat
|
|
||||||
set CXXFl [osutils:am:__CXXFLAG__ $lpkgs]
|
|
||||||
regsub -all -- {__CXXFLAG__} $tmplat $CXXFl tmplat
|
|
||||||
set CFl [osutils:am:__CFLAG__ $lpkgs]
|
|
||||||
regsub -all -- {__CFLAG__} $tmplat $CFl tmplat
|
|
||||||
|
|
||||||
regsub -all -- {__EXTERNLIB__} $tmplat $externlib tmplat
|
|
||||||
|
|
||||||
wokUtils:FILES:StringToFile $tmplat [set fmam [file join $dir Makefile.am]]
|
|
||||||
return [list $fmam]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Write a string in a file
|
|
||||||
proc wokUtils:FILES:StringToFile { str path } {
|
|
||||||
if { [catch { set out [ open $path w ] } errout] == 0 } {
|
|
||||||
puts -nonewline $out $str
|
|
||||||
close $out
|
|
||||||
return 1
|
|
||||||
} else {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create in dir the Makefile.am associated with toolkit tkloc.
|
|
||||||
# Returns the full path of the created file.
|
|
||||||
proc osutils:tk:mkamx { dir tkloc } {
|
|
||||||
global path
|
|
||||||
set src_files [_get_used_files $tkloc false]
|
|
||||||
set only_src_files {}
|
|
||||||
foreach s $src_files {
|
|
||||||
regexp {source ([^\s]+)} $s dummy name
|
|
||||||
lappend only_src_files $name
|
|
||||||
}
|
|
||||||
if { [lsearch $only_src_files ${tkloc}_WOKSteps.edl] != "-1"} {
|
|
||||||
set pkgs "$path/src/${tkloc}/EXTERNLIB"
|
|
||||||
if { $pkgs == {} } {
|
|
||||||
puts stderr "osutils:tk:mkamx : Error. File EXTERNLIB not found for executable $tkloc."
|
|
||||||
#return {}
|
|
||||||
}
|
|
||||||
set tmplat [osutils:readtemplate mamx "Makefile.am (executable)"]
|
|
||||||
set close [wokUtils:LIST:Purge [osutils:tk:close $tkloc]]
|
|
||||||
set lsrc [lsort [osutils:tk:files $tkloc osutils:compilable 1 osutils:justunix]]
|
|
||||||
set lobj [wokUtils:LIST:sanspoint $lsrc]
|
|
||||||
set CXXList {}
|
|
||||||
foreach SourceFile $only_src_files {
|
|
||||||
if {[file extension $SourceFile] == ".cxx"} {
|
|
||||||
lappend CXXList [file rootname $SourceFile]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set pkgs [LibToLinkX $tkloc [lindex $CXXList 0]]
|
|
||||||
set lpkgs [osutils:justunix [wokUtils:FILES:FileToList $pkgs]]
|
|
||||||
puts "pkgs $pkgs"
|
|
||||||
#set lcsf [osutils:tk:csfInExternlib [woklocate -p ${tkloc}:source:EXTERNLIB [wokcd]]]
|
|
||||||
|
|
||||||
set lcsf {}
|
|
||||||
foreach tk $pkgs {
|
|
||||||
foreach element [osutils:tk:csfInExternlib "$path/src/${tk}/EXTERNLIB"] {
|
|
||||||
if {[lsearch $lcsf $element] == "-1"} {
|
|
||||||
set lcsf [concat $lcsf $element]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set final 0
|
|
||||||
set externinc ""
|
|
||||||
set externlib ""
|
|
||||||
if { $lcsf != {} } {
|
|
||||||
set final 1
|
|
||||||
set fmtinc "\$(%s_INCLUDES) "
|
|
||||||
set fmtlib "\$(%s_LIB) "
|
|
||||||
set externinc [wokUtils:EASY:FmtSimple1 $fmtinc $lcsf 0]
|
|
||||||
set externlib [wokUtils:EASY:FmtSimple1 $fmtlib $lcsf 0]
|
|
||||||
}
|
|
||||||
regsub -all -- {__XQTNAM__} $tmplat $tkloc tmplat
|
|
||||||
set tmplat "$tmplat \nlib_LTLIBRARIES="
|
|
||||||
foreach entity $CXXList {
|
|
||||||
set tmplat "$tmplat lib${entity}.la"
|
|
||||||
}
|
|
||||||
set tmplat "$tmplat\n"
|
|
||||||
set inclu [osutils:am:__INCLUDES__ $lpkgs]
|
|
||||||
regsub -all -- {__INCLUDES__} $tmplat $inclu tmplat
|
|
||||||
if { $pkgs != {} } {
|
|
||||||
set libadd [osutils:am:__LIBADD__ $pkgs $final]
|
|
||||||
} else {
|
|
||||||
set libadd ""
|
|
||||||
}
|
|
||||||
regsub -all -- {__LIBADD__} $tmplat $libadd tmplat
|
|
||||||
set source [osutils:am:__SOURCES__ $CXXList]
|
|
||||||
regsub -all -- {__SOURCES__} $tmplat $source tmplat
|
|
||||||
regsub -all -- {__EXTERNINC__} $tmplat $externinc tmplat
|
|
||||||
foreach entity $CXXList {
|
|
||||||
set tmplat "$tmplat lib${entity}_la_SOURCES = @top_srcdir@/src/${tkloc}/${entity}.cxx \n"
|
|
||||||
}
|
|
||||||
foreach entity $CXXList {
|
|
||||||
set tmplat "$tmplat lib${entity}_la_LIBADD = $libadd $externlib \n"
|
|
||||||
}
|
|
||||||
wokUtils:FILES:StringToFile $tmplat [set fmam [file join $dir Makefile.am]]
|
|
||||||
|
|
||||||
unset tmplat
|
|
||||||
|
|
||||||
return [list $fmam]
|
|
||||||
|
|
||||||
} else {
|
|
||||||
set pkgs "$path/src/${tkloc}/EXTERNLIB"
|
|
||||||
if { $pkgs == {} } {
|
|
||||||
puts stderr "osutils:tk:mkamx : Error. File EXTERNLIB not found for executable $tkloc."
|
|
||||||
#return {}
|
|
||||||
}
|
|
||||||
set tmplat [osutils:readtemplate mamx "Makefile.am (executable)"]
|
|
||||||
set close [wokUtils:LIST:Purge [osutils:tk:close $tkloc]]
|
|
||||||
set lsrc [lsort [osutils:tk:files $tkloc osutils:compilable 1 osutils:justunix]]
|
|
||||||
set lobj [wokUtils:LIST:sanspoint $lsrc]
|
|
||||||
set CXXList {}
|
|
||||||
foreach SourceFile $only_src_files {
|
|
||||||
if {[file extension $SourceFile] == ".cxx"} {
|
|
||||||
lappend CXXList [file rootname $SourceFile]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set pkgs [LibToLinkX $tkloc [lindex $CXXList 0]]
|
|
||||||
set lpkgs [osutils:justunix [wokUtils:FILES:FileToList $pkgs]]
|
|
||||||
set lcsf [osutils:tk:csfInExternlib "$path/src/${tkloc}/EXTERNLIB"]
|
|
||||||
|
|
||||||
set lcsf {}
|
|
||||||
foreach tk $pkgs {
|
|
||||||
foreach element [osutils:tk:csfInExternlib "$path/src/${tk}/EXTERNLIB"] {
|
|
||||||
if {[lsearch $lcsf $element] == "-1"} {
|
|
||||||
set lcsf [concat $lcsf $element]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set final 0
|
|
||||||
set externinc ""
|
|
||||||
set externlib ""
|
|
||||||
if { $lcsf != {} } {
|
|
||||||
set final 1
|
|
||||||
set fmtinc "\$(%s_INCLUDES) "
|
|
||||||
set fmtlib "\$(%s_LIB) "
|
|
||||||
set externinc [wokUtils:EASY:FmtSimple1 $fmtinc $lcsf 0]
|
|
||||||
set externlib [wokUtils:EASY:FmtSimple1 $fmtlib $lcsf 0]
|
|
||||||
}
|
|
||||||
regsub -all -- {__XQTNAM__} $tmplat $tkloc tmplat
|
|
||||||
set tmplat "$tmplat \nbin_PROGRAMS="
|
|
||||||
foreach entity $CXXList {
|
|
||||||
set tmplat "${tmplat} ${entity}"
|
|
||||||
}
|
|
||||||
|
|
||||||
set tmplat "${tmplat}\n"
|
|
||||||
set inclu [osutils:am:__INCLUDES__ $lpkgs]
|
|
||||||
regsub -all -- {__INCLUDES__} $tmplat $inclu tmplat
|
|
||||||
if { $pkgs != {} } {
|
|
||||||
set libadd [osutils:am:__LIBADD__ $pkgs $final]
|
|
||||||
} else {
|
|
||||||
set libadd ""
|
|
||||||
}
|
|
||||||
set source [osutils:am:__SOURCES__ $CXXList]
|
|
||||||
regsub -all -- {__SOURCES__} $tmplat $source tmplat
|
|
||||||
regsub -all -- {__EXTERNINC__} $tmplat $externinc tmplat
|
|
||||||
foreach entity $CXXList {
|
|
||||||
set tmplat "$tmplat ${entity}_SOURCES = @top_srcdir@/src/${tkloc}/${entity}.cxx \n"
|
|
||||||
}
|
|
||||||
foreach entity $CXXList {
|
|
||||||
set tmplat "$tmplat ${entity}_LDADD = $libadd $externlib \n"
|
|
||||||
}
|
|
||||||
wokUtils:FILES:StringToFile $tmplat [set fmam [file join $dir Makefile.am]]
|
|
||||||
|
|
||||||
return [list $fmam]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create in dir the Makefile.am in $dir directory.
|
|
||||||
# Returns the full path of the created file.
|
|
||||||
proc osutils:am:adm { dir {lesmodules {}} } {
|
|
||||||
set amstring "srcdir = @srcdir@\n\n"
|
|
||||||
set subdirs "SUBDIRS ="
|
|
||||||
set vpath "VPATH = @srcdir@ ${dir}: "
|
|
||||||
set make ""
|
|
||||||
set phony ".PHONY:"
|
|
||||||
foreach theModule $lesmodules {
|
|
||||||
set units [osutils:tk:sort [$theModule:toolkits]]
|
|
||||||
set units [concat $units [OS:executable $theModule]]
|
|
||||||
append amstring "${theModule}_PKGS ="
|
|
||||||
append vpath "\\\n"
|
|
||||||
foreach unit $units {
|
|
||||||
append amstring " ${unit}"
|
|
||||||
append vpath "${dir}/${unit}: "
|
|
||||||
}
|
|
||||||
set up ${theModule}
|
|
||||||
if { [info procs ${theModule}:alias] != "" } {
|
|
||||||
set up [${theModule}:alias]
|
|
||||||
}
|
|
||||||
set up [string toupper ${up}]
|
|
||||||
append amstring "\n\nif ENABLE_${up}\n"
|
|
||||||
append amstring " ${theModule}_DIRS = \$(${theModule}_PKGS)\n"
|
|
||||||
append amstring "else\n"
|
|
||||||
append amstring " ${theModule}_DIRS = \n"
|
|
||||||
append amstring "endif\n\n"
|
|
||||||
append subdirs " \$(${theModule}_DIRS)"
|
|
||||||
append make "${theModule}:\n"
|
|
||||||
append make "\tfor d in \$(${theModule}_PKGS); do \\\n"
|
|
||||||
append make "\t\tcd \$\$d; \$(MAKE) \$(AM_MAKEFLAGS) lib\$\$d.la; cd ..; \\\n"
|
|
||||||
append make "\tdone\n\n"
|
|
||||||
append phony " ${theModule}"
|
|
||||||
}
|
|
||||||
append amstring "$subdirs\n\n"
|
|
||||||
append amstring "$vpath\n\n"
|
|
||||||
append amstring $make
|
|
||||||
append amstring $phony
|
|
||||||
wokUtils:FILES:StringToFile $amstring [set fmam [file join $dir Makefile.am]]
|
|
||||||
return [list $fmam]
|
|
||||||
}
|
|
||||||
|
|
||||||
# retourne la liste de dependances de module.
|
|
||||||
proc OS:lsdep { m } {
|
|
||||||
set res {}
|
|
||||||
set l [${m}:depends]
|
|
||||||
if { $l != {} } {
|
|
||||||
set res [concat $res $l]
|
|
||||||
foreach h $l {
|
|
||||||
set res [concat $res [OS:lsdep ${h}]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $res
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create in dir the Makefile.am and configure.ac in CASROOT directory.
|
|
||||||
# Returns the full path of the created file.
|
|
||||||
proc osutils:am:root { dir theSubPath {lesmodules {}} } {
|
|
||||||
global path
|
|
||||||
set amstring "srcdir = @srcdir@\n\n"
|
|
||||||
append amstring "SUBDIRS = ${theSubPath}\n\n"
|
|
||||||
append amstring "VPATH = @srcdir@ @top_srcdir@/${theSubPath}: @top_srcdir@/${theSubPath}:\n\n"
|
|
||||||
|
|
||||||
set phony ".PHONY:"
|
|
||||||
|
|
||||||
set acstring [osutils:readtemplate ac "Makefile.am"]
|
|
||||||
set enablestr ""
|
|
||||||
set confstr ""
|
|
||||||
set condstr ""
|
|
||||||
set repstr ""
|
|
||||||
set acconfstr ""
|
|
||||||
|
|
||||||
set exelocal "install-exec-local:\n"
|
|
||||||
append exelocal "\t"
|
|
||||||
append exelocal {$(INSTALL) -d $(prefix)/$(platform)}
|
|
||||||
append exelocal "\n"
|
|
||||||
foreach d {bin lib} {
|
|
||||||
append exelocal "\t"
|
|
||||||
append exelocal "if \[ -e \$(prefix)/${d} -a ! -e \$(prefix)/\$(platform)/${d} \]; then \\\n"
|
|
||||||
append exelocal "\t\tcd \$(prefix)/\$(platform) && ln -s ../${d} ${d}; \\\n"
|
|
||||||
append exelocal "\tfi\n"
|
|
||||||
}
|
|
||||||
append exelocal "\t"
|
|
||||||
append exelocal {buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(prefix); installd=`pwd`; cd $$buildd;}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t"
|
|
||||||
append exelocal {if [ "$$installd" != "$$sourced" ]; then}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t\t"
|
|
||||||
append exelocal {$(INSTALL) -d $(prefix)/src;}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t\t"
|
|
||||||
append exelocal {cp -frL $(top_srcdir)/src $(prefix);}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t\t"
|
|
||||||
append exelocal {cp -frL $$buildd/config.h $(prefix);}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t\tfor d in "
|
|
||||||
|
|
||||||
foreach theModule $lesmodules {
|
|
||||||
append amstring "${theModule}_PKGS ="
|
|
||||||
foreach r [${theModule}:ressources] {
|
|
||||||
if { "[lindex $r 1]" == "r" } {
|
|
||||||
append amstring " [lindex $r 2]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set up ${theModule}
|
|
||||||
if { [info procs ${theModule}:alias] != "" } {
|
|
||||||
set up [${theModule}:alias]
|
|
||||||
}
|
|
||||||
set up [string toupper ${up}]
|
|
||||||
set lower ${theModule}
|
|
||||||
if { [info procs ${theModule}:alias] != "" } {
|
|
||||||
set lower [${theModule}:alias]
|
|
||||||
}
|
|
||||||
set lower [string tolower ${lower}]
|
|
||||||
|
|
||||||
append amstring "\n\nif ENABLE_${up}\n"
|
|
||||||
append amstring " ${theModule}_DIRS = \$(${theModule}_PKGS)\n"
|
|
||||||
append amstring "else\n"
|
|
||||||
append amstring " ${theModule}_DIRS = \n"
|
|
||||||
append amstring "endif\n\n"
|
|
||||||
append amstring "${theModule}:\n"
|
|
||||||
append amstring "\tcd \$(top_builddir)/${theSubPath} && \$(MAKE) \$(AM_MAKEFLAGS) ${theModule}\n\n"
|
|
||||||
append phony " ${theModule}"
|
|
||||||
|
|
||||||
append exelocal " \$(${theModule}_DIRS)"
|
|
||||||
|
|
||||||
append enablestr "AC_ARG_ENABLE(\[${lower}\],\n"
|
|
||||||
append enablestr " \[AS_HELP_STRING(\[--disable-${lower}\],\[Disable ${theModule} components\])\],\n"
|
|
||||||
append enablestr " \[ENABLE_${up}=\${enableval}\],\[ENABLE_${up}=yes\])\n"
|
|
||||||
|
|
||||||
set deplist [OS:lsdep ${theModule}]
|
|
||||||
set acdeplist {}
|
|
||||||
if { [info procs ${theModule}:acdepends] != "" } {
|
|
||||||
set acdeplist [${theModule}:acdepends]
|
|
||||||
}
|
|
||||||
|
|
||||||
if { [llength $deplist] > 0 || [llength $acdeplist] > 0} {
|
|
||||||
append confstr "if test \"xyes\" = \"x\$ENABLE_${up}\"; then\n"
|
|
||||||
} else {
|
|
||||||
append confstr "if test \"xyes\" != \"x\$ENABLE_${up}\"; then\n"
|
|
||||||
}
|
|
||||||
foreach dep $deplist {
|
|
||||||
set dup ${dep}
|
|
||||||
if { [info procs ${dep}:alias] != "" } {
|
|
||||||
set dup [${dep}:alias]
|
|
||||||
}
|
|
||||||
set dup [string toupper ${dup}]
|
|
||||||
append confstr " if test \"xyes\" = \"x\$ENABLE_${up}\" -a \"xyes\" != \"x\$ENABLE_${dup}\"; then\n"
|
|
||||||
append confstr " AC_MSG_NOTICE(\[Disabling ${theModule}: not building ${dep} component\])\n"
|
|
||||||
append confstr " DISABLE_${up}_REASON=\"(${dep} component disabled)\"\n"
|
|
||||||
append confstr " ENABLE_${up}=no\n"
|
|
||||||
append confstr " fi\n"
|
|
||||||
}
|
|
||||||
foreach dep $acdeplist {
|
|
||||||
append confstr " if test \"xyes\" = \"x\$ENABLE_${up}\" -a \"xyes\" != \"x\$HAVE_${dep}\"; then\n"
|
|
||||||
append confstr " AC_MSG_NOTICE(\[Disabling ${theModule}: ${dep} not found\])\n"
|
|
||||||
append confstr " DISABLE_${up}_REASON=\"(${dep} not found)\"\n"
|
|
||||||
append confstr " ENABLE_${up}=no\n"
|
|
||||||
append confstr " fi\n"
|
|
||||||
}
|
|
||||||
if { [llength $deplist] > 0 || [llength $acdeplist] > 0 } {
|
|
||||||
append confstr "else\n"
|
|
||||||
}
|
|
||||||
append confstr " DISABLE_${up}_REASON=\"(Disabled)\"\n"
|
|
||||||
append confstr "fi\n"
|
|
||||||
|
|
||||||
append condstr "AM_CONDITIONAL(\[ENABLE_${up}\], \[test \"xyes\" = \"x\$ENABLE_${up}\"\])\n"
|
|
||||||
append repstr [format "echo \"%-*s \$ENABLE_${up} \$DISABLE_${up}_REASON\"" 26 ${theModule}]
|
|
||||||
append repstr "\n"
|
|
||||||
|
|
||||||
set units [$theModule:toolkits]
|
|
||||||
set units [concat $units [OS:executable $theModule]]
|
|
||||||
foreach unit $units {
|
|
||||||
append acconfstr "${theSubPath}/${unit}/Makefile \\\n"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
append exelocal "; do \\\n"
|
|
||||||
append exelocal "\t\t\t"
|
|
||||||
append exelocal {$(INSTALL) -d $(prefix)/src/$$d;}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t\t\t"
|
|
||||||
append exelocal {cp -frL $(top_srcdir)/src/$$d $(prefix)/src;}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t\tdone; \\\n"
|
|
||||||
append exelocal "\tfi\n"
|
|
||||||
append exelocal "\t"
|
|
||||||
append exelocal {if [ -e $(prefix)/src/config.h ]; then}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\t\t"
|
|
||||||
append exelocal {unlink $(prefix)/src/config.h;}
|
|
||||||
append exelocal " \\\n"
|
|
||||||
append exelocal "\tfi\n"
|
|
||||||
append exelocal "\t"
|
|
||||||
append exelocal {cd $(prefix)/src && ln -s ../config.h config.h}
|
|
||||||
append exelocal "\n"
|
|
||||||
append exelocal "\t"
|
|
||||||
append exelocal {cd $(top_srcdir) && cp *.sh $(prefix)}
|
|
||||||
append exelocal "\n"
|
|
||||||
append exelocal "\n"
|
|
||||||
|
|
||||||
append amstring $exelocal
|
|
||||||
append amstring $phony
|
|
||||||
|
|
||||||
regsub -all -- {__ENABLEMODULES__} $acstring $enablestr acstring
|
|
||||||
regsub -all -- {__CONFMODULES__} $acstring $confstr acstring
|
|
||||||
regsub -all -- {__CONDMODULES__} $acstring $condstr acstring
|
|
||||||
regsub -all -- {__REPMODULES__} $acstring $repstr acstring
|
|
||||||
regsub -all -- {__ACCONFMODULES__} $acstring $acconfstr acstring
|
|
||||||
|
|
||||||
wokUtils:FILES:StringToFile $amstring [set fmam [file join $dir Makefile.am]]
|
|
||||||
wokUtils:FILES:StringToFile $acstring [set fmam [file join $dir configure.ac]]
|
|
||||||
file copy -force -- [file join $path/adm/templates build_configure] [file join $dir build_configure]
|
|
||||||
file copy -force -- [file join $path/adm/templates acinclude.m4] [file join $dir acinclude.m4]
|
|
||||||
file copy -force -- [file join $path/adm/templates custom.sh.in] [file join $dir custom.sh.in]
|
|
||||||
return [list $fmam]
|
|
||||||
}
|
|
||||||
|
|
||||||
proc wokUtils:EASY:FmtString1 { fmt l {yes_for_last 0} {edit_last {}} } {
|
|
||||||
set ldeb [lrange $l 0 [expr [llength $l] -2]]
|
|
||||||
set last [lrange $l end end]
|
|
||||||
foreach e $ldeb {
|
|
||||||
append str [format $fmt $e] " \\" "\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
if {$edit_last != {} } {
|
|
||||||
set slast [$edit_last [format $fmt $last]]
|
|
||||||
} else {
|
|
||||||
set slast [format $fmt $last]
|
|
||||||
}
|
|
||||||
|
|
||||||
if { $yes_for_last } {
|
|
||||||
append str $slast " \\" "\n"
|
|
||||||
} else {
|
|
||||||
append str $slast "\n"
|
|
||||||
}
|
|
||||||
return $str
|
|
||||||
}
|
|
||||||
|
|
||||||
# Used to replace the string __CFLAG__ in Makefile.am
|
|
||||||
# l is the list of all compilable files in a toolkit.
|
|
||||||
proc osutils:am:__CFLAG__ { l } {
|
|
||||||
set fmt "%s"
|
|
||||||
return [wokUtils:EASY:FmtString1 $fmt [osutils:am:PkCOption $l]]
|
|
||||||
}
|
|
||||||
|
|
||||||
proc osutils:am:PkCOption { ppk } {
|
|
||||||
global path
|
|
||||||
#puts "\t\t $ppk"
|
|
||||||
#puts "\t 5 [lindex [wokparam -e %CMPLRS_C_Options [wokcd]] 0]"
|
|
||||||
set CCOMMON [_get_options lin cmplrs_c b]
|
|
||||||
#puts "\t 6 [lindex [wokparam -v %CMPLRS_C_Options [w_info -f]] 0]"
|
|
||||||
set FoundFlag "[lindex [osutils:intersect3 [split [_get_options lin cmplrs_c f]] [split [_get_options lin cmplrs_c b]]] 2]"
|
|
||||||
foreach pk $ppk {
|
|
||||||
if {![file isdirectory $path/src/$pk]} {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
set src_files [_get_used_files $pk false]
|
|
||||||
set only_src_files {}
|
|
||||||
foreach s $src_files {
|
|
||||||
regexp {source ([^\s]+)} $s dummy name
|
|
||||||
lappend only_src_files $name
|
|
||||||
}
|
|
||||||
if {[lsearch $src_files ${pk}_CMPLRS.edl] != "-1"} {
|
|
||||||
#puts "\t 7 [lindex [wokparam -e %CMPLRS_C_Options [woklocate -u $pk]] 0] $pk"
|
|
||||||
set aPkList [split "[_get_options lin cmplrs_c $pk]" " "]
|
|
||||||
set aCcomList [split "$CCOMMON" " "]
|
|
||||||
|
|
||||||
foreach aPkItem $aPkList {
|
|
||||||
if { [lsearch aCcomList $aPkItem] != -1 } {
|
|
||||||
if {[string first "-I" $aPkItem] == "-1" } {
|
|
||||||
set FoundFlag "$FoundFlag $aPkItem"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $FoundFlag
|
|
||||||
}
|
|
||||||
|
|
||||||
proc osutils:tksrcfiles { theUnits theRelatedPath {theCompatible {}} } {
|
|
||||||
set aTKSrcFiles [list]
|
|
||||||
|
|
||||||
if [array exists written] { unset written }
|
|
||||||
foreach anUnit $theUnits {
|
|
||||||
set xlo $anUnit
|
|
||||||
set aSrcFiles [osutils:tk:files $xlo osutils:compilable 0]
|
|
||||||
|
|
||||||
if { $theCompatible != {} } {
|
|
||||||
set aSrcFiles [osutils:tk:files $xlo $theCompatible 0]
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach aSrcFile [lsort $aSrcFiles] {
|
|
||||||
if { ![info exists written([file tail $aSrcFile])] } {
|
|
||||||
set written([file tail $aSrcFile]) 1
|
|
||||||
lappend aTKSrcFiles "${theRelatedPath}/[wokUtils:FILES:wtail $aSrcFile 3]"
|
|
||||||
} else {
|
|
||||||
puts "Warning : more than one occurences for [file tail $aSrcFile]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $aTKSrcFiles
|
|
||||||
}
|
|
||||||
|
|
||||||
proc osutils:mm_compilable { } {
|
|
||||||
return [list .mm]
|
|
||||||
}
|
|
||||||
|
|
||||||
proc osutils:tkdefs { theUnits } {
|
|
||||||
set aTKDefines [list]
|
|
||||||
|
|
||||||
foreach anUnit $theUnits {
|
|
||||||
lappend aTKDefines "__${anUnit}_DLL"
|
|
||||||
}
|
|
||||||
|
|
||||||
return $aTKDefines
|
|
||||||
}
|
|
||||||
|
|
||||||
proc osutils:fileGroupName { theSrcFile } {
|
|
||||||
set path [file dirname [file normalize ${theSrcFile}]]
|
|
||||||
regsub -all [file normalize "${path}/.."] ${path} "" aGroupName
|
|
||||||
|
|
||||||
return $aGroupName
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
####### CODEBLOCK ###################################################################
|
####### CODEBLOCK ###################################################################
|
||||||
# Function to generate Code Blocks workspace and project files
|
# Function to generate Code Blocks workspace and project files
|
||||||
|
@ -1,157 +0,0 @@
|
|||||||
#------------------------------------------------------------------------
|
|
||||||
# Check for TCL
|
|
||||||
# Options: --with-tcl= : Specify location of tclConfig.sh
|
|
||||||
# --without-tcl= : Skip check for TCL, assume not installed
|
|
||||||
# Defines:
|
|
||||||
# HAVE_TCL : yes/no
|
|
||||||
# Everything from tclConfig.sh
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
AC_DEFUN([SC_TCL_CFG], [
|
|
||||||
AC_ARG_WITH(tcl,
|
|
||||||
AC_HELP_STRING([--with-tcl=PATH],[Directory containing tclConfig.sh])
|
|
||||||
AC_HELP_STRING([--without-tcl], [Assume no tcl libraries available]) ,
|
|
||||||
[with_tcl="${withval}";require_tcl=yes],[with_tcl=yes;require_tcl=no])
|
|
||||||
|
|
||||||
# If user requested disabling of tcl check
|
|
||||||
if test "xno" = "x$with_tcl"; then
|
|
||||||
HAVE_TCL=no
|
|
||||||
require_tcl=no
|
|
||||||
# Otherwise...
|
|
||||||
else
|
|
||||||
HAVE_TCL=no
|
|
||||||
# Search for tclConfig.sh
|
|
||||||
if test "xyes" != "x$with_tcl"; then
|
|
||||||
# If user specified location
|
|
||||||
. "${with_tcl}/tclConfig.sh" || AC_MSG_ERROR("Cannot read file: ${with_tcl}/tclConfig.sh")
|
|
||||||
HAVE_TCL=yes
|
|
||||||
else
|
|
||||||
# Search for tclConfig.sh in usual spots
|
|
||||||
tcl_cfg_file=
|
|
||||||
AC_MSG_CHECKING([for tclConfig.sh])
|
|
||||||
for i in /usr /usr/local ${prefix} /opt/sfw /usr/tcltk; do
|
|
||||||
if test -d $i; then
|
|
||||||
for j in $i/lib $i/lib/tcl $i/lib/tcl[[8-9]].[[0-9]] $i/lib/itcl; do
|
|
||||||
if test -r "$j/tclConfig.sh"; then
|
|
||||||
tcl_cfg_file="$j/tclConfig.sh"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if test "x" != "x$tcl_cfg_file"; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
AC_MSG_RESULT("$tcl_cfg_file")
|
|
||||||
|
|
||||||
if test "x" != "x$tcl_cfg_file"; then
|
|
||||||
. "$tcl_cfg_file" || AC_MSG_ERROR("Cannot read file: $tcl_cfg_file")
|
|
||||||
HAVE_TCL=yes
|
|
||||||
|
|
||||||
# if TCL_INCLUDE_SPEC wasn't defined, try to define it using TCL_INC_DIR
|
|
||||||
if test "x" = "x$TCL_INCLUDE_SPEC"; then
|
|
||||||
inc_path=`expr "x$TCL_INC_DIR" : "x\(.*\)/tcl-private/generic"`
|
|
||||||
if test "x" != "$inc_path"; then
|
|
||||||
TCL_INCLUDE_SPEC="-I$inc_path"
|
|
||||||
elif test "x" != "x$TCL_INC_DIR"; then
|
|
||||||
TCL_INCLUDE_SPEC="-I$TCL_INC_DIR"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
HAVE_TCL=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for tcl.h
|
|
||||||
AC_LANG_C
|
|
||||||
save_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
|
|
||||||
AC_CHECK_HEADER([tcl.h],[],[HAVE_TCL=no])
|
|
||||||
CPPFLAGS="$save_CPPFLAGS"
|
|
||||||
|
|
||||||
if test "xyes" = "x$require_tcl"; then
|
|
||||||
if test "xno" = "x$HAVE_TCL"; then
|
|
||||||
AC_MSG_ERROR([TCL not found.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
# Check for Tk
|
|
||||||
# Options: --with-tk= : Specify location of Tk
|
|
||||||
# --without-tk= : Skip check for Tk, assume not installed
|
|
||||||
# Defines:
|
|
||||||
# HAVE_TK : yes/no
|
|
||||||
# Everything from tkConfig.sh
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
AC_DEFUN([SC_TK_CFG], [
|
|
||||||
AC_ARG_WITH(tk,
|
|
||||||
AC_HELP_STRING([--with-tk=PATH],[Directory containing tkConfig.sh])
|
|
||||||
AC_HELP_STRING([--without-tk], [Assume no Tk libraries available]) ,
|
|
||||||
[with_tk="${withval}";require_tk=yes],[with_tk=yes;require_tk=no])
|
|
||||||
|
|
||||||
# If user requested disabling of Tk check
|
|
||||||
if test "xno" = "x$with_tk"; then
|
|
||||||
HAVE_TK=no
|
|
||||||
require_tk=no
|
|
||||||
# Otherwise...
|
|
||||||
else
|
|
||||||
HAVE_TK=no
|
|
||||||
# Search for tkConfig.sh
|
|
||||||
if test "xyes" != "x$with_tk"; then
|
|
||||||
# If user specified location
|
|
||||||
. "${with_tk}/tkConfig.sh" || AC_MSG_ERROR("Cannot read file: ${with_tk}/tkConfig.sh")
|
|
||||||
HAVE_TK=yes
|
|
||||||
else
|
|
||||||
# Search for tkConfig.sh in usual spots
|
|
||||||
tk_cfg_file=
|
|
||||||
AC_MSG_CHECKING([for tkConfig.sh])
|
|
||||||
for i in /usr /usr/local ${prefix} /opt/sfw /usr/tcltk; do
|
|
||||||
if test -d $i; then
|
|
||||||
for j in $i/lib $i/lib/tk $i/lib/tk[[8-9]].[[0-9]] $i/lib/itcl; do
|
|
||||||
if test -r "$j/tkConfig.sh"; then
|
|
||||||
tk_cfg_file="$j/tkConfig.sh"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if test "x" != "x$tk_cfg_file"; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
AC_MSG_RESULT("$tk_cfg_file")
|
|
||||||
|
|
||||||
if test "x" != "x$tk_cfg_file"; then
|
|
||||||
. "$tk_cfg_file" || AC_MSG_ERROR("Cannot read file: $tk_cfg_file")
|
|
||||||
HAVE_TK=yes
|
|
||||||
|
|
||||||
# if TK_INCLUDE_SPEC wasn't defined, try to define it using TK_INC_DIR
|
|
||||||
if test "x" = "x$TK_INCLUDE_SPEC"; then
|
|
||||||
inc_path=`expr "x$TK_INC_DIR" : "x\(.*\)/tk-private/generic"`
|
|
||||||
if test "x" != "$inc_path"; then
|
|
||||||
TK_INCLUDE_SPEC="-I$inc_path"
|
|
||||||
elif test "x" != "x$TK_INC_DIR"; then
|
|
||||||
TK_INCLUDE_SPEC="-I$TK_INC_DIR"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
HAVE_TK=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for tk.h
|
|
||||||
AC_LANG_C
|
|
||||||
HAVE_TK=yes
|
|
||||||
save_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC $TK_INCLUDE_SPEC"
|
|
||||||
AC_CHECK_HEADER([tk.h],[],[HAVE_TK=no])
|
|
||||||
CPPFLAGS="$save_CPPFLAGS"
|
|
||||||
|
|
||||||
if test "xyes" = "x$require_tk"; then
|
|
||||||
if test "xno" = "x$HAVE_TK"; then
|
|
||||||
AC_MSG_ERROR([Tk not found.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
])
|
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
|||||||
# Makefile.am for Open Cascade toolkit __TKNAM__
|
|
||||||
srcdir = @srcdir@
|
|
||||||
|
|
||||||
VPATH = @srcdir@ : \
|
|
||||||
__VPATH__
|
|
||||||
|
|
||||||
AM_CXXFLAGS = __CXXFLAG__
|
|
||||||
|
|
||||||
AM_CFLAGS = __CFLAG__
|
|
||||||
|
|
||||||
INCLUDES = $(CSF_OPT_INCLUDES) __EXTERNINC__ \
|
|
||||||
-I@top_srcdir@/inc \
|
|
||||||
__INCLUDES__
|
|
||||||
|
|
||||||
lib_LTLIBRARIES=lib__TKNAM__.la
|
|
||||||
|
|
||||||
lib__TKNAM___la_LIBADD = $(CSF_OPT_LIBS) \
|
|
||||||
__LIBADD__ \
|
|
||||||
__EXTERNLIB__
|
|
||||||
|
|
||||||
lib__TKNAM___la_SOURCES = \
|
|
||||||
__SOURCES__
|
|
@ -1,10 +0,0 @@
|
|||||||
# Makefile.am for executable __XQTNAM__
|
|
||||||
srcdir = @srcdir@
|
|
||||||
|
|
||||||
VPATH = @srcdir@ : \
|
|
||||||
@top_srcdir@/src/__XQTNAM__
|
|
||||||
|
|
||||||
INCLUDES = $(CSF_OPT_INCLUDES) __EXTERNINC__ \
|
|
||||||
-I@top_srcdir@/inc \
|
|
||||||
-I@top_srcdir@/src/__XQTNAM__
|
|
||||||
|
|
@ -33,7 +33,7 @@ source "${aScriptPath}/custom.sh"
|
|||||||
|
|
||||||
if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
|
if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
|
||||||
|
|
||||||
tclsh "${aScriptPath}/adm/genproj.tcl" -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
|
tclsh "${aScriptPath}/adm/start.tcl" genproj -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
|
||||||
|
|
||||||
export PATH="$anOldPath"
|
export PATH="$anOldPath"
|
||||||
export LD_LIBRARY_PATH="$anOldLd"
|
export LD_LIBRARY_PATH="$anOldLd"
|
||||||
|
@ -26,8 +26,6 @@ StdPrs_ToolPoint.hxx
|
|||||||
StdPrs_ToolRFace.cxx
|
StdPrs_ToolRFace.cxx
|
||||||
StdPrs_ToolRFace.hxx
|
StdPrs_ToolRFace.hxx
|
||||||
StdPrs_ToolTriangulatedShape.cxx
|
StdPrs_ToolTriangulatedShape.cxx
|
||||||
StdPrs_ToolTriangulatedShape.cxx
|
|
||||||
StdPrs_ToolTriangulatedShape.hxx
|
|
||||||
StdPrs_ToolTriangulatedShape.hxx
|
StdPrs_ToolTriangulatedShape.hxx
|
||||||
StdPrs_ToolVertex.cxx
|
StdPrs_ToolVertex.cxx
|
||||||
StdPrs_ToolVertex.hxx
|
StdPrs_ToolVertex.hxx
|
||||||
@ -40,7 +38,6 @@ StdPrs_WFDeflectionSurface.hxx
|
|||||||
StdPrs_WFPoleSurface.cxx
|
StdPrs_WFPoleSurface.cxx
|
||||||
StdPrs_WFPoleSurface.hxx
|
StdPrs_WFPoleSurface.hxx
|
||||||
StdPrs_WFRestrictedFace.cxx
|
StdPrs_WFRestrictedFace.cxx
|
||||||
StdPrs_WFRestrictedFace.cxx
|
|
||||||
StdPrs_WFRestrictedFace.hxx
|
StdPrs_WFRestrictedFace.hxx
|
||||||
StdPrs_WFShape.cxx
|
StdPrs_WFShape.cxx
|
||||||
StdPrs_WFShape.hxx
|
StdPrs_WFShape.hxx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user