mirror of https://gitee.com/bigwinds/arangodb
fixed concatenate files
This commit is contained in:
parent
83d49223d5
commit
9b49d60b0a
|
@ -96,7 +96,7 @@ if (MSVC)
|
|||
|
||||
set(MSVC_LIBS crypt32.lib;WINMM.LIB;Ws2_32.lib;getopt;regex)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE /LTCG")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE /LTCG /SAFESEH:NO")
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
|
@ -530,13 +530,15 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/Documentation/man/
|
|||
|
||||
if (MSVC)
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/README
|
||||
DESTINATION .)
|
||||
DESTINATION .
|
||||
RENAME README.txt)
|
||||
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/README.md
|
||||
DESTINATION .)
|
||||
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/README.windows
|
||||
DESTINATION .)
|
||||
DESTINATION .
|
||||
RENAME README.windows.txt)
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
|
@ -545,7 +547,8 @@ endif ()
|
|||
|
||||
if (MSVC)
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/LICENSE
|
||||
DESTINATION .)
|
||||
DESTINATION .
|
||||
RENAME LICENSE.txt)
|
||||
endif ()
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
|
@ -671,5 +674,5 @@ include(CPack)
|
|||
|
||||
## Local Variables:
|
||||
## mode: outline-minor
|
||||
## outline-regexp: "### @brief\\|## --SECTION--\\|## -\\*- "
|
||||
## outline-regexp: "### @brief\\|## --SECTION--\\|# -\\*- "
|
||||
## End:
|
||||
|
|
43
GNUmakefile
43
GNUmakefile
|
@ -1,11 +1,19 @@
|
|||
# -*- mode: Makefile; -*-
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- COMMON VARIABLES
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
-include Makefile
|
||||
|
||||
VERSION_MAJOR := $(wordlist 1,1,$(subst ., ,$(VERSION)))
|
||||
VERSION_MINOR := $(wordlist 2,2,$(subst ., ,$(VERSION)))
|
||||
VERSION_PATCH := $(wordlist 3,3,$(subst ., ,$(VERSION)))
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- SPECIAL TARGETS
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
-include Makefile
|
||||
|
||||
################################################################################
|
||||
### @brief setup
|
||||
################################################################################
|
||||
|
@ -216,6 +224,37 @@ pack-arm-cmake:
|
|||
cd Build && cpack \
|
||||
-G DEB
|
||||
|
||||
################################################################################
|
||||
### @brief Windows 64-bit bundle
|
||||
################################################################################
|
||||
|
||||
.PHONY: pack-win32 pack-winXX pack-winXX-cmake
|
||||
|
||||
pack-win32:
|
||||
$(MAKE) pack-winXX BITS=32 TARGET="Visual Studio 12"
|
||||
|
||||
pack-win64:
|
||||
$(MAKE) pack-winXX BITS=64 TARGET="Visual Studio 12 Win64"
|
||||
|
||||
pack-winXX:
|
||||
rm -rf Build$(BITS) && mkdir Build$(BITS)
|
||||
|
||||
${MAKE} pack-winXX-cmake BITS="$(BITS)" TARGET="$(TARGET)"
|
||||
|
||||
pack-winXX-cmake:
|
||||
cd Build$(BITS) && cmake \
|
||||
-G "$(TARGET)" \
|
||||
-D "USE_MRUBY=OFF" \
|
||||
-D "ARANGODB_VERSION=${VERSION}" \
|
||||
-D "CPACK_PACKAGE_VERSION_MAJOR=${VERSION_MAJOR}" \
|
||||
-D "CPACK_PACKAGE_VERSION_MINOR=${VERSION_MINOR}" \
|
||||
-D "CPACK_PACKAGE_VERSION_PATCH=${VERSION_PATCH}" \
|
||||
..
|
||||
|
||||
cd Build$(BITS) && cmake --build . --config Release
|
||||
|
||||
cd Build$(BITS) && cpack -G NSIS
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- END-OF-FILE
|
||||
## -----------------------------------------------------------------------------
|
||||
|
|
|
@ -8,9 +8,6 @@ comma := ,
|
|||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
MAJOR_MINOR := $(subst $(space),.,$(wordlist 1,2,$(subst ., ,$(VERSION))))
|
||||
VERSION_MAJOR := $(wordlist 1,1,$(subst ., ,$(VERSION)))
|
||||
VERSION_MINOR := $(wordlist 2,2,$(subst ., ,$(VERSION)))
|
||||
VERSION_PATCH := $(wordlist 3,3,$(subst ., ,$(VERSION)))
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- FILES
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
----------------------------------------------------------------------------------------
|
||||
-- Full documentation is available online at: --
|
||||
-- http://www.arangodb.org/manuals/windows --
|
||||
-- http://www.arangodb.org/start/windows --
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -669,7 +669,26 @@ char* TRI_Basename (char const* path) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
char* TRI_Concatenate2File (char const* path, char const* name) {
|
||||
return TRI_Concatenate3String(path, TRI_DIR_SEPARATOR_STR, name);
|
||||
size_t len = strlen(path);
|
||||
char* result;
|
||||
|
||||
if (0 < len) {
|
||||
if (path[len - 1] == '/' || path[len - 1] == TRI_DIR_SEPARATOR_CHAR) {
|
||||
result = TRI_DuplicateString2(path, len - 1);
|
||||
}
|
||||
else {
|
||||
result = TRI_DuplicateString2(path, len);
|
||||
}
|
||||
|
||||
TRI_AppendString(&result, TRI_DIR_SEPARATOR_STR);
|
||||
}
|
||||
else {
|
||||
result = TRI_DuplicateString("");
|
||||
}
|
||||
|
||||
TRI_AppendString(&result, name);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -677,7 +696,15 @@ char* TRI_Concatenate2File (char const* path, char const* name) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
char* TRI_Concatenate3File (char const* path1, char const* path2, char const* name) {
|
||||
return TRI_Concatenate5String(path1, TRI_DIR_SEPARATOR_STR, path2, TRI_DIR_SEPARATOR_STR, name);
|
||||
char* tmp;
|
||||
char* result;
|
||||
|
||||
tmp = TRI_Concatenate2File(path1, path2);
|
||||
result = TRI_Concatenate2File(tmp, name);
|
||||
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, tmp);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <regex.h>
|
||||
|
||||
#include "BasicsC/conversions.h"
|
||||
#include "BasicsC/files.h"
|
||||
#include "BasicsC/logging.h"
|
||||
#include "BasicsC/string-buffer.h"
|
||||
#include "BasicsC/tri-strings.h"
|
||||
|
|
Loading…
Reference in New Issue