Makefile incompatible with paths containing spaces

I've downloaded the repo and unpacked it into ~/Development/Uni/Semester 6/AKSS/presentation. When executing make (in that directory) execution fails with

[~/Development/Uni/Semester 6/AKSS/presentation] <main> * make
Makefile:45: warning: overriding recipe for target '/home/benedikt/Development/Uni'
Makefile:42: warning: ignoring old recipe for target '/home/benedikt/Development/Uni'
make: Circular /home/benedikt/Development/Uni <- /home/benedikt/Development/Uni dependency dropped.
make: Circular /home/benedikt/Development/Uni <- /home/benedikt/Development/Uni dependency dropped.
make: Circular /home/benedikt/Development/Uni <- /home/benedikt/Development/Uni dependency dropped.
/bin/sh: line 1: cd: too many arguments
make: *** [Makefile:42: 6/AKSS/presentation/Uni] Error 1

I've tried to debug and it seems like dirname in L1 seems to be the problem since

LOCAL_DIR  := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

will execute dirname /home/benedikt/Development/Uni/Semester 6/AKSS/presentation/Makefile which returns

[~/Development/Uni/Semester 6/AKSS/presentation] <main> * dirname /home/benedikt/Development/Uni/Semester 6/AKSS/presentation/Makefile
/home/benedikt/Development/Uni
6/AKSS/presentation

I've tried to come up with a workaround using

[~/Development/Uni/Semester 6/AKSS/presentation] <main> * printf '%q' 'test 123 $as\'
test\ 123\ \$as\\[~/Development/Uni/Semester 6/AKSS/presentation] <main> *

to escape the path which looked sth like this

DIRNAME    := $(shell dirname $(shell printf "%q" "$(realpath $(lastword $(MAKEFILE_LIST)))"))
LOCAL_DIR  := $(shell printf "%q" "$(DIRNAME)")

but I've given up because I lack knowledge to understand the Makefile.

In particular it seems like the escaped path is no longer escaped after the wildcard call in L10