2016-11-09 19:29:33 +00:00
|
|
|
--
|
|
|
|
-- d/d.lua
|
|
|
|
-- Define the D makefile action(s).
|
|
|
|
-- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
local p = premake
|
|
|
|
|
|
|
|
p.modules.d = {}
|
|
|
|
|
|
|
|
local m = p.modules.d
|
|
|
|
|
|
|
|
m._VERSION = p._VERSION
|
|
|
|
m.elements = {}
|
|
|
|
|
|
|
|
local api = p.api
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Patch the project table to provide knowledge of D projects
|
|
|
|
--
|
|
|
|
function p.project.isd(prj)
|
2017-04-25 05:44:13 +00:00
|
|
|
return prj.language == p.D
|
2016-11-09 19:29:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Patch the path table to provide knowledge of D file extenstions
|
|
|
|
--
|
|
|
|
function path.isdfile(fname)
|
2018-04-19 20:42:13 +00:00
|
|
|
return path.hasextension(fname, { ".d" })
|
|
|
|
end
|
|
|
|
|
|
|
|
function path.isdheader(fname)
|
|
|
|
return path.hasextension(fname, { ".di" })
|
2016-11-09 19:29:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Patch actions
|
|
|
|
--
|
|
|
|
include( "tools/dmd.lua" )
|
|
|
|
include( "tools/gdc.lua" )
|
|
|
|
include( "tools/ldc.lua" )
|
|
|
|
|
|
|
|
include( "actions/gmake.lua" )
|
2018-04-19 20:42:13 +00:00
|
|
|
include( "actions/vcxproj.lua" )
|
|
|
|
include( "actions/visuald.lua" )
|
2016-11-09 19:29:33 +00:00
|
|
|
|
|
|
|
return m
|