1--
2-- tests/actions/make/workspace/test_project_rule.lua
3-- Validate generation of project rules in workspace makefile.
4-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
5--
6
7	local p = premake
8	local suite = test.declare("make_project_rule")
9
10
11--
12-- Setup/teardown
13--
14
15	local wks
16
17	function suite.setup()
18		wks = test.createWorkspace()
19	end
20
21	local function prepare()
22		p.oven.bake()
23		wks = test.getWorkspace(wks)
24		p.make.projectrules(wks)
25	end
26
27
28--
29-- Verify a simple project with no dependencies.
30--
31
32	function suite.projectRule_onNoDependencies()
33		prepare()
34		test.capture [[
35MyProject:
36ifneq (,$(MyProject_config))
37	@echo "==== Building MyProject ($(MyProject_config)) ===="
38	@${MAKE} --no-print-directory -C . -f MyProject.make config=$(MyProject_config)
39endif
40
41		]]
42	end
43