diff options
| author | TitanSnow <[email protected]> | 2017-05-13 09:16:01 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-05-13 09:16:01 +0800 |
| commit | c57aa4cf4463f33d3deaf8d58e42abbbd83b0e1b (patch) | |
| tree | 38bcc556283371f6230e94b391c9e0ad2e8c7f5d /xmake/plugins/project/makefile/makefile.lua | |
| parent | c85d3d058f04018db42a3753dd25adededecd071 (diff) | |
all -> default, new all -> build all
Diffstat (limited to 'xmake/plugins/project/makefile/makefile.lua')
| -rw-r--r-- | xmake/plugins/project/makefile/makefile.lua | 15 |
1 files changed, 10 insertions, 5 deletions
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 |
