diff --git a/doc/Makefile.am b/doc/Makefile.am
index b800de436b..aeebfb360c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,53 +1,53 @@
 #
 # doc: Linux-HA heartbeat code
 #
 # Copyright (C) 2001 Michael Moerz
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
 # 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 # 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
 MAINTAINERCLEANFILES    = Makefile.in
 
 docdir 			= $(datadir)/doc/@HB_PKG@-@VERSION@
 
 htmlfiles		= HardwareGuide.html	\
 			GettingStarted.html	\
 			Requirements.html	\
 			faqntips.html		\
 			heartbeat_api.html	\
 			rsync.html
 
 txtfiles                = $(htmlfiles:.html=.txt)
 
-CLEANFILES              = ChangeLog
+CLEANFILES              = ChangeLog $(txtfiles)
 
 SPECSRC 		= $(top_builddir)/heartbeat.spec
 
 OTHER_DOCS              = AUTHORS COPYING ChangeLog \
                                 README authkeys ha.cf startstop haresources \
 				DirectoryMap.txt apphbd.cf
 
 doc_DATA		= $(OTHER_DOCS) $(txtfiles) $(htmlfiles) 
 
 man_MANS		= heartbeat.8 apphbd.8 cl_status.1 ha_logd.8 ha_logger.1
 
 EXTRA_DIST = $(txtfiles) $(htmlfiles) $(man_MANS) $(OTHER_DOCS)
 
 ChangeLog: $(SPECSRC)
 	rm -fr ChangeLog
 	sed -e '1,/^%changelog/d' -e '/^%/,$$d' < $< > $@
 
 
 %.txt: %.html
-	@HTML2TXT@ -dump $< >$@
+	[ "X$(HTML2TXT)" = "X" ] || $(HTML2TXT) -dump $< >$@