Skip to content

Commit

Permalink
build-fast: Use target/ if available
Browse files Browse the repository at this point in the history
This avoids my IDE from transiently seeing a ton of newly
added files.  Same motivation as e.g.
coreos/cargo-vendor-filterer@aa4a366
  • Loading branch information
cgwalters committed Sep 19, 2023
1 parent 05fead9 commit c1aa145
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cmd-build-fast
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,22 @@ echo "Basing on previous build: ${previous_build:-none}"

if [ -n "${projectdir}" ]; then
cd "${projectdir}"
rm _install -rf
instroot=_install
# Rust projects will already have a handy directory for build artifacts
if test -d target; then
instroot=target/cosa-build-fast
fi
instroot=$(pwd)/${instroot} # Must be absolute for `make`
rm "${instroot}" -rf
make
make install DESTDIR="$(pwd)/_install"
make install DESTDIR="${instroot}"
fastref=cosa/fastbuild/"$(basename "${projectdir}")"
version="$(git describe --tags --abbrev=10)"
if ! git diff --quiet; then
version="${version}+dirty"
fi
outdir=${projectdir}/.cosa
rootfsoverrides="${projectdir}/_install"
rootfsoverrides="${instroot}"
else
fastref=cosa/fastbuild/${name}
version="$(date +"%s")"
Expand Down

0 comments on commit c1aa145

Please sign in to comment.