~ubuntu-branches/ubuntu/maverick/ncbi-tools6/maverick

« back to all changes in this revision

Viewing changes to make/updatelibs.met

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- update C libs --
0
 
-
1
 
- Properties
2
 
-
 
 
b'property pProjectFileExtension : ".mcp"'
3
 
-
4
 
- Global variables
5
 
-
 
 
b'global gStartupDisk'
 
 
b'global gHomeDir'
 
 
b'global gMWroot'
 
 
b'global gDistribRoot'
 
 
b'global gProjectsDir'
 
 
b'global gLibsDir'
 
 
b'global gProjectData'
 
 
b'on ResolveAlias(pathname)'
 
 
b'\ttell application "Finder"'
 
 
b'\t\t--if the last character of pathname is ":" then error "Don\'t use a trailing colon with ResolveAlias."'
 
 
b'\t\tif exists folder pathname then return pathname & ":"'
 
 
b'\t\tif exists alias file pathname then return the original item of alias file pathname as string'
 
 
b'\t\terror "The folder (or alias) \'" & pathname & "\' doesn\'t exist."'
 
 
b'\tend tell'
 
 
b'end ResolveAlias'
 
 
b'on IsOSX()'
 
 
b'\ttell application "Finder"'
 
 
b'\t\t'
 
 
b'\t\tset vers to the version as text'
 
 
b'\t\t'
 
 
b'\t\tif second character of vers is equal to "." then'
 
 
b'\t\t\tset vers to "0" & vers'
 
 
b'\t\tend if'
 
 
b'\t\t'
 
 
b'\t\treturn vers > 10 or vers = 10'
 
 
b'\t\t'
 
 
b'\tend tell'
 
 
b'end IsOSX'
 
 
b'on HomeDir()'
 
 
b'\ttell application "Finder"'
 
 
b'\t\t'
 
 
b'\t\tif my IsOSX() then'
 
 
b'\t\t\t-- return the home as string'
 
 
b'\t\t\tset hm to home as string'
 
 
b'\t\t\tset wd to words of hm'
 
 
b'\t\t\tset rs to rest of wd'
 
 
b'\t\t\tset text item delimiters of AppleScript to ":"'
 
 
b'\t\t\tset nw to (rs as string) & ":"'
 
 
b'\t\t\tset text item delimiters of AppleScript to ""'
 
 
b'\t\t\treturn nw'
 
 
b'\t\telse'
 
 
b'\t\t\treturn gStartupDisk'
 
 
b'\t\tend if'
 
 
b'\t\t'
 
 
b'\tend tell'
 
 
b'end HomeDir'
 
 
b'on CToolkitRoot()'
 
 
b'\t'
 
 
b'\ttry'
 
 
b'\t\tset modRoot to ResolveAlias(gMWroot & "ncbi")'
 
 
b'\ton error'
 
 
b'\t\ttry'
 
 
b'\t\t\tset modRoot to ResolveAlias(gStartupDisk & gHomeDir & "ncbi")'
 
 
b'\t\tend try'
 
 
b'\tend try'
 
 
b'\t'
 
 
b'\treturn modRoot'
 
 
b'\t'
 
 
b'end CToolkitRoot'
 
 
b'on ModuleRoot()'
 
 
b'\t'
 
 
b'\treturn CToolkitRoot()'
 
 
b'\t'
 
 
b'end ModuleRoot'
 
 
b'on MWRootDir()'
 
 
b'\t'
 
 
b'\tset mwRoot to ""'
 
 
b'\tset mwLocations to {gStartupDisk, gStartupDisk & "Applications:", gStartupDisk & "Applications (Mac OS 9):", \xc2'
 
 
b'\t\tgStartupDisk & gHomeDir, gStartupDisk & gHomeDir & "Applications:", gStartupDisk & gHomeDir & "Applications (Mac OS 9):"}'
 
 
b'\trepeat with mwVersion from 8 to 9'
 
 
b'\t\tset dirName to "Metrowerks CodeWarrior " & mwVersion & ".0"'
 
 
b'\t\trepeat with mwLoc in mwLocations'
 
 
b'\t\t\ttry'
 
 
b'\t\t\t\tset mwRoot to ResolveAlias(mwLoc & dirName)'
 
 
b'\t\t\t\treturn mwRoot'
 
 
b'\t\t\tend try'
 
 
b'\t\tend repeat'
 
 
b'\tend repeat'
 
 
b'\t'
 
 
b'\terror "Can\'t find the Metrowerks CodeWarrior folder."'
 
 
b'\t'
 
 
b'end MWRootDir'
 
 
b'on SetGlobals()'
 
 
b'\ttell application "Finder"'
 
 
b'\t\t'
 
 
b'\t\tset gProjectData to {}'
 
 
b'\t\t'
 
 
b'\t\tset gStartupDisk to startup disk as string'
 
 
b'\t\tset gHomeDir to my HomeDir()'
 
 
b'\t\tset gMWroot to my MWRootDir()'
 
 
b'\t\t'
 
 
b'\t\tset gDistribRoot to my ModuleRoot()'
 
 
b'\t\t'
 
 
b'\t\tset gLibsDir to gDistribRoot & "lib:"'
 
 
b'\t\t'
 
 
b'\t\tset gProjectsDir to gLibsDir'
 
 
b'\t\t'
 
 
b'\tend tell'
 
 
b'end SetGlobals'
 
 
b'on BuildLibraries(proj)'
 
 
b'\ttell application "CodeWarrior IDE"'
 
 
b'\t\topen (gProjectsDir & proj & pProjectFileExtension)'
 
 
b'\t\trepeat with i from 2 to (count targets of project document 1)'
 
 
b'\t\t\tset the current target of project document 1 to target i of project document 1'
 
 
b'\t\t\tMake Project'
 
 
b'\t\t\t-- If there were compiler warnings, then a compiler window will be in front.'
 
 
b'\t\t\t-- For whatever reason, this causes the next "set the current target..." to fail.'
 
 
b"\t\t\t-- An easy way to make the window go away without having to know if it's there or not "
 
 
b'\t\t\t-- is to build again, which, because everything is already compiled, finishes instantly'
 
 
b'\t\t\t-- and produces no warnings.'
 
 
b'\t\t\t--Make Project'
 
 
b'\t\t\t-- An even better way is to check for the window and close it.'
 
 
b'\t\t\tif the name of window 1 is "Errors & Warnings" then'
 
 
b'\t\t\t\tclose first window -- "close window 1" becomes "Close Window 1" (different event)'
 
 
b'\t\t\tend if'
 
 
b'\t\tend repeat'
 
 
b'\t\tset the current target of project document 1 to target 1 of project document 1'
 
 
b'\t\tClose Project'
 
 
b'\tend tell'
 
 
b'end BuildLibraries'
 
 
b'on BuildAllLibraries()'
 
 
b'\tset myLibs to {"mitsock", "ncbi", "ncbiconn", "ncbiobj", "ncbicdr", "vibrant", \xc2'
 
 
b'\t\t"ncbidesk", "ddvlib", "ncbitool", "ncbimmdb", "ncbiNacc", \xc2'
 
 
b'\t\t"netentr", "netcli", "ncbibls3", "ncbiid1", "ncbimla", "ncbitxc2", "vibnet"}'
 
 
b'\t'
 
 
b'\trepeat with proj in myLibs'
 
 
b'\t\tBuildLibraries(proj)'
 
 
b'\tend repeat'
 
 
b'end BuildAllLibraries'
 
 
b'(* ==== This section builds the libraries ==== *)'
 
 
b'with timeout of 60000 seconds'
 
 
b'\tSetGlobals()'
 
 
b'\t'
 
 
b'\ttell application "CodeWarrior IDE" to activate'
 
 
b'\t'
 
 
b'\tBuildAllLibraries()'
 
 
b'\t'
 
 
b'\tbeep'
 
 
b'\t'
 
 
b'end timeout'
 
 
b'\\ No newline at end of file'