I have a variable lets say
x=tpm/tpm

in a makefile i want to be able to split x to halves.

in bash this would be something like ${x%/*} and ${x#*/}

but how do i do it in a makefile?

thanks in advance.