summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-11-07 09:15:11 +0800
committerruki <[email protected]>2016-11-07 09:15:11 +0800
commitc2f463a161a717fb71ee12281e6715dfcff276e2 (patch)
tree913be770ad0b04dac2735e87f3b59b1c17d24414
parent093cad888c4f66571ec4d7845b9810ae51db5054 (diff)
avoid to generate unnecessary .xmake directory
-rw-r--r--CHANGELOG.md2
-rwxr-xr-xxmake/actions/clean/main.lua5
-rwxr-xr-xxmake/actions/config/main.lua5
-rw-r--r--xmake/core/main.lua6
4 files changed, 10 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 758788b06..e95c1ffb4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
### Bugs fixed
* [#41](https://github.com/waruqi/xmake/issues/41): Fix checker bug for windows
+* [#43](https://github.com/waruqi/xmake/issues/43): Avoid to generate unnecessary .xmake directory
* Add c++ stl search directories for android
## v2.0.5
@@ -173,6 +174,7 @@
### Bugs�޸�
* [#41](https://github.com/waruqi/xmake/issues/41): �޸���windows���Զ����x64ʧ������
+* [#43](https://github.com/waruqi/xmake/issues/43): ���ⴴ������Ҫ��.xmake���̻���Ŀ¼
* ���android�汾����c++ stl����Ŀ¼���������c++ʧ������
## v2.0.5
diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua
index 8acfa6df9..45e473ca5 100755
--- a/xmake/actions/clean/main.lua
+++ b/xmake/actions/clean/main.lua
@@ -152,11 +152,6 @@ end
-- main
function main()
- -- check xmake.lua
- if not os.isfile(project.file()) then
- raise("xmake.lua not found!")
- end
-
-- get the target name
local targetname = option.get("target")
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua
index 2d3e1701f..d9495318a 100755
--- a/xmake/actions/config/main.lua
+++ b/xmake/actions/config/main.lua
@@ -135,6 +135,11 @@ function main()
-- check xmake.lua
if not os.isfile(project.file()) then
+
+ -- remove config directory if exists because the current directory is not a project
+ os.rm(config.directory(), true)
+
+ -- error
raise("xmake.lua not found!")
end
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index ee336b118..ffd2b123e 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -113,14 +113,14 @@ function main.done()
return -1
end
- -- save command lines to history
- history.save("cmdlines", option.cmdline())
-
-- run help?
if main._help() then
return 0
end
+ -- save command lines to history
+ history.save("cmdlines", option.cmdline())
+
-- run task
local ok, errors = task.run(option.taskname() or "build")
if not ok then