added up-to-date message, run now shows args

This commit is contained in:
Noah Swerhun 2021-12-24 13:43:05 -06:00
parent 9e7cd161c6
commit 97911f0a37
2 changed files with 7 additions and 1 deletions

1
.cbuild_prog.tmp Normal file
View file

@ -0,0 +1 @@
0

View file

@ -116,6 +116,10 @@ build() {
[ ! -d "${OBJDIR}" ] && mkdir "${OBJDIR}"
export_vars
make -f "${MAKEFILE}" -e "${TARGET}" -n | grep "^${CC}" | wc -l > .cbuild_prog.tmp
if [ "$(cat .cbuild_prog.tmp)" = 0 ]; then
info "Target ${TARGET} up to date"
return 0;
fi
info "Beginning build..."
make -f "${MAKEFILE}" -e "${TARGET}"
ret=$?
@ -137,7 +141,8 @@ clean() {
run() {
build || exit $?
info "Running ./${TARGET}"
args="$@"
info "Running ./${TARGET} ${args}"
"./${TARGET}" $@ ||
err "Run FAILURE ./${TARGET} returned $?"
}