d.lua 846 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --
  2. -- d/d.lua
  3. -- Define the D makefile action(s).
  4. -- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project
  5. --
  6. local p = premake
  7. p.modules.d = {}
  8. local m = p.modules.d
  9. m._VERSION = p._VERSION
  10. m.elements = {}
  11. local api = p.api
  12. --
  13. -- Patch the project table to provide knowledge of D projects
  14. --
  15. function p.project.isd(prj)
  16. return prj.language == p.D
  17. end
  18. --
  19. -- Patch the path table to provide knowledge of D file extenstions
  20. --
  21. function path.isdfile(fname)
  22. return path.hasextension(fname, { ".d" })
  23. end
  24. function path.isdheader(fname)
  25. return path.hasextension(fname, { ".di" })
  26. end
  27. --
  28. -- Patch actions
  29. --
  30. include( "tools/dmd.lua" )
  31. include( "tools/gdc.lua" )
  32. include( "tools/ldc.lua" )
  33. include( "actions/gmake.lua" )
  34. include( "actions/vcxproj.lua" )
  35. include( "actions/visuald.lua" )
  36. return m