Skip to content

Commit 64afaea

Browse files
committed
adding a script which cleans up build spaces
1 parent 9e35df4 commit 64afaea

File tree

8 files changed

+77
-10
lines changed

8 files changed

+77
-10
lines changed

ct/build_ct.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ if [ -d "../$1" ]; then
1919
echo "Building with the following flags ... "
2020
printf '%s\n' "${build_flags[@]}"
2121

22-
make clean
2322
cmake .. ${build_flags[*]}
2423
make -j4
2524
sudo make install >/dev/null

ct/build_doc.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
build_doc(){
4+
# if module directory exists
5+
if [ -d "../$1" ]; then
6+
7+
echo " === Starting doc for module " $1 " === "
8+
# go to that module
9+
cd ../$1
10+
echo "Current directory is " $PWD
11+
12+
# make and go to build directory
13+
mkdir -p build && cd build
14+
15+
cmake ..
16+
make doc
17+
cd ..
18+
echo " === completed doc for " $1 "."
19+
else
20+
echo "ERROR: an error occurred during building the doc."
21+
exit 1
22+
fi
23+
}
24+
25+
## get current folder and make sure it is *ct*
26+
curr_folder=${PWD##*/}
27+
if [ $curr_folder != "ct" ]; then
28+
echo "ERROR: you need to start the doc build from the control-toolbox/ct directory."
29+
exit 1
30+
fi
31+
32+
33+
build_doc ct_core
34+
build_doc ct_optcon
35+
build_doc ct_rbd
36+
build_doc ct_models
37+
build_doc ct_doc
38+
39+
exit 0

ct/clean_ct.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
clean_module(){
4+
# if module directory exists
5+
if [ -d "../$1" ]; then
6+
7+
echo "Now cleaning module " $1 " ... "
8+
# go to that module
9+
cd ../$1
10+
11+
# make and go to build directory
12+
mkdir -p build && cd build
13+
rm -r -f *
14+
cd ..
15+
else
16+
echo "ERROR: an error occurred during cleaning. Try cleaning manually."
17+
exit 1
18+
fi
19+
}
20+
21+
## get current folder and make sure it is *ct*
22+
curr_folder=${PWD##*/}
23+
if [ $curr_folder != "ct" ]; then
24+
echo "ERROR: you need to start the cleaner from the control-toolbox/ct directory."
25+
exit 1
26+
fi
27+
28+
clean_module ct_core
29+
clean_module ct_optcon
30+
clean_module ct_rbd
31+
clean_module ct_models
32+
clean_module ct_doc
33+
34+
exit 0

ct_doc/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ if(DOXYGEN_FOUND)
2020
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
2121
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
2222
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc
23-
COMMAND ${CMAKE_COMMAND} -E echo_append "API Documentation built in ${CMAKE_CURRENT_SOURCE_DIR}/doc"
24-
# COMMAND sensible-browser ${CMAKE_CURRENT_SOURCE_DIR}/doc/html/index.html
23+
COMMAND ${CMAKE_COMMAND} -E echo_append "API Documentation built in ${CMAKE_CURRENT_SOURCE_DIR}/doc ."
24+
COMMAND sensible-browser ${CMAKE_CURRENT_SOURCE_DIR}/doc/html/index.html
2525
VERBATIM)
2626

27-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/html DESTINATION share/ct_doc/doc)
2827
endif()
2928

3029

ct_doc/doc/ct_doc.doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PROJECT_NUMBER = 3.0.1
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF = ""
47+
PROJECT_BRIEF = " - 3.0.1 Documentation"
4848

4949
# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
5050
# the documentation. The maximum height of the logo should not exceed 55 pixels

ct_models/doc/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ if(DOXYGEN_FOUND)
66
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
77
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile_in}
88
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
9-
COMMAND ${CMAKE_COMMAND} -E echo_append "API Documentation built in ${CMAKE_CURRENT_SOURCE_DIR}"
9+
COMMAND ${CMAKE_COMMAND} -E echo_append "API Documentation built in ${CMAKE_CURRENT_SOURCE_DIR} ."
1010
VERBATIM)
11-
12-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html DESTINATION share/ct_models/doc)
1311
endif()

ct_optcon/doc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ if(DOXYGEN_FOUND)
1010
COMMAND ${CMAKE_COMMAND} -E echo_append "API Documentation built in ${CMAKE_CURRENT_SOURCE_DIR}"
1111
VERBATIM)
1212

13-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html DESTINATION share/ct_optcon/doc)
1413
endif()

ct_rbd/doc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ if(DOXYGEN_FOUND)
99
COMMAND ${CMAKE_COMMAND} -E echo_append "API Documentation built in ${CMAKE_CURRENT_SOURCE_DIR}"
1010
VERBATIM)
1111

12-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html DESTINATION share/ct_rbd/doc)
1312
endif()

0 commit comments

Comments
 (0)