summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-16 11:17:39 +0800
committerruki <[email protected]>2017-05-16 11:17:46 +0800
commita7c6ffab557760c2c2adf69e4f646c678f4e3034 (patch)
tree6a6fff0cda763851d9afc55abd72c60dccaa1d9c
parent76845e083b940445042896a87ebb482edcac8a36 (diff)
add find file and path stub modules
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_file.lua39
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_library.lua39
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_path.lua39
-rw-r--r--xmake/modules/lib/detect/find_ccache.lua10
4 files changed, 125 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_file.lua b/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
new file mode 100644
index 000000000..ca873ee71
--- /dev/null
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
@@ -0,0 +1,39 @@
+--!The Make-like Build Utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file find_file.lua
+--
+
+-- define module
+local sandbox_lib_detect_find_file = sandbox_lib_detect_find_file or {}
+
+-- load modules
+local raise = require("sandbox/modules/raise")
+
+-- find file
+function sandbox_lib_detect_find_file.main(...)
+
+ -- TODO
+ print("find file")
+end
+
+-- return module
+return sandbox_lib_detect_find_file
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_library.lua b/xmake/core/sandbox/modules/import/lib/detect/find_library.lua
new file mode 100644
index 000000000..e48f75ebe
--- /dev/null
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_library.lua
@@ -0,0 +1,39 @@
+--!The Make-like Build Utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file find_library.lua
+--
+
+-- define module
+local sandbox_lib_detect_find_library = sandbox_lib_detect_find_library or {}
+
+-- load modules
+local raise = require("sandbox/modules/raise")
+
+-- find file
+function sandbox_lib_detect_find_library.main(...)
+
+ -- TODO
+ print("find file")
+end
+
+-- return module
+return sandbox_lib_detect_find_library
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_path.lua b/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
new file mode 100644
index 000000000..fe2b4993d
--- /dev/null
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
@@ -0,0 +1,39 @@
+--!The Make-like Build Utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file find_path.lua
+--
+
+-- define module
+local sandbox_lib_detect_find_path = sandbox_lib_detect_find_path or {}
+
+-- load modules
+local raise = require("sandbox/modules/raise")
+
+-- find file
+function sandbox_lib_detect_find_path.main(...)
+
+ -- TODO
+ print("find path")
+end
+
+-- return module
+return sandbox_lib_detect_find_path
diff --git a/xmake/modules/lib/detect/find_ccache.lua b/xmake/modules/lib/detect/find_ccache.lua
index 09364a5e5..66338da2a 100644
--- a/xmake/modules/lib/detect/find_ccache.lua
+++ b/xmake/modules/lib/detect/find_ccache.lua
@@ -22,12 +22,18 @@
-- @file find_ccache.lua
--
+-- imports
+import("lib.detect.find_file")
+
-- find ccache
--
--- @param ... detected dirs or files
+-- @param ... detected dirs, files, regs
--
--- @return shellname, fullpath
+-- @return {shellname = ... , fullpath = ...} or nil
--
function main(...)
+
+ -- TODO
print("ccache")
+ find_file()
end