home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 21.ddi / SRCPOOL.PAK / SRCPOOL.TXT < prev   
Encoding:
Text File  |  1993-12-02  |  2.9 KB  |  68 lines

  1.  
  2. This project demonstrates the use of a simple source pool target and 
  3. 'reference copying' within the the project. 
  4.  
  5. Source pools are abstract container objects that hold dependencies. 
  6. There are not buildable and runnable by themselves. However, when moved, 
  7. copied or (most useful:) reference copied to under 'real' targets, they 
  8. take on the options and target attributes of the context they are in. 
  9. When the project make facility is checking dependencies or building 
  10. response table for linkers and librarians, the SourcePool becomes 
  11. invisible and the node is seen from the target as a direct dependency.
  12.  
  13. Reference copying allows one node (and all of it's dependencies) to be 
  14. referenced in many different places in the project's dependency tree. 
  15. In this example we reference copy a SourcePool node to under two
  16. executables (a 16bit target and a 32bit target, both called whello.exe).
  17. This allows you to modify the contents of the SourcePool, adding or 
  18. deleting nodes or changing the names of node or their 
  19. node-types, and having the change automatically update all of the 
  20. references to the SourcePool.
  21.  
  22. NOTE: The example here assumes that you've looked at the example in the 
  23. 'MultiTrg' directory and are familiar with how to create several 
  24. targets within the project and set local options on the target nodes.
  25.  
  26. Here are steps that were taken to create this project:
  27. 1) Select Project|New Target from the main menu
  28. 2) Typing "My whello source" in 'Target name'
  29. 3) Selecting 'SourcePool' from the 'Target type' list
  30. 4) Hitting 'Ok'
  31.  
  32. This creates a node called 'Source Pool'.
  33. 5) Selecting that node in the Project Window
  34. 6) Hitting the Insert key to bring up the 'Add Item' dialog
  35. 7) Selecting whello.cpp, whello.rc and whello.def
  36. 8) Hitting 'Ok'
  37.  
  38. This creates three dependencies under the SourcePool node.
  39.  
  40. Now create the two targets the same way as in the MultiTrg directory's
  41. example and delete the .cpp, .rc. and .def nodes from under both targets
  42. by selecting all of them (Ctrl-LeftButton will select additively) and
  43. hitting the Delete key. (Don't forget to modify the Intermediate and
  44. Final output fields of the two whello.exe's.)
  45.  
  46. While holding down the Alt key, drag the SourcePool under the first
  47. whello [.exe] node and release the mouse. Do the same for second whello
  48. [.exe] node.
  49.  
  50. More notes on SourcePools
  51. --------------------------
  52. More advanced uses of SourcePools include nesting them, which allows
  53. you to logically group source files without changing there location on
  54. disk. All nested SourcePools are 'flattened' during target dependency
  55. checking and creation time.
  56.  
  57. More notes on Reference Copies
  58. -------------------------------
  59. Setting options on a reference copied node *does not* affect options of 
  60. any other reference copy of original of the node. To see this in 
  61. effect, see the example in the 'StyleSht' directory.
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.