This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/modules/gmake/tests/workspace/test_project_rule.lua
2017-06-19 12:15:13 -07:00

43 lines
795 B
Lua

--
-- tests/actions/make/workspace/test_project_rule.lua
-- Validate generation of project rules in workspace makefile.
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("make_project_rule")
--
-- Setup/teardown
--
local wks
function suite.setup()
wks = test.createWorkspace()
end
local function prepare()
p.oven.bake()
wks = test.getWorkspace(wks)
p.make.projectrules(wks)
end
--
-- Verify a simple project with no dependencies.
--
function suite.projectRule_onNoDependencies()
prepare()
test.capture [[
MyProject:
ifneq (,$(MyProject_config))
@echo "==== Building MyProject ($(MyProject_config)) ===="
@${MAKE} --no-print-directory -C . -f MyProject.make config=$(MyProject_config)
endif
]]
end