pmfile 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. -- $Source$
  2. -- $State$
  3. local d = ROOTDIR.."util/topgen/"
  4. local lpars = LLgen {
  5. file (d.."topgen.g")
  6. }
  7. local cfile_with_headers = cfile {
  8. class = "cfile_with_headers",
  9. dynamicheaders = {
  10. file (d),
  11. lpars
  12. }
  13. }
  14. tool_topgen = cprogram {
  15. cfile_with_headers (d.."LLlex.c"),
  16. cfile_with_headers (d.."hash.c"),
  17. cfile_with_headers (d.."main.c"),
  18. cfile_with_headers (d.."pattern.c"),
  19. cfile_with_headers (d.."symtab.c"),
  20. foreach {
  21. rule = cfile_with_headers,
  22. ith { lpars, from=2 }
  23. },
  24. lib_assert,
  25. lib_print,
  26. lib_alloc,
  27. lib_system,
  28. lib_string,
  29. outputs = {"%U%/topgen"},
  30. install = pm.install("%TOOLDIR%topgen")
  31. }
  32. topgen = simple {
  33. class = "topgen",
  34. outputs = {"%U%/gen.c"},
  35. command = {
  36. "mkdir -p %out[1]:dirname%",
  37. "cd %out[1]:dirname% && %TOOLDIR%topgen %in[1]%"
  38. },
  39. }
  40. -- Revision history
  41. -- $Log$
  42. -- Revision 1.1 2006-07-22 12:31:19 dtrg
  43. -- Added support for the top target peephole optimiser.
  44. --
  45. -- Revision 1.1 2006/07/20 23:24:28 dtrg
  46. -- First version in CVS.