diff -Paur --no-dereference -- nasm.upstream/Makefile.in nasm/Makefile.in
--- nasm.upstream/Makefile.in
+++ nasm/Makefile.in
@@ -201,12 +201,12 @@
 manpages: nasm.1 ndisasm.1
 
 install: nasm$(X) ndisasm$(X)
-	$(MKDIR) -p $(INSTALLROOT)$(bindir)
-	$(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X)
-	$(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X)
-	$(MKDIR) -p $(INSTALLROOT)$(mandir)/man1
-	$(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
-	$(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
+	$(MKDIR) -p $(DESTDIR)$(bindir)
+	$(INSTALL_PROGRAM) nasm$(X) $(DESTDIR)$(bindir)/nasm$(X)
+	$(INSTALL_PROGRAM) ndisasm$(X) $(DESTDIR)$(bindir)/ndisasm$(X)
+	$(MKDIR) -p $(DESTDIR)$(mandir)/man1
+	$(INSTALL_DATA) $(srcdir)/nasm.1 $(DESTDIR)$(mandir)/man1/nasm.1
+	$(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
 
 clean:
 	$(RM) -f *.$(O) *.s *.i
@@ -218,7 +218,7 @@
 
 distclean: clean
 	$(RM) -f config.h config.log config.status
-	$(RM) -f Makefile *~ *.bak *.lst *.bin
+	$(RM) -f Makefile doc/Makefile *~ *.bak *.lst *.bin
 	$(RM) -f output/*~ output/*.bak
 	$(RM) -f test/*.lst test/*.bin test/*.$(O) test/*.bin
 	$(RM) -rf autom4te*.cache
