Skip to content

Commit

Permalink
Comments in src/.ccws/* files, +build_all, deb help message.
Browse files Browse the repository at this point in the history
  • Loading branch information
asherikov committed Dec 17, 2024
1 parent 9a5b2ae commit 99fb325
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 21 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export OS_DISTRO_BUILD?=$(shell lsb_release -cs)

# default package to build can be specified in source directory or via command line,
# when not provided usually all packages in the workspace are processed
export PKG?=$(shell (cat "${WORKSPACE_SRC}/.ccws/package" 2> /dev/null | paste -d ' ' -s) || echo "")
export PKG?=$(shell (cat "${WORKSPACE_SRC}/.ccws/package" 2> /dev/null | sed -e 's/[[:space:]]*\#.*//' -e '/^[[:space:]]*$/d' | paste -d ' ' -s) || echo "")
export PKG_ID=$(shell echo "${PKG}" | md5sum | cut -f 1 -d ' ')


Expand Down Expand Up @@ -170,7 +170,10 @@ assert_EMAIL_must_not_be_empty:


build_glob:
bash -c "${MAKE} PKG=\"\$$(${CMD_PKG_NAME_LIST} | grep ${PKG_NAME_PART} | paste -d ' ' -s)\""
bash -c "${MAKE} PKG=\"\$$(${CMD_PKG_NAME_LIST} | grep '${PKG_NAME_PART}' | paste -d ' ' -s)\""

build_all:
bash -c "${MAKE} PKG=\"\$$(${CMD_PKG_NAME_LIST} | paste -d ' ' -s)\""

build: assert_BUILD_PROFILE_must_exist
${MAKE} wswraptarget TARGET=bp_${BUILD_PROFILE}_build
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ Known issues
- Some of ROS2 core packages cannot be built with `CCWS` due to cmake misuse,
e.g., see <https://github.com/ament/google_benchmark_vendor/issues/17>.

- `proot` segfault while building on arm64 in Ubuntu 22, e.g., while building
debian packages. Newer version of `proot` has to be used, see
<https://github.com/proot-me/proot/issues/312>.


Related software
================
Expand Down
7 changes: 5 additions & 2 deletions ccws/examples/.ccws/ccws.tests.exceptions.packages
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
staticoma
examples_rclcpp_minimal_subscriber
staticoma # comment
examples_rclcpp_minimal_subscriber#comment

# comment
#comment
5 changes: 4 additions & 1 deletion ccws/examples/.ccws/cppcheck.exceptions.packages
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
staticoma
staticoma # comment

# comment
#comment
7 changes: 5 additions & 2 deletions ccws/examples/.ccws/cppcheck.exceptions.paths
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
staticoma/src/3rdparty
staticoma/src/3rdparty
staticoma/src/3rdparty # comment
staticoma/src/3rdparty# comment

# comment
#comment
5 changes: 4 additions & 1 deletion ccws/examples/.ccws/static_checks.exceptions.packages
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
staticoma
staticoma # comment

# comment
#comment
7 changes: 5 additions & 2 deletions ccws/examples/.ccws/static_checks.exceptions.paths
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
staticoma/src/3rdparty
staticoma/src/3rdparty
staticoma/src/3rdparty # comment
staticoma/src/3rdparty#comment

# comment
#comment
1 change: 0 additions & 1 deletion ccws/make/clean.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Clean workspace
wsclean:
rm -rf "${WORKSPACE_DIR}"/build*
rm -rf "${WORKSPACE_DIR}"/devel*
rm -rf "${WORKSPACE_DIR}"/install*
rm -rf "${WORKSPACE_DIR}"/log*
rm -rf "${WORKSPACE_SRC}/.rosinstall.bak"
Expand Down
2 changes: 1 addition & 1 deletion ccws/make/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TEST_PKG_LIST_EXCEPT=${WORKSPACE_DIR}/build/${BUILD_PROFILE}/ccws.tests.exceptio

wslist_test:
${MAKE_QUIET} wslist | sort > "${TEST_PKG_LIST}"
(cat "${WORKSPACE_SRC}/.ccws/ccws.tests.exceptions.packages" 2> /dev/null || true) | sort > "${TEST_PKG_LIST_EXCEPT}"
(cat "${WORKSPACE_SRC}/.ccws/ccws.tests.exceptions.packages" 2> /dev/null | sed -e 's/[[:space:]]*#.*//' -e '/^[[:space:]]*$/d' || true) | sort > "${TEST_PKG_LIST_EXCEPT}"
comm -23 "${TEST_PKG_LIST}" "${TEST_PKG_LIST_EXCEPT}"

# generic test target, it is recommended to use more specific targets below
Expand Down
21 changes: 12 additions & 9 deletions ccws/profiles/build/common/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,18 @@ export DEBIAN_FRONTEND

ccws_read_exceptions()
{
FILE="${CCWS_SOURCE_EXTRAS}/${BUILD_PROFILE}.exceptions.${1}"

if [ -f "${FILE}" ]
then
if [ "$1" = "paths" ]
FILENAME_PREFIX="${CCWS_SOURCE_EXTRAS}/${BUILD_PROFILE}.exceptions.${1}"
for FILE in "${FILENAME_PREFIX}" "${FILENAME_PREFIX}.*"
do
if [ -f "${FILE}" ]
then
sed -e "s=^=:${CCWS_SOURCE_DIR}/=" < "${FILE}" | tr -d '\n'
else
sed -e 's=^=:=' < "${FILE}" | tr -d '\n'
if [ "$1" = "paths" ]
then
JOIN_PATTERN="s=^=:${CCWS_SOURCE_DIR}/="
else
JOIN_PATTERN="s=^=:="
fi
sed -e 's/[[:space:]]*#.*//' -e '/^[[:space:]]*$/d' -e "${JOIN_PATTERN}" < "${FILE}" | tr -d '\n'
fi
fi
done
}
2 changes: 2 additions & 0 deletions ccws/profiles/build/deb/bin/postinst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ done
cat >> "${SCRIPT}" <<EOF
logger "${MESSAGE}"
echo "${MESSAGE}"
echo "Installed package has been built with <https://github.com/asherikov/ccws>."
echo "Source setup script located in '${CCWS_INSTALL_DIR_HOST}' before using the package."
EOF

chmod +x "${SCRIPT}"
Expand Down
1 change: 1 addition & 0 deletions ccws/tests/test_main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ test:
build_with_profile:
${MAKE} wsclean
${MAKE} bp_install_build
${MAKE} build_all
${MAKE} staticoma
${MAKE} wstest
${MAKE} wsctest
Expand Down
1 change: 1 addition & 0 deletions ccws/tests/test_main_ros2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test_dependencies:
build_with_profile:
${MAKE} wsclean
${MAKE} bp_install_build
#${MAKE} build_all
${MAKE} examples_rclcpp_minimal_subscriber
# workspace test
${MAKE} wstest
Expand Down

0 comments on commit 99fb325

Please sign in to comment.