From c57aa4cf4463f33d3deaf8d58e42abbbd83b0e1b Mon Sep 17 00:00:00 2001 From: TitanSnow Date: Sat, 13 May 2017 09:16:01 +0800 Subject: all -> default, new all -> build all --- xmake/plugins/project/makefile/makefile.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'xmake/plugins/project/makefile/makefile.lua') diff --git a/xmake/plugins/project/makefile/makefile.lua b/xmake/plugins/project/makefile/makefile.lua index 202dfa63a..860c67bd7 100644 --- a/xmake/plugins/project/makefile/makefile.lua +++ b/xmake/plugins/project/makefile/makefile.lua @@ -349,15 +349,20 @@ function _make_all(makefile) makefile:print("") -- make all - local all = "" + local default = "" for targetname, target in pairs(project.targets()) do - local default = target:get("default") - if default == nil or default == true then - all = all .. " " .. targetname + local isdefault = target:get("default") + if isdefault == nil or isdefault == true then + default = default .. " " .. targetname end end + makefile:print("default: %s\n", default) + local all = "" + for targetname, _ in pairs(project.targets()) do + all = all .. " " .. targetname + end makefile:print("all: %s\n", all) - makefile:print(".PHONY: all %s\n", all) + makefile:print(".PHONY: default all %s\n", all) -- make it for all targets for _, target in pairs(project.targets()) do -- cgit v1.3.1