1
0
Fork 0

Improve windows compatibility...remove shell scripts..use cmake logic (#2940)

This commit is contained in:
m0ppers 2017-08-04 13:28:51 +02:00 committed by Frank Celler
parent fa9246c9f9
commit 963bc0e443
4 changed files with 7 additions and 35 deletions

View File

@ -871,7 +871,9 @@ if (USE_MAINTAINER_MODE)
foreach (m IN LISTS ERROR_FILES)
add_custom_command(
OUTPUT ${CMAKE_SOURCE_DIR}/${m}
COMMAND ./utils/generateErrorfile.sh ./${ERRORS_DAT} ./${m}
COMMAND ${PYTHON_EXECUTABLE} ./utils/generateErrorfile.py ./${ERRORS_DAT} ./${m}.tmp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ./${m}.tmp ./${m}
COMMAND ${CMAKE_COMMAND} -E remove ./${m}.tmp
DEPENDS ${CMAKE_SOURCE_DIR}/${ERRORS_DAT}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Building errors files ${m}"
@ -900,7 +902,9 @@ if (USE_MAINTAINER_MODE)
foreach (m IN LISTS MIMETYPES_FILES)
add_custom_command(
OUTPUT ${CMAKE_SOURCE_DIR}/${m}
COMMAND ./utils/generateMimetypes.sh ./${MIMETYPES_DAT} ./${m}
COMMAND ${PYTHON_EXECUTABLE} ./utils/generateMimetypes.py ./${MIMETYPES_DAT} ./${m}.tmp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ./${m}.tmp ./${m}
COMMAND ${CMAKE_COMMAND} -E remove ./${m}.tmp
DEPENDS ${CMAKE_SOURCE_DIR}/${MIMETYPES_DAT}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Building mimetypes files ${m}"

View File

@ -11,7 +11,7 @@ add_custom_target(examples
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
# manual pages
if (USE_MAINTAINER_MODE)
if (USE_MAINTAINER_MODE AND NOT(MSVC))
set(MAN_NAMES
man1/arangobench.1
man1/arangodump.1

View File

@ -1,16 +0,0 @@
#!/bin/bash
SOURCE="$1"
DEST="$2"
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE:-python}
SCRIPT="`dirname $0`/generateErrorfile.py"
${PYTHON_EXECUTABLE} "$SCRIPT" "$SOURCE" "$DEST.tmp"
if cmp -s $DEST ${DEST}.tmp; then
rm ${DEST}.tmp
else
mv ${DEST}.tmp $DEST
fi

View File

@ -1,16 +0,0 @@
#!/bin/bash
SOURCE="$1"
DEST="$2"
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE:-python}
SCRIPT="`dirname $0`/generateMimetypes.py"
${PYTHON_EXECUTABLE} "$SCRIPT" "$SOURCE" "$DEST.tmp"
if cmp -s $DEST ${DEST}.tmp; then
rm ${DEST}.tmp
else
mv ${DEST}.tmp $DEST
fi