home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / oop / macapp3 / 598 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  4.2 KB

  1. Path: sparky!uunet!stanford.edu!ames!olivea!apple!applelink.apple.com
  2. From: GER.XSE0201@AppleLink.Apple.COM (Frank Becker Computertechnik,DE,IDV)
  3. Newsgroups: comp.sys.mac.oop.macapp3
  4. Subject: Re: MABuild -UserAutoBuild
  5. Message-ID: <727900779.1212031@AppleLink.Apple.COM>
  6. Date: 24 Jan 93 18:34:00 GMT
  7. Sender: daemon@Apple.COM
  8. Organization: AppleLink Gateway
  9. Lines: 119
  10.  
  11. Hi Andrew,
  12.  
  13. Here're some answers from a previous link I wrote last year to this topic:
  14.  
  15. -------------------------------------------------------------------------------
  16.  
  17. Paul,
  18. I did this by put some files in a separate folder and put all this stuff in a
  19. library (in my example I build a library called DBApplication).
  20.  
  21. Now you must set MAUserAutobuild when starting MacApp
  22.  
  23. (In my case:
  24.  
  25. SET MAUserAutoBuild "{DBLibraries}DBApplication.Lib,{OWNLibraries}Ownlib.Lib"
  26. EXPORT {MAUserAutoBuild}
  27.  
  28. )
  29.  
  30. and add a line for the dependencies in your Application.MAMake
  31.  
  32. (
  33. OtherLinkFiles = x
  34.    "{DBLibraries}{SeparateObjectsFolder}DBApplication.lib" x
  35. )
  36.  
  37. with the MaMake option -nouserautobuild you only build your application and not
  38. the Library. The option -userautobuild is the default.
  39.  
  40.  
  41. Hope this helps
  42.  
  43. Frank Becker
  44. -------------------------------------------------------------------------------
  45. Tsui,
  46.  
  47. Question:
  48.  
  49. >How does the Application.MAMake know to rebuild the lib when the
  50. -userautobuild option is used?
  51.  
  52. Answer:
  53. The -userautobuild option build all things that are defined in the
  54. MAUserAutoBuild variable
  55.  
  56. this example check first if the Ownlib is OK and then if DBApplication.lib
  57. (Ownlib is used in DBApplication)
  58.  
  59. I defined the MAUserAutoBuild variable in my 'StartupoFrank'.
  60.  
  61. SET MAUserAutoBuild "{DBLibraries}DBApplication.Lib,{OWNLibraries}Ownlib.Lib"
  62. EXPORT {MAUserAutoBuild}
  63.  
  64. Every MABuild look if there is something to rebuild in the things which are
  65. defined in the MAUserAutobuild because -userautobuild is the default. If you
  66. are sure, that nothing was changed in your library's use the -nouserautobuild
  67. option.
  68.  
  69. In your Application.MAMake file you must add your library to the dependency of
  70. the OtherLinkFiles.
  71.  
  72. example:
  73. OtherLinkFiles = x
  74.    "{DBLibraries}{SeparateObjectsFolder}DBApplication.lib" x
  75.  
  76. The variable DBLibraries is the path to the directory which include all sources
  77. for the library and the DBApplication.lib.MAMake file.
  78.  
  79.  
  80. I hope this helps, but if you have more questions feel free to ask me again.
  81.  
  82. best regards
  83. -------------------------------------------------------------------------------
  84. Hi Tsui,
  85.  
  86. >1)  How does the Application.MAMake knows that Ownlib is "OK"?
  87.  
  88. The Application.MAMake do not know if Ownlib is "OK" or not. MABuild does this
  89. for you. It work like the -autobuild option. This means call Make to check if
  90. everything is OK. (Look at the code of file MABuildTool.p line 1707 - 1724;
  91. this file is located in {MacApp}Tools:)
  92.  
  93. >2)  How does Application.MAMAke knows what source files compose Ownlib?
  94. >Similarly DAApplication.lib.
  95.  
  96. You must build a Ownlib.MAMake file which include this information.
  97.  
  98. >3) Do you some how force the Application.MAMAke to check Ownlib.lib.MAMake and
  99. >DBApplication.lib.MAMake when the -userautobuild option is included in the
  100. >MABuild for the Application?
  101.  
  102. No, a OtherApplication.MAMake check also the Ownlib and DBApplication.lib when
  103. you set the MAUserAutoBuild variable. Look at my answer for 1)
  104.  
  105.  
  106. >I already understand that you have to add the dependency for
  107. >DBApplication.lib,
  108. >but MABuild's default Dependency Rules does not support rebuilding of other
  109. >libraries other than MacApp.lib.
  110.  
  111. Hope I get you right!
  112. You know that you have to add the line
  113.         "{DBLibraries}{SeparateObjectsFolder}DBApplication.lib" x
  114. to the defination of OtherLinkFiles. This is all you need. If you want to have
  115. a other library then MacApp.lib to build automatically change the MAAutoBuild
  116. variable in the same way you did for the MAUserAutoBuild
  117.  
  118. example:
  119. SET MAAutoBuild "{MAAutoBuild},{OWNLibraries}Ownlib.Lib"
  120. EXPORT {MAAutoBuild}
  121. build first the Ownlib and then the things defind before in the variable.
  122.  
  123. I hope I now answered your question but if not feel free to ask me again.
  124.  
  125. Sincerely,
  126.  
  127. Frank
  128. -------------------------------------------------------------------------------
  129.  
  130.