The above is indeed generated by automake, but it is perfectly correct. We don't want to install anything in $(docdir) it that expands to the empty string; that holds even if $(DESTDIR) is non-empty. So a 'test -z "$(DESTDIR)$(docdir)"' would be incorrect.
Ah, so I see. I thought it was checking if the directory or file existed already.
Thanks for your patience ;-) James