You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
216 lines
7.3 KiB
216 lines
7.3 KiB
Customize and repackage as a TDE package.
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -1,6 +1,6 @@
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
-project(uncrustify)
|
|
+project(uncrustify-trinity)
|
|
|
|
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
|
|
message(FATAL_ERROR "
|
|
@@ -239,7 +239,7 @@
|
|
#
|
|
# Uncrustify
|
|
#
|
|
-set(uncrustify_sources
|
|
+set(uncrustify-trinity_sources
|
|
src/align_add.cpp
|
|
src/align_asm_colon.cpp
|
|
src/align_assign.cpp
|
|
@@ -333,7 +333,7 @@
|
|
${PROJECT_BINARY_DIR}/src/option_enum.cpp
|
|
)
|
|
|
|
-set(uncrustify_headers
|
|
+set(uncrustify-trinity_headers
|
|
src/add_space_table.h
|
|
src/align_add.h
|
|
src/align_asm_colon.h
|
|
@@ -436,7 +436,7 @@
|
|
${PROJECT_BINARY_DIR}/uncrustify_version.h
|
|
)
|
|
|
|
-set(uncrustify_docs
|
|
+set(uncrustify-trinity_docs
|
|
"${PROJECT_SOURCE_DIR}/AUTHORS"
|
|
"${PROJECT_SOURCE_DIR}/BUGS"
|
|
"${PROJECT_SOURCE_DIR}/ChangeLog"
|
|
@@ -445,17 +445,17 @@
|
|
"${PROJECT_SOURCE_DIR}/README.md"
|
|
)
|
|
|
|
-add_executable(uncrustify ${uncrustify_sources} ${uncrustify_headers})
|
|
-add_dependencies(uncrustify generate_version_header)
|
|
+add_executable(uncrustify-trinity ${uncrustify-trinity_sources} ${uncrustify-trinity_headers})
|
|
+add_dependencies(uncrustify-trinity generate_version_header)
|
|
|
|
-set_property(TARGET uncrustify APPEND PROPERTY
|
|
+set_property(TARGET uncrustify-trinity APPEND PROPERTY
|
|
COMPILE_DEFINITIONS $<$<OR:$<CONFIG:Debug>,$<CONFIG:>>:DEBUG>
|
|
)
|
|
|
|
#
|
|
-# Generate uncrustify.1
|
|
+# Generate uncrustify-trinity.1
|
|
#
|
|
-configure_file(man/uncrustify.1.in uncrustify.1 @ONLY)
|
|
+configure_file(man/uncrustify.1.in uncrustify-trinity.1 @ONLY)
|
|
|
|
#
|
|
# Generate uncrustify.xml (katepart highlighting file)
|
|
@@ -477,7 +477,7 @@
|
|
#
|
|
OPTION(ENABLE_CODECOVERAGE "Enable code coverage testing support")
|
|
if(ENABLE_CODECOVERAGE)
|
|
- set(CODECOVERAGE_DEPENDS uncrustify)
|
|
+ set(CODECOVERAGE_DEPENDS uncrustify-trinity)
|
|
include(${CMAKE_SOURCE_DIR}/cmake/CodeCoverage.cmake)
|
|
endif(ENABLE_CODECOVERAGE)
|
|
|
|
@@ -485,10 +485,10 @@
|
|
# Build command to run uncrustify on its own sources
|
|
#
|
|
add_custom_target(format-sources)
|
|
-foreach(source IN LISTS uncrustify_sources uncrustify_headers)
|
|
+foreach(source IN LISTS uncrustify-trinity_sources uncrustify-trinity_headers)
|
|
get_filename_component(source_name ${source} NAME)
|
|
add_custom_target(format-${source_name}
|
|
- COMMAND uncrustify
|
|
+ COMMAND uncrustify-trinity
|
|
-c forUncrustifySources.cfg
|
|
-lCPP --no-backup ${source}
|
|
COMMENT "Formatting ${source}"
|
|
@@ -500,7 +500,7 @@
|
|
#
|
|
# Package
|
|
#
|
|
-set(CPACK_PACKAGE_NAME "uncrustify")
|
|
+set(CPACK_PACKAGE_NAME "uncrustify-trinity")
|
|
set(CPACK_PACKAGE_VERSION "${UNCRUSTIFY_VERSION}")
|
|
set(CPACK_PACKAGE_VENDOR "Ben Gardner")
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Code beautifier")
|
|
@@ -518,8 +518,8 @@
|
|
# Install
|
|
#
|
|
if(MSVC)
|
|
- install(TARGETS uncrustify DESTINATION ".")
|
|
- install(FILES ${uncrustify_docs}
|
|
+ install(TARGETS uncrustify-trinity DESTINATION ".")
|
|
+ install(FILES ${uncrustify-trinity_docs}
|
|
DESTINATION "."
|
|
)
|
|
install(FILES "${PROJECT_SOURCE_DIR}/documentation/htdocs/index.html"
|
|
@@ -531,17 +531,17 @@
|
|
)
|
|
else()
|
|
include(GNUInstallDirs)
|
|
- install(TARGETS uncrustify
|
|
+ install(TARGETS uncrustify-trinity
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
)
|
|
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/uncrustify.1"
|
|
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/uncrustify-trinity.1"
|
|
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
|
)
|
|
install(DIRECTORY "${PROJECT_SOURCE_DIR}/etc/"
|
|
DESTINATION "${CMAKE_INSTALL_DOCDIR}/examples"
|
|
FILES_MATCHING PATTERN "*.cfg"
|
|
)
|
|
- install(FILES ${uncrustify_docs}
|
|
+ install(FILES ${uncrustify-trinity_docs}
|
|
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
|
|
)
|
|
endif()
|
|
--- a/tests/CMakeLists.txt
|
|
+++ b/tests/CMakeLists.txt
|
|
@@ -32,7 +32,7 @@
|
|
add_custom_command(
|
|
OUTPUT ${tests_ctest_file}
|
|
COMMAND ${PYTHON_EXECUTABLE} run_format_tests.py
|
|
- --executable $<TARGET_FILE:uncrustify>
|
|
+ --executable $<TARGET_FILE:uncrustify-trinity>
|
|
--git ${GIT_EXECUTABLE}
|
|
--python ${PYTHON_EXECUTABLE}
|
|
--write-ctest ${tests_ctest_file}
|
|
@@ -48,7 +48,7 @@
|
|
string(REPLACE ".test" "" lang "${suite}")
|
|
add_test(NAME ${lang}
|
|
COMMAND ${PYTHON_EXECUTABLE} run_format_tests.py ${lang}
|
|
- --executable $<TARGET_FILE:uncrustify>
|
|
+ --executable $<TARGET_FILE:uncrustify-trinity>
|
|
-d --git ${GIT_EXECUTABLE}
|
|
--result-dir ${CMAKE_CURRENT_BINARY_DIR}
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
@@ -60,7 +60,7 @@
|
|
add_test(
|
|
NAME sources_format
|
|
COMMAND ${PYTHON_EXECUTABLE} run_sources_tests.py
|
|
- --executable $<TARGET_FILE:uncrustify>
|
|
+ --executable $<TARGET_FILE:uncrustify-trinity>
|
|
-d --git ${GIT_EXECUTABLE}
|
|
--result-dir ${CMAKE_CURRENT_BINARY_DIR}
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
@@ -72,7 +72,7 @@
|
|
COMMAND ${PYTHON_EXECUTABLE}
|
|
test_cli_options.py
|
|
--config $<CONFIG>
|
|
- --build ${uncrustify_BINARY_DIR}
|
|
+ --build ${uncrustify-trinity_BINARY_DIR}
|
|
--diff
|
|
--test ${CMAKE_CURRENT_BINARY_DIR}/cli
|
|
${_configs}
|
|
@@ -83,11 +83,11 @@
|
|
COMMAND ${PYTHON_EXECUTABLE}
|
|
test_cli_options.py
|
|
--config $<CONFIG>
|
|
- --build ${uncrustify_BINARY_DIR}
|
|
+ --build ${uncrustify-trinity_BINARY_DIR}
|
|
--apply
|
|
--test ${CMAKE_CURRENT_BINARY_DIR}/cli
|
|
- DEPENDS uncrustify
|
|
+ DEPENDS uncrustify-trinity
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cli
|
|
)
|
|
|
|
-add_test(NAME sanity COMMAND uncrustify --help)
|
|
+add_test(NAME sanity COMMAND uncrustify-trinity --help)
|
|
--- a/tests/cli/output/help.txt
|
|
+++ b/tests/cli/output/help.txt
|
|
@@ -1,5 +1,5 @@
|
|
Usage:
|
|
-uncrustify [options] [files ...]
|
|
+uncrustify-trinity [options] [files ...]
|
|
|
|
If no input files are specified, the input is read from stdin
|
|
If reading from stdin, you should specify the language using -l
|
|
--- a/tests/cli/test_cli_options.py
|
|
+++ b/tests/cli/test_cli_options.py
|
|
@@ -525,16 +525,16 @@
|
|
bd_dir = parsed_args.build
|
|
test_dir = parsed_args.test
|
|
|
|
- bin_paths = [s_path_join(bd_dir, 'uncrustify'),
|
|
- s_path_join(bd_dir, 'uncrustify.exe'),
|
|
- s_path_join(bd_dir, 'Debug/uncrustify'),
|
|
- s_path_join(bd_dir, 'Debug/uncrustify.exe'),
|
|
- s_path_join(bd_dir, 'Release/uncrustify'),
|
|
- s_path_join(bd_dir, 'Release/uncrustify.exe'),
|
|
- s_path_join(bd_dir, 'RelWithDebInfo/uncrustify'),
|
|
- s_path_join(bd_dir, 'RelWithDebInfo/uncrustify.exe'),
|
|
- s_path_join(bd_dir, 'MinSizeRel/uncrustify'),
|
|
- s_path_join(bd_dir, 'MinSizeRel/uncrustify.exe')]
|
|
+ bin_paths = [s_path_join(bd_dir, 'uncrustify-trinity'),
|
|
+ s_path_join(bd_dir, 'uncrustify-trinity.exe'),
|
|
+ s_path_join(bd_dir, 'Debug/uncrustify-trinity'),
|
|
+ s_path_join(bd_dir, 'Debug/uncrustify-trinity.exe'),
|
|
+ s_path_join(bd_dir, 'Release/uncrustify-trinity'),
|
|
+ s_path_join(bd_dir, 'Release/uncrustify-trinity.exe'),
|
|
+ s_path_join(bd_dir, 'RelWithDebInfo/uncrustify-trinity'),
|
|
+ s_path_join(bd_dir, 'RelWithDebInfo/uncrustify-trinity.exe'),
|
|
+ s_path_join(bd_dir, 'MinSizeRel/uncrustify-trinity'),
|
|
+ s_path_join(bd_dir, 'MinSizeRel/uncrustify-trinity.exe')]
|
|
for uncr_bin in bin_paths:
|
|
if not isfile(uncr_bin):
|
|
eprint("is 3 not a file: %s" % uncr_bin)
|