Enable 'make uninstall' hook?

Heyas

I'm currently trying to make 'make uninstall' work properly, as it doesnt remove empty directories.

To do so, i've applied:

uninstall-hook:
    if test -d $docdir; then rmdir $docdir; fi

As stated (example) in automake - 'make uninstall': Howto remove empty directories - Stack Overflow

Befor i had applied the above 2 lines, the installation went all fine.
After these changes were applied, i did run:

$ autoconf ; automake --add-missing 
$ ./configure && make && make check && su -c "make install"

Which then fails with:

Makefile:815: *** missing separator.  Stop.

And the changes seem applied in the project root dir its Makefile.in

$ tail -n6 Makefile.in | head -n2
uninstall-hook:
    if test -d $docdir; then rmdir $docdir; fi

Any ideas?
What am i missing?
What more info do you need?

Thank you in advance

Commands in a target rule in a makefile need to start with a <tab> character; not <space>s. Change:

uninstall-hook:
    if test -d $docdir; then rmdir $docdir; fi

to:

uninstall-hook:
	if test -d $docdir; then rmdir $docdir; fi

and see if that helps.

Oh doh, crappy copy-paste-'translations'....

Thank you Don
/solved