Skip to content

Commit

Permalink
ensure old specs file is removed before build
Browse files Browse the repository at this point in the history
  • Loading branch information
jwt27 committed Jul 10, 2023
1 parent 1919e91 commit db60756
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 0 additions & 3 deletions build-djgpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ fi

cd ${BASE}/build/ || exit 1

echo "Removing old specs file"
${SUDO} rm -f ${PREFIX}/lib/gcc/${TARGET}/$(get_version gcc)/specs

if [ ! -z ${WATT32_VERSION} ]; then
export WATT_ROOT=${BASE}/build/Watt-32
cd ${WATT_ROOT} || exit 1
Expand Down
13 changes: 13 additions & 0 deletions script/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,18 @@ echo "Creating install directory: ${DST}"

export PATH="${DST}/bin:${PREFIX}/bin:$PATH"

remove_if_exists()
{
if [ -e $1 ]; then
${SUDO} rm -f $1 || exit 1
fi
}

if which ${TARGET}-gcc 2>&1 > /dev/null; then
echo "Removing previously-installed specs file"
remove_if_exists "${DST}/lib/gcc/${TARGET}/$(${TARGET}-gcc -dumpversion)/specs"
remove_if_exists "${PREFIX}/lib/gcc/${TARGET}/$(${TARGET}-gcc -dumpversion)/specs"
fi

rm -rf ${BASE}/tests
mkdir -p ${BASE}/tests

0 comments on commit db60756

Please sign in to comment.