diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ce6b7be..f08dc99b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Development Build: v7.0.0-rc4+dev362 +- 'Fix #2421, adjust dependencies on table lib' +- 'Fix #2423, avoid use of abspath make function' +- See: + + ## Development Build: v7.0.0-rc4+dev356 - 'Fix #2415, use correct object extension in table build' - See: @@ -109,6 +115,12 @@ ## Development Build: v7.0.0-rc4+dev197 - Remove # Changelog +## Development Build: v7.0.0-rc4+dev362 +- 'Fix #2421, adjust dependencies on table lib' +- 'Fix #2423, avoid use of abspath make function' +- See: + + ## Development Build: v7.0.0-rc4+dev356 - 'Fix #2415, use correct object extension in table build' - See: diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index 04c44d97a..e94f86fe4 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -324,7 +324,7 @@ function(add_cfe_tables TABLE_FQNAME TBL_DEFAULT_SRC_FILES) # Add a custom target to generate the config file add_custom_target(generate_table_${TGT}_${APP_NAME}_${TABLE_BASENAME} - DEPENDS "${TABLE_RULEFILE}" + DEPENDS "${TABLE_RULEFILE}" ${TABLE_LIBNAME} ) add_dependencies(cfetables generate_table_${TGT}_${APP_NAME}_${TABLE_BASENAME}) @@ -335,7 +335,7 @@ function(add_cfe_tables TABLE_FQNAME TBL_DEFAULT_SRC_FILES) # On older versions one may not reference the TARGET_OBJECTS property from the custom command. # As a workaround this is built into a static library, and then the desired object is extracted # before passing to elf2cfetbl. It is roundabout but it works. - add_library(${TABLE_LIBNAME} STATIC ${TABLE_SELECTED_SRCS}) + add_library(${TABLE_LIBNAME} STATIC EXCLUDE_FROM_ALL ${TABLE_SELECTED_SRCS}) target_compile_definitions(${TABLE_LIBNAME} PRIVATE CFE_CPU_NAME=${TGT} ) diff --git a/cmake/tables/elf2cfetbl_rules.mk b/cmake/tables/elf2cfetbl_rules.mk index 21e63e84d..c17443579 100644 --- a/cmake/tables/elf2cfetbl_rules.mk +++ b/cmake/tables/elf2cfetbl_rules.mk @@ -1,5 +1,10 @@ # Rule for traditional CFE table generation via elf2cfetbl +# The dependency of this target should always be an absolute pathname to +# the intermediate library file as it is generated by a CMake script via +# the TARGET_FILE property. Therefore, the same path should still work +# after the "cd" command. The "cd" is so the ar tool writes the object file +# into a separate dir, in case of similarly-named files on different cpus. elf/%: - @mkdir -pv $(dir $(@)) - cd $(dir $(@)) && $(AR) x $(abspath $(<)) $(notdir $(@)) + @mkdir -pv "$(dir $(@))" + cd "$(dir $(@))" && $(AR) x "$(<)" "$(notdir $(@))" diff --git a/cmake/tables/tabletool_rule.mk b/cmake/tables/tabletool_rule.mk index 0e2e178f2..6b34c7561 100644 --- a/cmake/tables/tabletool_rule.mk +++ b/cmake/tables/tabletool_rule.mk @@ -4,7 +4,12 @@ cfetables: @echo "Table build completed" -#%.tbl: $(TBLTOOL) +# The dependency of this rule should always be a relative path starting with elf/, +# at least with the current rule generator script, so it matches the elf/% pattern rule. +# But because elf2cfetbl only writes its output to the current working dir, it has to be run +# after changing dirs into the staging area. Thus the path to the elf file needs to be adjusted. +# Ideally this chould be done with the $(abspath f...) function but this doesn't exist in older versions. +# As a workaround, $CURDIR is used. staging/%.tbl: - @mkdir -pv $(dir $(@)) - cd $(dir $(@)) && $(TBLTOOL) $(TBLTOOL_FLAGS) $(abspath $(^)) + @mkdir -pv "$(dir $(@))" + cd "$(dir $(@))" && $(TBLTOOL) $(TBLTOOL_FLAGS) "$(CURDIR)/$(<)" diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index 78597cc63..d9c6df8cf 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -26,7 +26,7 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 356 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ +#define CFE_BUILD_NUMBER 362 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ #define CFE_BUILD_BASELINE "v7.0.0-rc4" /**< @brief Development: Reference git tag for build number */ /* See \ref cfsversions for definitions */