pmfile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. -- $Source$
  2. -- $State$
  3. local d = ROOTDIR.."util/ego/"
  4. local makecldef = cprogram {
  5. cfile (d.."share/makecldef.c")
  6. }
  7. local classdefs_h = simple {
  8. outputs = {"%U%/classdefs.h"},
  9. command = {
  10. "%in[1]% %in[2]% %in[3]% > %out[1]%"
  11. },
  12. makecldef,
  13. file ("%HEADERDIR%em_mnem.h"),
  14. file (d.."share/cldefs.src")
  15. }
  16. local pop_push_h = simple {
  17. outputs = {"%U%/pop_push.h"},
  18. command = {
  19. "awk -f %in[1]% < %in[2]% > %out%"
  20. },
  21. file (d.."share/pop_push.awk"),
  22. file ("%ROOTDIR%h/em_table")
  23. }
  24. local cfile_with_headers = cfile {
  25. class = "cfile_with_headers",
  26. dynamicheaders = {
  27. classdefs_h,
  28. pop_push_h
  29. }
  30. }
  31. local ego_core = cprogram {
  32. CINCLUDES = {PARENT, ("-I"..d.."share")},
  33. cfile_with_headers (d.."share/debug.c"),
  34. cfile_with_headers (d.."share/global.c"),
  35. cfile_with_headers (d.."share/files.c"),
  36. cfile_with_headers (d.."share/go.c"),
  37. cfile_with_headers (d.."share/map.c"),
  38. cfile_with_headers (d.."share/aux.c"),
  39. cfile_with_headers (d.."share/get.c"),
  40. cfile_with_headers (d.."share/put.c"),
  41. cfile_with_headers (d.."share/alloc.c"),
  42. cfile_with_headers (d.."share/lset.c"),
  43. cfile_with_headers (d.."share/cset.c"),
  44. cfile_with_headers (d.."share/parser.c"),
  45. cfile_with_headers (d.."share/stack_chg.c"),
  46. cfile_with_headers (d.."share/locals.c"),
  47. cfile_with_headers (d.."share/init_glob.c"),
  48. }
  49. tool_ego = group {
  50. CDEFINES = {PARENT, "VERBOSE", "NOTCOMPACT"},
  51. ego_core {
  52. cfile_with_headers (d.."bo/bo.c"),
  53. lib_em_data,
  54. install = pm.install("%BINDIR%%PLATDEP%/ego/bo")
  55. },
  56. ego_core {
  57. cfile_with_headers (d.."ca/ca.c"),
  58. cfile_with_headers (d.."ca/ca_put.c"),
  59. lib_em_data,
  60. install = pm.install("%BINDIR%%PLATDEP%/ego/ca")
  61. },
  62. ego_core {
  63. cfile_with_headers (d.."cf/cf.c"),
  64. cfile_with_headers (d.."cf/cf_idom.c"),
  65. cfile_with_headers (d.."cf/cf_loop.c"),
  66. cfile_with_headers (d.."cf/cf_succ.c"),
  67. lib_em_data,
  68. install = pm.install("%BINDIR%%PLATDEP%/ego/cf")
  69. },
  70. ego_core {
  71. cfile_with_headers (d.."cj/cj.c"),
  72. lib_em_data,
  73. install = pm.install("%BINDIR%%PLATDEP%/ego/cj")
  74. },
  75. ego_core {
  76. cfile_with_headers (d.."cs/cs.c"),
  77. cfile_with_headers (d.."cs/cs_alloc.c"),
  78. cfile_with_headers (d.."cs/cs_aux.c"),
  79. cfile_with_headers (d.."cs/cs_avail.c"),
  80. cfile_with_headers (d.."cs/cs_debug.c"),
  81. cfile_with_headers (d.."cs/cs_elim.c"),
  82. cfile_with_headers (d.."cs/cs_entity.c"),
  83. cfile_with_headers (d.."cs/cs_getent.c"),
  84. cfile_with_headers (d.."cs/cs_kill.c"),
  85. cfile_with_headers (d.."cs/cs_partit.c"),
  86. cfile_with_headers (d.."cs/cs_profit.c"),
  87. cfile_with_headers (d.."cs/cs_stack.c"),
  88. cfile_with_headers (d.."cs/cs_vnm.c"),
  89. lib_em_data,
  90. install = pm.install("%BINDIR%%PLATDEP%/ego/cs")
  91. },
  92. ego_core {
  93. cfile_with_headers (d.."ic/ic.c"),
  94. cfile_with_headers (d.."ic/ic_aux.c"),
  95. cfile_with_headers (d.."ic/ic_io.c"),
  96. cfile_with_headers (d.."ic/ic_lib.c"),
  97. cfile_with_headers (d.."ic/ic_lookup.c"),
  98. lib_em_data,
  99. install = pm.install("%BINDIR%%PLATDEP%/ego/ic")
  100. },
  101. ego_core {
  102. cfile_with_headers (d.."il/il.c"),
  103. cfile_with_headers (d.."il/il1_anal.c"),
  104. cfile_with_headers (d.."il/il1_aux.c"),
  105. cfile_with_headers (d.."il/il1_cal.c"),
  106. cfile_with_headers (d.."il/il1_formal.c"),
  107. cfile_with_headers (d.."il/il2_aux.c"),
  108. cfile_with_headers (d.."il/il3_aux.c"),
  109. cfile_with_headers (d.."il/il3_change.c"),
  110. cfile_with_headers (d.."il/il3_subst.c"),
  111. cfile_with_headers (d.."il/il_aux.c"),
  112. lib_em_data,
  113. install = pm.install("%BINDIR%%PLATDEP%/ego/il")
  114. },
  115. ego_core {
  116. cfile_with_headers (d.."lv/lv.c"),
  117. lib_em_data,
  118. install = pm.install("%BINDIR%%PLATDEP%/ego/lv")
  119. },
  120. ego_core {
  121. cfile_with_headers (d.."ra/ra.c"),
  122. cfile_with_headers (d.."ra/ra_allocl.c"),
  123. cfile_with_headers (d.."ra/ra_aux.c"),
  124. cfile_with_headers (d.."ra/ra_interv.c"),
  125. cfile_with_headers (d.."ra/ra_lifet.c"),
  126. cfile_with_headers (d.."ra/ra_pack.c"),
  127. cfile_with_headers (d.."ra/ra_profits.c"),
  128. cfile_with_headers (d.."ra/ra_xform.c"),
  129. cfile {
  130. file (d.."ra/ra_items.c"),
  131. dynamicheaders = {
  132. simple {
  133. outputs = {"%U%/itemtab.h"},
  134. command = {
  135. "%in[1]% %in[2]% %in[3]% > %out[1]%"
  136. },
  137. cprogram {
  138. cfile (d.."ra/makeitems.c"),
  139. },
  140. file (HEADERDIR.."em_mnem.h"),
  141. file (d.."ra/itemtab.src")
  142. }
  143. }
  144. },
  145. lib_em_data,
  146. install = pm.install("%BINDIR%%PLATDEP%/ego/ra")
  147. },
  148. ego_core {
  149. cfile_with_headers (d.."sp/sp.c"),
  150. lib_em_data,
  151. install = pm.install("%BINDIR%%PLATDEP%/ego/sp")
  152. },
  153. ego_core {
  154. cfile_with_headers (d.."sr/sr.c"),
  155. cfile_with_headers (d.."sr/sr_aux.c"),
  156. cfile_with_headers (d.."sr/sr_cand.c"),
  157. cfile_with_headers (d.."sr/sr_expr.c"),
  158. cfile_with_headers (d.."sr/sr_iv.c"),
  159. cfile_with_headers (d.."sr/sr_reduce.c"),
  160. cfile_with_headers (d.."sr/sr_xform.c"),
  161. lib_em_data,
  162. install = pm.install("%BINDIR%%PLATDEP%/ego/sr")
  163. },
  164. ego_core {
  165. cfile_with_headers (d.."ud/ud.c"),
  166. cfile_with_headers (d.."ud/ud_aux.c"),
  167. cfile_with_headers (d.."ud/ud_const.c"),
  168. cfile_with_headers (d.."ud/ud_copy.c"),
  169. cfile_with_headers (d.."ud/ud_defs.c"),
  170. lib_em_data,
  171. install = pm.install("%BINDIR%%PLATDEP%/ego/ud")
  172. },
  173. cprogram {
  174. cfile (d.."em_ego/em_ego.c"),
  175. lib_print,
  176. lib_string,
  177. lib_system,
  178. install = pm.install("%BINDIR%%PLATDEP%/em_ego")
  179. }
  180. }
  181. -- This rule is used by the machine description pmfiles to massage and install
  182. -- the ego descr files.
  183. ego_descr = simple {
  184. outputs = {"%U%-%I%"},
  185. command = {
  186. "%BINDIR%%PLATDEP%/cpp -P -I%HEADERDIR% %in[1]% | sed -f %in[2]% > %out[1]%"
  187. },
  188. file (d.."descr/%ARCH%.descr"),
  189. file (d.."descr/descr.sed"),
  190. install = pm.install("%BINDIR%%PLATDEP%/ego/%ARCH%descr")
  191. }
  192. -- Revision history
  193. -- $Log$
  194. -- Revision 1.4 2007-02-25 12:49:20 dtrg
  195. -- em_table is now in /h, not /etc.
  196. --
  197. -- Revision 1.3 2006/10/15 00:28:12 dtrg
  198. -- Updated to the version 0.1 of Prime Mover (which involves some syntax changes).
  199. --
  200. -- Revision 1.2 2006/07/23 17:52:23 dtrg
  201. -- cpp now gets installed in the right place.
  202. --
  203. -- Revision 1.1 2006/07/22 00:52:01 dtrg
  204. -- Added support for the ego global optimisation suite.