At a guess, there's something in the makefile which is not getting expanded (%prep perhaps?) and it is then passing it to the shell to run (instead of the make command itself) where the fg command of your interpreter rightfully complains that the foreground/background job "%-whatever" doesn't actually exist.
Check line 23 of that tmp file and see what macros are being called.
HTH!
|