pmfile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. -- $Source$
  2. -- $State$
  3. --
  4. -- $Id$
  5. --
  6. -- This is the build file used to compile LLgen. It should be run through
  7. -- Prime Mover (copy supplied). See the READ_ME file for more information.
  8. include "c.pm"
  9. -- Where is LLgen going to be installed eventually? (Needs trailing slash.)
  10. PREFIX = PREFIX or "/usr/local/"
  11. -- Where's LLgen's staging area? (Don't change. Needs trailing slash.)
  12. INSTALLPATH = "bin/"
  13. LLgen = cprogram {
  14. CEXTRAFLAGS = '-DLIBDIR=\\"'..PREFIX..'share/LLgen\\" -DNON_CORRECTING',
  15. -- This line is needed to work around an OSX bug --- Apple's hacked gcc's
  16. -- preprocessor doesn't find LLgen.c's include files properly. Don't know
  17. -- why.
  18. CINCLUDES = {PARENT, "-Isrc"},
  19. cfile "src/main.c",
  20. cfile "src/gencode.c",
  21. cfile "src/compute.c",
  22. cfile "src/check.c",
  23. cfile "src/reach.c",
  24. cfile "src/global.c",
  25. cfile "src/name.c",
  26. cfile "src/sets.c",
  27. cfile "src/alloc.c",
  28. cfile "src/machdep.c",
  29. cfile "src/cclass.c",
  30. cfile "src/savegram.c",
  31. -- These use pre-LLgen'd version of the files. If LLgen.g gets updated,
  32. -- they need rebuilding. Use the bootstrap script to do this.
  33. cfile "src/LLgen.c",
  34. cfile "src/Lpars.c",
  35. cfile "src/tokens.c",
  36. outputs = {"%U%/LLgen"},
  37. install = pm.install( INSTALLPATH.."bin/LLgen")
  38. }
  39. library = group {
  40. install = {
  41. pm.install("lib/rec", INSTALLPATH.."share/LLgen/rec"),
  42. pm.install("lib/incl", INSTALLPATH.."share/LLgen/incl"),
  43. pm.install("lib/nc_incl", INSTALLPATH.."share/LLgen/nc_incl"),
  44. pm.install("lib/nc_rec", INSTALLPATH.."share/LLgen/nc_rec"),
  45. }
  46. }
  47. manpage = group {
  48. install = {
  49. pm.install("doc/LLgen.1", INSTALLPATH.."man/man1/LLgen.1"),
  50. }
  51. }
  52. documentation = group {
  53. simple {
  54. outputs = {"%U%-%I%.ps.gz"},
  55. command = "refer -sA+T -p %in[1]% %in[2]% | groff -Tps -e -t -ms "..
  56. "| gzip -c9 > %out[1]%",
  57. file "doc/LLgen.refs",
  58. file "doc/LLgen.n",
  59. install = {
  60. pm.install(INSTALLPATH.."share/doc/LLgen/LLgen.ps.gz")
  61. }
  62. },
  63. simple {
  64. outputs = {"%U%-%I%.ps.gz"},
  65. command = "groff -Tps -e -t -p -ms %in% | gzip -c9 > %out[1]%",
  66. file "doc/LLgen_NCER.n",
  67. install = {
  68. pm.install(INSTALLPATH.."share/doc/LLgen/NCER.ps.gz")
  69. }
  70. },
  71. }
  72. -- Default rule: builds everything into the staging area, but does nothing
  73. -- else.
  74. default = group {
  75. LLgen, -- build LLgen itself
  76. library, -- copy over the library
  77. manpage, -- copy over the man page
  78. documentation, -- build the two white papers
  79. }
  80. -- This rule will build everything, and then install it to its final location.
  81. install = group {
  82. default,
  83. install = {
  84. "mkdir -p %PREFIX%",
  85. "(cd bin && tar chvf - $(find . ! -type d)) | (cd %PREFIX% && tar xUf -)"
  86. }
  87. }
  88. -- Revision history
  89. -- $Log$
  90. -- Revision 1.5 2006-07-25 23:29:12 dtrg
  91. -- Modified to not try to unlink directories when installing.
  92. --
  93. -- Revision 1.4 2006/07/25 23:22:58 dtrg
  94. -- Updated to the latest version of pm which installs files with symlinks.
  95. --
  96. -- Revision 1.3 2006/07/23 20:33:26 dtrg
  97. -- Added a workaround for an OSX compiler bug.
  98. --
  99. -- Revision 1.2 2006/07/21 11:15:14 dtrg
  100. -- Updated to the latest version of pm.
  101. --