--- sgmlfmt/Makefile.orig	Tue Sep 15 23:05:39 1998
+++ sgmlfmt/Makefile	Wed Sep 20 22:34:15 2000
@@ -2,12 +2,12 @@
 
 FILES=		sgmlfmt
 CLEANFILES=	sgmlfmt
-MAN1=		sgmlfmt.1
+MAN=		sgmlfmt.1
 
 all: sgmlfmt
 
 sgmlfmt: sgmlfmt.pl
-.if exists(/usr/bin/perl5)
+.if exists(/usr/bin/perl)
 	sed -e 's|##PERL##|/usr/bin/perl|' -e 's|##PREFIX##|${PREFIX}|' < sgmlfmt.pl > sgmlfmt
 .else
 	sed -e 's|##PERL##|${PREFIX}/bin/perl|' -e 's|##PREFIX##|${PREFIX}|' < sgmlfmt.pl > sgmlfmt
@@ -15,6 +15,6 @@
 
 afterinstall:
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${FILES} \
-		${BINDIR}
+		$(DESTDIR)${BINDIR}
 
 .include <bsd.prog.mk>