diff options
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-x | remote/setup_target | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/remote/setup_target b/remote/setup_target index 15938558..924450fd 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -213,8 +213,14 @@ process_module() { install_dependencies pinfo "## Fetching source" [ -e "${MODULE_DIR}/.fetched_source" ] || { fetch_source && touch "${MODULE_DIR}/.fetched_source"; } - pinfo "## Building" - [ -e "${MODULE_DIR}/.built" ] || { build && touch "${MODULE_DIR}/.built"; } + if [ -e "${MODULE_DIR}/.built" -a -d "${MODULE_DIR}/build" ]; then + pinfo "# built-flag is set, skipping build..." + else + pinfo "## Building" + mkdir -p "${MODULE_DIR}/build" || perror "Could not create build dir" + build # calls perror if something fails, no need to do that here + touch "${MODULE_DIR}/.built" || pwarning "Error setting built-flag" + fi # remove *.la files as they might confuse libtool/linker of other tool packages [ -d "${MODULE_BUILD_DIR}" ] && find "${MODULE_BUILD_DIR}" -name '*.la' -exec rm -f {} \; [ -d "${TARGET_BUILD_DIR}" ] && TARGET_BUILD_SIZE=$(du -bc "${TARGET_BUILD_DIR}" | awk 'END {print $1}') || TARGET_BUILD_SIZE=0 |