Yeah, it's weird. You can get the behaviour you want by chaining notdir and basename:
$(notdir names...)
Extracts all but the directory-part of each file name in names... For example,
$(notdir src/foo.c hacks)
produces the result ‘foo.c hacks’.
...
$(basename names...)
Extracts all but the suffix of each file name in names. If the file name
contains a period, the basename is everything starting up to (and not
including) the last period... For example,
$(basename src/foo.c src-1.0/bar hacks)
produces the result ‘src/foo src-1.0/bar hacks’.
So, for example, you could convert /home/ari/src/helloworld.c
to helloworld.html
by chaining functions like this:
SRC=/home/ari/src/helloworld.c
TARGET=$(addsuffix .html, $(notdir $(basename $(SRC))))