cde.rules 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /*
  2. * @OSF_COPYRIGHT@
  3. * COPYRIGHT NOTICE
  4. * Copyright (c) 1990, 1991, 1992, 1993, 1998 The Open Group , Inc.
  5. * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
  6. * the full copyright text.
  7. *
  8. * (c) Copyright 1996 Digital Equipment Corporation.
  9. * (c) Copyright 1996 Hewlett-Packard Company.
  10. * (c) Copyright 1996 International Business Machines Corp.
  11. * (c) Copyright 1996 Sun Microsystems, Inc.
  12. * (c) Copyright 1996 Novell, Inc.
  13. * (c) Copyright 1996 FUJITSU LIMITED.
  14. * (c) Copyright 1996 Hitachi.
  15. */
  16. XCOMM $TOG: cde.rules /main/4 1998/02/06 10:53:52 kaleb $
  17. /* Note whether we are the top level project. */
  18. #ifndef SeenTopLevelProject
  19. # define SeenTopLevelProject YES
  20. # define CDEIsTopLevelProject YES
  21. #else
  22. # define CDEIsTopLevelProject NO
  23. #endif
  24. /* Include the Motif project rules file. */
  25. #include <Motif.rules>
  26. /* Use the in-tree CDE by default. */
  27. #ifndef UseInstalledCDE
  28. # define UseInstalledCDE NO
  29. #endif
  30. #ifdef UseInstalled
  31. # undef UseInstalledCDE
  32. # define UseInstalledCDE YES
  33. #endif
  34. #ifndef ImportCDE
  35. # ifdef UseImports
  36. # define ImportCDE YES
  37. # else
  38. # define ImportCDE NO
  39. # endif
  40. #endif
  41. #if UseInstalledCDE
  42. # undef ImportCDE
  43. # define ImportCDE NO
  44. #endif
  45. /* If CDE has a different ProjectRoot we need to search the regular ones too. */
  46. #ifdef CDEProjectRoot
  47. # define CUsrLibDirPath Concat(MUsrLibDirPath,:$(CDEPROJECTROOT)/lib)
  48. #else
  49. # define CUsrLibDirPath MUsrLibDirPath
  50. #endif
  51. #ifdef UsrLibDirPath
  52. # undef UsrLibDirPath
  53. #endif
  54. #define UsrLibDirPath CUsrLibDirPath
  55. #if ImportCDE
  56. # define CLdPreLibs -L$(CDELIBSRC)
  57. #elif defined(UseInstalledCDE) && defined(CDEProjectRoot)
  58. # define CLdPreLibs -L$(CDEPROJECTROOT)/lib
  59. #else
  60. # define CLdPreLibs /**/
  61. #endif
  62. #ifdef LdPreLibs
  63. # undef LdPreLibs
  64. #endif
  65. #define LdPreLibs LdPreLib CLdPreLibs MLdPreLibs XLdPreLibs
  66. #ifdef CDEProjectRoot
  67. # define CLdPostLibs -L$(CDEPROJECTROOT)/lib
  68. #else
  69. # define CLdPostLibs /**/
  70. #endif
  71. #ifdef LdPostLibs
  72. # undef LdPostLibs
  73. #endif
  74. #define LdPostLibs LdPostLib CLdPostLibs MLdPostLibs XLdPostLibs
  75. #ifdef TopIncludes
  76. # undef TopIncludes
  77. #endif
  78. #define TopIncludes TopInclude $(TOP_CDE_INCLUDES) $(TOP_MOTIF_INCLUDES) $(TOP_X_INCLUDES)
  79. #if UseInstalledCDE && defined(CDEProjectRoot)
  80. # define CDEBuildLibPath $(CDEPROJECTROOT)/lib
  81. #elif UseInstalledCDE
  82. # define CDEBuildLibPath $(USRLIBDIR)
  83. #elif ImportCDE
  84. # define CDEBuildLibPath $(CDELIBSRC)
  85. #else
  86. # define CDEBuildLibPath $(TOP)/exports/lib
  87. #endif
  88. #ifdef BuildLibPath
  89. # undef BuildLibPath
  90. #endif
  91. #ifdef SystemBuildLibPath
  92. # define BuildLibPath \
  93. $(DTENVLIBDIR):$(MOTIFENVLIBDIR):$(XENVLIBDIR):$(SYSTEMENVLIBDIR)
  94. #else
  95. # define BuildLibPath $(DTENVLIBDIR):$(MOTIFENVLIBDIR):$(XENVLIBDIR)
  96. #endif
  97. #ifndef CdeInstallationTop
  98. # define CdeInstallationTop /usr/dt
  99. #endif
  100. #ifndef CdeConfigurationTop
  101. # define CdeConfigurationTop /etc/dt
  102. #endif
  103. #ifndef CdeLogFilesTop
  104. # define CdeLogFilesTop /var/dt
  105. #endif
  106. #ifndef CdeUserTop
  107. # define CdeUserTop .dt
  108. #endif
  109. #ifndef CdeProjectDefines
  110. # define CdeProjectDefines \
  111. -DANSICPP -DMULTIBYTE -DNLS16 \
  112. -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
  113. #endif
  114. #ifdef ProjectDefines
  115. # undef ProjectDefines
  116. #endif
  117. #define ProjectDefines X11ProjectDefines MotifProjectDefines CdeProjectDefines
  118. #ifndef CdeCplusplusProjectDefines
  119. # define CdeCplusplusProjectDefines CdeProjectDefines
  120. #endif
  121. #ifdef CplusplusProjectDefines
  122. # undef CplusplusProjectDefines
  123. #endif
  124. #define CplusplusProjectDefines \
  125. X11CplusplusProjectDefines MotifCplusplusProjectDefines CdeCplusplusProjectDefines
  126. /*
  127. * Doc build rules
  128. */
  129. /*
  130. * MakeSdlVolume - generate rules to create an SDL volume, in the specified
  131. * directory, from an SGML source doc.
  132. * Note: the volume name must match the directory name.
  133. */
  134. #ifndef MakeSdlVolume
  135. #define MakeSdlVolume(vol,dir,env,opts,dep) @@\
  136. all:: dir/vol.sdl @@\
  137. @@\
  138. dir/vol.sdl: dep @@\
  139. MakeDir(dir) @@\
  140. env $(DTDOCBOOK) $(DTDOCBOOKOPTIONS) opts -o dir/vol.sdl vol/book.sgm @@\
  141. @@\
  142. clean:: @@\
  143. $(RM) dir/vol.sdl vol/book.log
  144. #endif
  145. /*
  146. * MakeTocFile - generate rules to create an SGML TOC file.
  147. * Note: the volume name must match the directory name.
  148. */
  149. #ifndef MakeTocFile
  150. #define MakeTocFile(vol,env,opts,ttle,ident,dep) @@\
  151. all:: vol/TOC.sgm @@\
  152. @@\
  153. vol/TOC.sgm: dep @@\
  154. MakeDir($(DTINFOGENTMPDIR)) @@\
  155. env $(DTINFOGEN) tocgen -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -f vol/TOC.sgm -id ident -title ttle vol/book.sgm @@\
  156. @@\
  157. clean:: @@\
  158. $(RM) vol/TOC.sgm
  159. #endif
  160. #ifndef MakeTocFile3
  161. #define MakeTocFile3(vol,env,opts,ttle,ident,dep1,dep2,dep3) @@\
  162. all:: vol/TOC.sgm @@\
  163. @@\
  164. vol/TOC.sgm: dep1 @@\
  165. vol/TOC.sgm: dep2 @@\
  166. vol/TOC.sgm: dep3 @@\
  167. MakeDir($(DTINFOGENTMPDIR)) @@\
  168. env $(DTINFOGEN) tocgen -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -f vol/TOC.sgm -id ident -title ttle vol/book.sgm @@\
  169. @@\
  170. clean:: @@\
  171. $(RM) vol/TOC.sgm
  172. #endif
  173. /*
  174. * TocFileDep - generate TOC file dependency rule
  175. */
  176. #ifndef TocFileDep
  177. #define TocFileDep(vol,dep) @@\
  178. vol/TOC.sgm: dep
  179. #endif
  180. /*
  181. * MakeInfolib - generate rules to create an infolib.
  182. */
  183. #ifndef MakeInfolib
  184. #define MakeInfolib(infolib,bkcase,env,opts,dep) @@\
  185. all:: infolib/bkcase/dtsearch/dtsearch.ocf @@\
  186. @@\
  187. infolib/bkcase/dtsearch/dtsearch.ocf: dep @@\
  188. MakeDir($(DTINFOGENTMPDIR)) @@\
  189. MakeDir(infolib) @@\
  190. env $(DTINFOGEN) build -v -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -l infolib bookcase.bc
  191. #endif
  192. /*
  193. * InfolibDep - generate infolib dependency rule - Highly depending on MMDB!
  194. */
  195. #ifndef InfolibDep
  196. #define InfolibDep(infolib,bkcase,dep) @@\
  197. infolib/bkcase/dtsearch/dtsearch.ocf: dep
  198. #endif
  199. #ifndef InfolibDep3
  200. #define InfolibDep3(infolib,bkcase,dep1,dep2,dep3) @@\
  201. infolib/bkcase/dtsearch/dtsearch.ocf: dep1 @@\
  202. infolib/bkcase/dtsearch/dtsearch.ocf: dep2 @@\
  203. infolib/bkcase/dtsearch/dtsearch.ocf: dep3
  204. #endif