Skip to content

Commit

Permalink
[chore](build) avoid generating generated code every time (#19813)
Browse files Browse the repository at this point in the history
When calling generated-source.sh in build.sh, not to remove the gensrc/build dir.
  • Loading branch information
morningman authored May 19, 2023
1 parent 3e010bb commit 3d795de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Usage: $0 <options>
clean_gensrc() {
pushd "${DORIS_HOME}/gensrc"
make clean
rm -rf "${DORIS_HOME}/gensrc/build"
rm -rf "${DORIS_HOME}/fe/fe-common/target"
rm -rf "${DORIS_HOME}/fe/fe-core/target"
popd
Expand Down Expand Up @@ -401,7 +402,7 @@ echo "Get params:
if [[ "${CLEAN}" -eq 1 ]]; then
clean_gensrc
fi
"${DORIS_HOME}"/generated-source.sh
"${DORIS_HOME}"/generated-source.sh noclean

# Assesmble FE modules
FE_MODULES=''
Expand Down
10 changes: 9 additions & 1 deletion generated-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ export DORIS_HOME="${ROOT}"

echo "Build generated code"
cd "${DORIS_HOME}/gensrc"
rm -rf "${DORIS_HOME}/gensrc/build"

# if calling from build.sh, no need to clean build/ dir.
# it will be removed by using `build.sh --clean`.
# when run this script along, it will always remove the build/ dir.
if [[ "$#" == 0 ]]; then
echo "rm -rf ${DORIS_HOME}/gensrc/build"
rm -rf "${DORIS_HOME}/gensrc/build"
fi

# DO NOT using parallel make(-j) for gensrc
make
rm -rf "${DORIS_HOME}/fe/fe-common/src/main/java/org/apache/doris/thrift ${DORIS_HOME}/fe/fe-common/src/main/java/org/apache/parquet"
Expand Down

0 comments on commit 3d795de

Please sign in to comment.