pmfile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. -- $Source$
  2. -- $State$
  3. local d = ROOTDIR.."util/opt/"
  4. local cfile_with_headers = cfile {
  5. class = "cfile_with_headers",
  6. dynamicheaders = {
  7. file (d),
  8. }
  9. }
  10. local local_tool_opt = cprogram {
  11. class = "opt_rule",
  12. cfile_with_headers (d.."main.c"),
  13. cfile_with_headers (d.."getline.c"),
  14. cfile_with_headers (d.."lookup.c"),
  15. cfile_with_headers (d.."var.c"),
  16. cfile_with_headers (d.."process.c"),
  17. cfile_with_headers (d.."backward.c"),
  18. cfile_with_headers (d.."util.c"),
  19. cfile_with_headers (d.."alloc.c"),
  20. cfile_with_headers (d.."putline.c"),
  21. cfile_with_headers (d.."cleanup.c"),
  22. cfile_with_headers (d.."peephole.c"),
  23. cfile_with_headers (d.."flow.c"),
  24. cfile_with_headers (d.."tes.c"),
  25. cfile_with_headers (d.."reg.c"),
  26. cfile_with_headers {
  27. simple {
  28. outputs = {"%U%-pop_push.c"},
  29. command = {
  30. "awk -f %in[1]% < %in[2]% > %out%"
  31. },
  32. file (d.."pop_push.awk"),
  33. file ("%ROOTDIR%h/em_table")
  34. }
  35. },
  36. cfile_with_headers {
  37. simple {
  38. outputs = {"%U%-pattern.c"},
  39. command = {
  40. "%in[1]% < %in[2]% > %out%"
  41. },
  42. install = pm.install("pattern.c"),
  43. cprogram {
  44. CLIBRARIES = {PARENT, "fl"},
  45. cfile {
  46. yacc {
  47. file (d.."mktab.y")
  48. },
  49. dynamicheaders = {
  50. file (d),
  51. flex {
  52. file (d.."scan.l")
  53. }
  54. },
  55. },
  56. lib_em_data,
  57. },
  58. preprocess {
  59. file (d.."patterns")
  60. }
  61. }
  62. },
  63. lib_em_data,
  64. lib_assert,
  65. lib_print,
  66. lib_alloc,
  67. lib_system,
  68. lib_string,
  69. outputs = {"%U%/em_opt"},
  70. }
  71. tool_opt = group {
  72. group {
  73. local_tool_opt,
  74. install = pm.install(BINDIR.."lib.bin/em_opt")
  75. },
  76. group {
  77. CDEFINES = {PARENT, "GLOBAL_OPT"},
  78. local_tool_opt,
  79. install = pm.install(BINDIR.."lib.bin/em_opt2")
  80. },
  81. }
  82. -- Revision history
  83. -- $Log$
  84. -- Revision 1.5 2007-02-25 12:51:21 dtrg
  85. -- em_table is now in /h, not /etc.
  86. --
  87. -- Revision 1.4 2007/02/20 00:27:01 dtrg
  88. -- Fixed a compilation error that was causing opt to not have its
  89. -- peephole optimisation tables, which would make it generate
  90. -- duff code.
  91. --
  92. -- Revision 1.3 2006/10/15 00:28:12 dtrg
  93. -- Updated to the version 0.1 of Prime Mover (which involves some syntax changes).
  94. --
  95. -- Revision 1.2 2006/07/20 23:10:07 dtrg
  96. -- Fixed revision history.
  97. --