home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Apple Shared Library Manager / ASLM Developer Tools / Tools / BuildSharedLibrary next >
Encoding:
Text File  |  1996-11-19  |  1.0 KB  |  53 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        BuildSharedLibrary
  3. #
  4. #    Contains:    Script to make a shared library
  5. #
  6. #    Copyright:    © 1992-1994 by Apple Computer, Inc., all rights reserved.
  7. #
  8. #
  9.  
  10. if "{TempFolder}" !~ //
  11.     set tempdir "{TempFolder}"
  12. else if "{CPlusScratch}" !~ //
  13.     set tempdir "{CPlusScratch}"
  14. else
  15.     set tempdir "`directory`"
  16. end
  17. Set BatchFile "{tempdir}SharedLibTemp.bat"
  18.  
  19. Set deleteBatchFile 1
  20. Set PPC            0
  21.  
  22. for currParam in {"Parameters"}
  23.     If "{currParam}" =~ /-preservetemps/
  24.         Set deleteBatchFile 0
  25.     Else If "{currParam}" =~ /-powerpc/
  26.         Set PPC 1
  27.     Else If "{currParam}" =~ /-68k/
  28.         Set PPC 0
  29.     Else If "{prevParam}" =~ /-lib/
  30.         Set OutLibFileName "{currParam}"
  31.     Else If "{prevParam}" =~ /-obj/
  32.         Set BatchFile "{currParam}.bat"
  33.     End
  34.     Set prevParam "{currParam}"
  35. End
  36.  
  37. If {PPC}
  38.     Set BuildTool "∂"{SLMTools}∂"LibraryBuilderPPC"
  39. Else
  40.     Set BuildTool "∂"{SLMTools}∂"LibraryBuilder"
  41. End
  42.  
  43. set savedStatus 0
  44. {BuildTool} -script "{BatchFile}" {"Parameters"} || set savedStatus {status}
  45. If {savedStatus} == 0
  46.     "{BatchFile}"
  47. End
  48.  
  49. If {deleteBatchFile} == 1
  50.     delete -i "{BatchFile}"
  51. End
  52.  
  53. exit {savedStatus}