added up-to-date message, run now shows args
This commit is contained in:
parent
9e7cd161c6
commit
97911f0a37
2 changed files with 7 additions and 1 deletions
1
.cbuild_prog.tmp
Normal file
1
.cbuild_prog.tmp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0
|
|
@ -116,6 +116,10 @@ build() {
|
||||||
[ ! -d "${OBJDIR}" ] && mkdir "${OBJDIR}"
|
[ ! -d "${OBJDIR}" ] && mkdir "${OBJDIR}"
|
||||||
export_vars
|
export_vars
|
||||||
make -f "${MAKEFILE}" -e "${TARGET}" -n | grep "^${CC}" | wc -l > .cbuild_prog.tmp
|
make -f "${MAKEFILE}" -e "${TARGET}" -n | grep "^${CC}" | wc -l > .cbuild_prog.tmp
|
||||||
|
if [ "$(cat .cbuild_prog.tmp)" = 0 ]; then
|
||||||
|
info "Target [0m${TARGET}[34m up to date"
|
||||||
|
return 0;
|
||||||
|
fi
|
||||||
info "Beginning build..."
|
info "Beginning build..."
|
||||||
make -f "${MAKEFILE}" -e "${TARGET}"
|
make -f "${MAKEFILE}" -e "${TARGET}"
|
||||||
ret=$?
|
ret=$?
|
||||||
|
@ -137,7 +141,8 @@ clean() {
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
build || exit $?
|
build || exit $?
|
||||||
info "Running [0m./${TARGET}"
|
args="$@"
|
||||||
|
info "Running [0m./${TARGET} ${args}"
|
||||||
"./${TARGET}" $@ ||
|
"./${TARGET}" $@ ||
|
||||||
err "Run FAILURE [0m./${TARGET}[31m returned $?"
|
err "Run FAILURE [0m./${TARGET}[31m returned $?"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue