If you are willing to use /proc, you basically have Linux, and can assume just as well that your shell is bash.
If so, $$ is the easiest way to get the PID of the current shell. That works in several other shells, too, but I am not sure sh is guaranteed to have it (FreeBSD's sh has it. See http://www.freebsd.org/cgi/man.cgi?query=sh)
----------------------
PID := $(shell cat /proc/$$$$/status | grep PPid | awk '{print $$2}')
JOBS := $(shell ps -p ${PID} -f | tail -n1 | grep -oP '\-j *\d+' | sed 's/-j//')
ifeq "${JOBS}" ""
JOBS := 1
endif
all:
echo ${JOBS}
----------------------
quanticles@glados $ make -j8
8
quanticles@glados $ make
1
----------
edit: for silly mistake