Skip to content

Commit 3d270f1

Browse files
committed
Refactoring the build system
* Removed unused or unnecessary parts from various make files * Eliminated lots of duplications from Makefile with the help of macros. * Split tools/precommit.sh to its independent components: * the part that checks the existence of the "signed off" text in commit messages (this on got factored out to tools/check-signed-off.sh), * the part that uses vera++ for style checking (this one got factored out to tools/check-vera.sh), * the part that invokes targets in the cmake-generated build directory, and * the part that performs various tests (these latter two got moved into the Makefile). * Moved the functionality of precommit-full-testing.sh into the Makefile, too. * Added ninja build system support (e.g., `make NINJA=1`). * Updated leading documentation comments (they were somewhat stale). * Tried to keep the target names exactly the same as they were -- almost succeeded... (some changes are intentional, and are subject to personal preferences). * Simplified console output of `make precommit` * Unified test runner scripts and their output format * Eliminated nothing-to-stdout everything-to-log-file policy: info is printed to stdout and it is the caller's responsibility to redirect it to a file if needed. * Also applied some renaming and coding style unification to the scripts. * Merged the functionality of tools/runners/run-test-suite-jerry*.sh into the Makefile * Merged everything related to a test suite execution in a single script. * The new script also allows to specify pass and xfail tests in a single list file, which was not possible hitherto. * Also, the paths of the test cases given in a file are interpreted relative to their container files. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
1 parent 977bfa5 commit 3d270f1

17 files changed

+2751
-2918
lines changed

CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ project (Jerry C ASM)
4444
# Static checkers
4545
include(build/static-checkers/add_cppcheck_for_target.cmake)
4646

47-
add_custom_target(static_check)
48-
add_dependencies(static_check cppcheck)
49-
5047
# Architecture-specific compile/link flags
5148
foreach(FLAG ${FLAGS_COMMON_ARCH})
5249
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAG}")
@@ -161,12 +158,6 @@ project (Jerry C ASM)
161158
set(BUILD_MODE_PREFIX_UNITTESTS unittests)
162159

163160
# Modifiers
164-
set(MODIFIERS
165-
COMPACT_PROFILE
166-
COMPACT_PROFILE_MINIMAL
167-
FULL_PROFILE
168-
MEMORY_STATISTICS)
169-
170161
# Profiles
171162
# Full profile (default, so - no suffix)
172163
set(MODIFIER_SUFFIX_FULL_PROFILE "")
@@ -386,7 +377,7 @@ endif()
386377
set(LIBC_TARGET_NAME ${BUILD_MODE_PREFIX_${BUILD_MODE}}.jerry-libc.${PLATFORM_L}.lib)
387378
endif()
388379

389-
function(declare_target_with_modifiers ) # modifiers are passed in ARGN implicit argument
380+
function(declare_target_with_modifiers) # modifiers are passed in ARGN implicit argument
390381
set(CORE_TARGET_NAME ${BUILD_MODE_PREFIX_${BUILD_MODE}})
391382
foreach(MODIFIER ${ARGN})
392383
set(TARGET_NAME ${TARGET_NAME}${MODIFIER_SUFFIX_${MODIFIER}})
@@ -452,7 +443,6 @@ endif()
452443
else()
453444
add_custom_target(${TARGET_NAME} ALL)
454445

455-
add_dependencies(${TARGET_NAME} ${FDLIBM_TARGET_NAME} ${CORE_TARGET_NAME})
456446
add_custom_command(TARGET ${TARGET_NAME}
457447
POST_BUILD
458448
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/${TARGET_NAME}
@@ -472,7 +462,6 @@ endif()
472462
endif()
473463

474464
if(${USE_JERRY_LIBC})
475-
add_dependencies(${TARGET_NAME} ${LIBC_TARGET_NAME})
476465
add_custom_command(TARGET ${TARGET_NAME}
477466
POST_BUILD
478467
COMMAND echo $<TARGET_FILE:${LIBC_TARGET_NAME}> >> ${CMAKE_BINARY_DIR}/${TARGET_NAME}/list)

0 commit comments

Comments
 (0)