- Big manpage and config file cleanup from Andre Lucas
   <andre.lucas@dial.pipex.com>
   - Re-added latest (unmodified) OpenBSD manpages
diff --git a/Makefile.in b/Makefile.in
index 0bfe2f1..020b632 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -24,7 +24,6 @@
 RANLIB=@RANLIB@
 INSTALL=@INSTALL@
 PERL=@PERL@
-FIXPATHS=$(PERL) @top_srcdir@/fixpaths -Dsysconfdir=${sysconfdir} -Dpiddir=${piddir}
 LDFLAGS=-L. @LDFLAGS@
 
 GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
@@ -38,10 +37,14 @@
 
 SSHDOBJS= sshd.o auth-rhosts.o auth-krb4.o auth-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o bsd-login.o md5crypt.o
 
-MANPAGES=scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8
+MANPAGES	= scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8
 
 CONFIGFILES=sshd_config ssh_config
 
+PATHSUBS	= -D/etc/ssh_config=$(sysconfdir)/ssh_config -D/etc/sshd_config=$(sysconfdir)/sshd_config -D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv -D/etc/ssh_host_key=$(sysconfdir)/ssh_host_key -D/var/run/sshd.pid=$(piddir)/sshd.pid
+
+FIXPATHSCMD	= $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
+
 all: $(TARGETS) $(MANPAGES) $(CONFIGFILES)
 
 $(LIBOBJS): config.h
@@ -71,33 +74,12 @@
 gnome-ssh-askpass: gnome-ssh-askpass.c
 	$(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
 
-scp.1: scp.1.in
-	$(FIXPATHS) $(srcdir)/scp.1.in
-
-ssh-add.1: ssh-add.1.in
-	$(FIXPATHS) ssh-add.1.in
-
-ssh-agent.1: ssh-agent.1.in
-	$(FIXPATHS) ssh-agent.1.in
-
-ssh-keygen.1: ssh-keygen.1.in
-	$(FIXPATHS) ssh-keygen.1.in
-
-ssh.1: ssh.1.in
-	$(FIXPATHS) ssh.1.in
-
-sshd.8: sshd.8.in
-	$(FIXPATHS) sshd.8.in
-
-sshd_config: sshd_config.in
-	$(FIXPATHS) sshd_config.in
-
-ssh_config: ssh_config.in
-	$(FIXPATHS) ssh_config.in
+$(MANPAGES) $(CONFIGFILES)::
+	$(FIXPATHSCMD) $(srcdir)/$@
 
 clean:
 	rm -f *.o *.a $(TARGETS) config.status config.cache config.log 
-	rm -f core *.1 *.8 sshd_config ssh_config
+	rm -f *.out core
 
 distclean: clean
 	rm -f Makefile config.h core *~
@@ -119,12 +101,12 @@
 	$(INSTALL) -s ssh-agent $(bindir)/ssh-agent
 	$(INSTALL) -s ssh-keygen $(bindir)/ssh-keygen
 	$(INSTALL) -s sshd $(sbindir)/sshd
-	$(INSTALL) -m 644 ssh.1 $(mandir)/man1/ssh.1
-	$(INSTALL) -m 644 scp.1 $(mandir)/man1/scp.1
-	$(INSTALL) -m 644 ssh-add.1 $(mandir)/man1/ssh-add.1
-	$(INSTALL) -m 644 ssh-agent.1 $(mandir)/man1/ssh-agent.1
-	$(INSTALL) -m 644 ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
-	$(INSTALL) -m 644 sshd.8 $(mandir)/man8/sshd.8
+	$(INSTALL) -m 644 ssh.1.out $(mandir)/man1/ssh.1
+	$(INSTALL) -m 644 scp.1.out $(mandir)/man1/scp.1
+	$(INSTALL) -m 644 ssh-add.1.out $(mandir)/man1/ssh-add.1
+	$(INSTALL) -m 644 ssh-agent.1.out $(mandir)/man1/ssh-agent.1
+	$(INSTALL) -m 644 ssh-keygen.1.out $(mandir)/man1/ssh-keygen.1
+	$(INSTALL) -m 644 sshd.8.out $(mandir)/man8/sshd.8
 	-rm -f $(bindir)/slogin
 	ln -s ssh $(bindir)/slogin
 	-rm -f $(mandir)/man1/slogin.1
@@ -138,8 +120,8 @@
 
 	if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
 		$(INSTALL) -d $(sysconfdir); \
-		$(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \
-		$(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \
+		$(INSTALL) -m 644 ssh_config.out $(sysconfdir)/ssh_config; \
+		$(INSTALL) -m 644 sshd_config.out $(sysconfdir)/sshd_config; \
 	fi
 
 uninstallall:	uninstall