diff options
| author | ruki <[email protected]> | 2016-06-21 21:48:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-06-22 10:26:10 +0800 |
| commit | 902fbe1ba80062b7f6c73f012827cd3d7ba4f3ae (patch) | |
| tree | c55a96abefaba86b208dd747461f1b650d8cb825 | |
| parent | 432fd6a40018f4c29e08f1d4cadf1ccc387a0cff (diff) | |
fix path bug
| -rwxr-xr-x | core/makefile | 6 | ||||
| -rw-r--r-- | core/pkg/tbox.pkg/inc/msvc/x86/tbox.config.h | 71 | ||||
| -rwxr-xr-x | core/src/xmake/xmake.c | 2 | ||||
| -rw-r--r-- | xmake/core/base/os.lua | 2 | ||||
| -rw-r--r-- | xmake/core/base/path.lua | 10 | ||||
| -rwxr-xr-x | xmake/plugins/lua/xmake.lua | 6 |
6 files changed, 55 insertions, 42 deletions
diff --git a/core/makefile b/core/makefile index 7a774c1ef..6ab634d6f 100755 --- a/core/makefile +++ b/core/makefile @@ -257,17 +257,17 @@ endef endif # config base -ifeq ($(HOST),mac) +ifeq ($(PLAT),mac) base_LIBPATH := /usr/local/lib base_LIBNAMES := m dl pthread endif -ifeq ($(HOST),msvc) +ifeq ($(PLAT),msvc) base_LIBPATH := base_LIBNAMES := ws2_32 endif -ifeq ($(HOST),linux) +ifeq ($(PLAT),linux) base_LIBPATH := base_LIBNAMES := rt m dl pthread endif diff --git a/core/pkg/tbox.pkg/inc/msvc/x86/tbox.config.h b/core/pkg/tbox.pkg/inc/msvc/x86/tbox.config.h index 6e28760de..7d8bcb8c1 100644 --- a/core/pkg/tbox.pkg/inc/msvc/x86/tbox.config.h +++ b/core/pkg/tbox.pkg/inc/msvc/x86/tbox.config.h @@ -6,55 +6,54 @@ #define TB_CONFIG_VERSION_MAJOR 1
#define TB_CONFIG_VERSION_MINOR 5
#define TB_CONFIG_VERSION_ALTER 1
-#define TB_CONFIG_VERSION_BUILD 201605192207
+#define TB_CONFIG_VERSION_BUILD 201606221012
// defines
#define TB_CONFIG_OS_WINDOWS 1
#define TB_CONFIG_SMALL 1
-#define TB_CONFIG_INFO_HAVE_VERSION 1
#define TB_CONFIG_TYPE_HAVE_FLOAT 1
-#define TB_CONFIG_MODULE_HAVE_THREAD 1
-#define TB_CONFIG_MODULE_HAVE_NETWORK 1
-#define TB_CONFIG_LIBC_HAVE_MEMCPY 1
-#define TB_CONFIG_LIBC_HAVE_MEMSET 1
#define TB_CONFIG_LIBC_HAVE_MEMMOVE 1
-#define TB_CONFIG_LIBC_HAVE_MEMCMP 1
-#define TB_CONFIG_LIBC_HAVE_STRCAT 1
-#define TB_CONFIG_LIBC_HAVE_STRNCAT 1
-#define TB_CONFIG_LIBC_HAVE_STRCPY 1
-#define TB_CONFIG_LIBC_HAVE_STRNCPY 1
-#define TB_CONFIG_LIBC_HAVE_STRLEN 1
-#define TB_CONFIG_LIBC_HAVE_STRNLEN 1
-#define TB_CONFIG_LIBC_HAVE_STRSTR 1
-#define TB_CONFIG_LIBC_HAVE_STRCMP 1
-#define TB_CONFIG_LIBC_HAVE_STRNCMP 1
-#define TB_CONFIG_LIBC_HAVE_WCSCAT 1
-#define TB_CONFIG_LIBC_HAVE_WCSNCAT 1
+#define TB_CONFIG_LIBC_HAVE_MKTIME 1
+#define TB_CONFIG_LIBM_HAVE_ACOS 1
#define TB_CONFIG_LIBC_HAVE_WCSCPY 1
-#define TB_CONFIG_LIBC_HAVE_WCSNCPY 1
+#define TB_CONFIG_LIBM_HAVE_SQRT 1
+#define TB_CONFIG_LIBC_HAVE_STRCMP 1
+#define TB_CONFIG_LIBM_HAVE_ATAN2 1
+#define TB_CONFIG_LIBC_HAVE_MEMSET 1
#define TB_CONFIG_LIBC_HAVE_WCSLEN 1
-#define TB_CONFIG_LIBC_HAVE_WCSNLEN 1
-#define TB_CONFIG_LIBC_HAVE_WCSSTR 1
-#define TB_CONFIG_LIBC_HAVE_WCSCMP 1
-#define TB_CONFIG_LIBC_HAVE_WCSNCMP 1
-#define TB_CONFIG_LIBC_HAVE_WCSTOMBS 1
-#define TB_CONFIG_LIBC_HAVE_MBSTOWCS 1
-#define TB_CONFIG_LIBC_HAVE_GMTIME 1
-#define TB_CONFIG_LIBC_HAVE_MKTIME 1
+#define TB_CONFIG_LIBC_HAVE_STRNCPY 1
#define TB_CONFIG_LIBC_HAVE_LOCALTIME 1
+#define TB_CONFIG_LIBC_HAVE_WCSNCAT 1
+#define TB_CONFIG_LIBC_HAVE_STRCPY 1
#define TB_CONFIG_LIBC_HAVE_SIGNAL 1
-#define TB_CONFIG_LIBC_HAVE_SETJMP 1
-#define TB_CONFIG_LIBM_HAVE_SQRT 1
-#define TB_CONFIG_LIBM_HAVE_ACOS 1
-#define TB_CONFIG_LIBM_HAVE_ASIN 1
+#define TB_CONFIG_LIBC_HAVE_STRSTR 1
+#define TB_CONFIG_LIBC_HAVE_WCSNCMP 1
+#define TB_CONFIG_LIBC_HAVE_MBSTOWCS 1
+#define TB_CONFIG_LIBC_HAVE_WCSSTR 1
+#define TB_CONFIG_LIBC_HAVE_WCSCAT 1
#define TB_CONFIG_LIBM_HAVE_POW 1
+#define TB_CONFIG_LIBC_HAVE_MEMCPY 1
+#define TB_CONFIG_LIBC_HAVE_WCSTOMBS 1
+#define TB_CONFIG_LIBC_HAVE_WCSNLEN 1
+#define TB_CONFIG_LIBC_HAVE_MEMCMP 1
+#define TB_CONFIG_LIBC_HAVE_STRNLEN 1
+#define TB_CONFIG_LIBM_HAVE_EXP 1
+#define TB_CONFIG_LIBM_HAVE_SIN 1
+#define TB_CONFIG_LIBM_HAVE_COS 1
+#define TB_CONFIG_LIBM_HAVE_ASIN 1
+#define TB_CONFIG_LIBM_HAVE_ATAN 1
+#define TB_CONFIG_LIBC_HAVE_STRNCAT 1
+#define TB_CONFIG_LIBC_HAVE_WCSNCPY 1
+#define TB_CONFIG_LIBC_HAVE_SETJMP 1
+#define TB_CONFIG_LIBC_HAVE_GMTIME 1
#define TB_CONFIG_LIBM_HAVE_FMOD 1
#define TB_CONFIG_LIBM_HAVE_TAN 1
-#define TB_CONFIG_LIBM_HAVE_ATAN 1
-#define TB_CONFIG_LIBM_HAVE_ATAN2 1
-#define TB_CONFIG_LIBM_HAVE_COS 1
-#define TB_CONFIG_LIBM_HAVE_SIN 1
-#define TB_CONFIG_LIBM_HAVE_EXP 1
+#define TB_CONFIG_LIBC_HAVE_STRCAT 1
+#define TB_CONFIG_LIBC_HAVE_STRLEN 1
+#define TB_CONFIG_MODULE_HAVE_NETWORK 1
+#define TB_CONFIG_MODULE_HAVE_THREAD 1
+#define TB_CONFIG_LIBC_HAVE_WCSCMP 1
+#define TB_CONFIG_LIBC_HAVE_STRNCMP 1
// undefines
#undef TB_CONFIG_TRACE_INFO_ONLY
diff --git a/core/src/xmake/xmake.c b/core/src/xmake/xmake.c index cdc96a520..41be44688 100755 --- a/core/src/xmake/xmake.c +++ b/core/src/xmake/xmake.c @@ -72,7 +72,7 @@ static __tb_inline__ tb_bool_t xm_check_mode(tb_size_t mode) static __tb_inline__ tb_bool_t xm_version_check(tb_hize_t build) { // the version oly for link the static vtag string - tb_version_t const* version = tb_version(); tb_used(version); + tb_version_t const* version = xm_version(); tb_used(version); // ok if ((build / 100) == (XM_VERSION_BUILD / 100)) diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 91dba1524..228219513 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -88,7 +88,7 @@ function os.match(pattern, findir) -- patch "./" for matching ok if root directory is '.' if rootdir == '.' then - pattern = "./" .. pattern + pattern = "." .. path.seperator() .. pattern end -- find it diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua index 0a9d6cf41..b1136702d 100644 --- a/xmake/core/base/path.lua +++ b/xmake/core/base/path.lua @@ -96,6 +96,16 @@ function path.split(p) return p:split("/\\") end +-- get the path seperator +function path.seperator() + + -- windows? + if xmake._HOST == "windows" then + return '\\' + else + return '/' + end +end -- return module: path return path diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua index 29eb91c0d..f54b774ba 100755 --- a/xmake/plugins/lua/xmake.lua +++ b/xmake/plugins/lua/xmake.lua @@ -49,7 +49,11 @@ task("lua") end -- import script - import("scripts." .. name).main(option.get("arguments")) + if os.isfile(name) then + import(path.basename(name), {rootdir = path.directory(name)}).main(option.get("arguments")) + else + import("scripts." .. name).main(option.get("arguments")) + end end) -- set menu |
