home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / misc / src / rpm / docs / macros < prev    next >
Text File  |  1997-09-17  |  893b  |  42 lines

  1. SPEC FILE MACROS
  2. ================
  3.  
  4. RPM 2.3.9 introduces simple spec file macros.  The macros can do
  5. straight text substitution only.  Macros can be used anywhere in
  6. a spec file, and in "included file lists" (those read in using
  7. %files -f <file>).
  8.  
  9. Defining a Macro
  10. ----------------
  11.  
  12. To define a macro use:
  13.  
  14. %define <name> <expansion>
  15.  
  16. All whitespace surrounding <expansion> is removed.  Name may be composed
  17. of alphanumeric characters, and the character `_'.  Macro expansion is
  18. performed on <expansion> so that <expansion> my reference other macros
  19. that have already been defined.
  20.  
  21. Using a Macro
  22. -------------
  23.  
  24. To use a macro, write:
  25.  
  26. %<name>
  27.  
  28. or
  29.  
  30. %{<name>}
  31.  
  32. The later allows you to place the expansion adjacent to other text.
  33.  
  34. Predefined Macros
  35. -----------------
  36.  
  37. The following macros are defined as the values they reference are
  38. specified in the spec file:
  39.  
  40. PACKAGE_VERSION
  41. PACKAGE_RELEASE
  42.