forked from Telodendria/Telodendria
Clean up build output on terminals.
If we're not writing out to a terminal, then echo each file out as it is being compiled. Otherwise, if we are on a terminal, overwrite the previous line.
This commit is contained in:
parent
56105c8a61
commit
472a6ccbf7
|
@ -93,7 +93,11 @@ recipe_build() {
|
||||||
objs="$objs $obj"
|
objs="$objs $obj"
|
||||||
|
|
||||||
if [ $(mod_time "$src") -ge $(mod_time "$obj") ]; then
|
if [ $(mod_time "$src") -ge $(mod_time "$obj") ]; then
|
||||||
echo "CC $(basename $obj)"
|
if [ -t 1 ]; then
|
||||||
|
printf "CC %s\t\t\t\r" "$(basename $obj)"
|
||||||
|
else
|
||||||
|
echo "CC $(basename $obj)"
|
||||||
|
fi
|
||||||
obj_dir=$(dirname "$obj")
|
obj_dir=$(dirname "$obj")
|
||||||
mkdir -p "$obj_dir"
|
mkdir -p "$obj_dir"
|
||||||
if ! $CC $CFLAGS -Iinclude -c -o "$obj" "$src"; then
|
if ! $CC $CFLAGS -Iinclude -c -o "$obj" "$src"; then
|
||||||
|
|
Loading…
Reference in New Issue