home *** CD-ROM | disk | FTP | other *** search
- # ---------------------------------------------------------------------------
- #
- # Copyright (c) 1995,1996 by Cayenne Software, Inc.
- #
- # This software is furnished under a license and may be used only in
- # accordance with the terms of such license and with the inclusion of
- # the above copyright notice. This software or any other copies thereof
- # may not be provided or otherwise made available to any other person.
- # No title to and ownership of the software is hereby transferred.
- #
- # The information in this software is subject to change without notice
- # and should not be construed as a commitment by Cayenne Software, Inc.
- #
- # ---------------------------------------------------------------------------
- #
- # File : @(#)machdep.tcl /main/titanic/6
- # Author :
- # Original date : September 1995
- # History :
- # See also :
- # Description : tcl file which contains machine dependent scripts
- #
- # ---------------------------------------------------------------------------
- #
- # @(#)machdep.tcl /main/titanic/6 3 Sep 1997 Copyright 1995,1996 Cayenne Software, Inc.
- #
-
- require wmt_util.tcl
-
- #
- # osIdentification returns the same as the result of "uname -rs", e.g.
- # system name and release number
- #
-
- proc osIdentification {} {
- return "WIN"
- }
-
- #
- # get value for UNIX environment variable
- #
- proc get_from_env {env_var} {
-
- return [get env($env_var)]
- }
-
- #
- # get search path separator character
- #
- proc searchPathSeparator {} {
- return \;
- }
-
- #
- # extract example files from tar file
- #
-
- proc tarFile {exampleTar} {
-
- switch -glob $exampleTar {
- *.Z {set cat zcat}
- *.z {set cat "gunzip -c"}
- *.gz {set cat "gunzip -c"}
- default {set cat zcat}
- }
- set unzip [get_from_env UNZIP]
- if { $unzip != "" } {
- set cat $unzip
- }
- catch { eval exec $cat $exampleTar | tar xof - }
- }
-
- #
- # clear screen
- #
- proc cls {} {
- if {[file exists /usr/ucb/clear]} {
- system "/usr/ucb/clear"
- } else {
- system "tput clear"
- }
- }
-
- #
- # show file
- #
- proc show { showFile } {
- system "more < $showFile"
- }
-
- #
- # create directory
- #
- proc createDir { dirName } {
- catch {exec mkdir $dirName}
- }
-
- #
- # return the command used for ranlib
- #
- proc processLibrary { libs } {
- return ""
- }
-
- #
- # return directory containing include files for X
- #
- proc XIncludeDir {} {
- if [file isdirectory /usr/openwin/include] {
- return /usr/openwin/include
- } else {
- return /usr/include/X11
- }
- }
-
- #
- # find target depent libraries
- #
- proc dbmsLinkLibrary {} {
- case [getModuleNameByType PersistentCpp] in {
- pers-cpp-inf {return [informixLinkLibrary]}
- pers-cpp-ing {return [ingresLinkLibrary]}
- pers-cpp-ora {return [oracleLinkLibrary]}
- pers-cpp-syb {return [sybaseLinkLibrary]}
- }
-
- return ""
- }
-
- proc informixLinkLibrary {} {
- set libDir [location \$(INFORMIXDIR) lib]
-
- return "[path_name concat $libDir isqli501.lib] \\
- [path_name concat $libDir mmcsqlw.lib]"
- }
-
- proc ingresLinkLibrary {} {
- set platform_libs {$$II_SYSTEM/ingres/lib/libingres.a}
- set abflnk [open $env(II_SYSTEM)/ingres/files/abflnk.opt]
- while { [gets $abflnk line] != -1 } {
- if { ! [string match *II_SYSTEM* $line ]} {
- append platform_libs " \\
- $line"
- }
- }
- return $platform_libs
- }
-
- proc oracleLinkLibrary {} {
- set libDir [location \$(ORACLE_HOME) pro22 lib]
-
- return "[path_name concat $libDir sqllib18.lib] \\
- [path_name concat $libDir sqxlib18.lib]"
- }
-
- proc sybaseLinkLibrary {} {
- set libDir [location \$(SYBASE) lib]
-
- # taken from %SYBASE%\sample\esqlc\makefile
- # libcmt and kernel32 are part of MS Visual C++
- return "[path_name concat $libDir libct.lib] \\
- [path_name concat $libDir libcs.lib] \\
- [path_name concat $libDir libcomn.lib] \\
- /NODEFAULTLIB:libc libcmt.lib kernel32.lib"
- }
-